T2 Software at IP5 that I've worked with
(Situation as of April 2010)
Software
vfat_controller (no comments)
Latest monitor
/data/T2/Monitor_developT2 (at vmepcS2B19-07) and also
~nturini/Software/Monitor
Xml input files
monitor xml files in
/data/T2/XML_ConfigMonitor_IP5
vfat_controller xml files in
~nturini/T2/config
Vfat_controller xml schema at
http://cmsdoc.cern.ch/cms/cmt/System_aspects/FecControl/binaries/misc/schema.xsd
Contains among other things VFAT lines
- preamp/shaper settings, same for all
- Control0,1,2,3 (control registers)
- Chanreg1-128 (mask/calpulse/trimDAQ channel by channel)
- Lat (latency)
- Vthreshold1,2 (vt1=threshold, vt2=0)
- chipid0,1=vfatID-16bit : low 8bits + high 8 bits
Xml file contains up to 688 VFATs, and in
vfat_controller one can make changes to all the VFATs or to one at a time
- automate to
- speed up initial value setting
- cut down error rate
I modified some of
MirkoBerretti's scripts, producing methods to change
- vthreshold1 = read from file: (VFAT ID,threshold)
- chanregNNN= (chanregNNN OR 64) if Read from file: (VFAT ID,channel=NNN)
- easily modified too (not implemented now) :
- OR 32 is maskChannel bit
- AND 31=last 5 bits are trimDAQ value (look up vfat IID value in fileMonitor, set high trimDAQ for larger outer pads, pad IID=2...14)
- For reference: If you set nonzero trimDAQ value, check that control3 AND 7=7 (or at least nonzero)
Scripts available here (see attachment) and on lxplus:
Scriptfile foThresholdsWrite-smallChanges.C contains three functions
- WriteThreshold1Txt(fileVFATController,fileMonitor,fileOutTxt)
- reads vt1 values & calculates vfat hex id
- writes to fileOutTxt "0xHexId,Threshold" - one line per vfat
- fileMonitor not used for output, doesn't affect fileOutTxt
- WriteThresholdsXml(fileVFATController,fileMonitor,fileTxtThresholds,fileXmlOut,options)
- reads vfatController file line by line, changes only vfat lines
- if matching vfat id found in fileTxtThresholds, change vt1 to the threshold found on that line
- options="" or "dropTheRest", the latter means drop any vfat not found in the text file
- fileMonitor not used for output, doesn't affect fileOutTxt
- WriteChanregsXml(fileVFATController,fileMonitor,fileTxtChannels,fileXmlOut,options)
- reads vfatController file line by line, changes only vfat lines
- options
- ="dropTheRest", means drop any vfat not found in the text file
- ="zeroCal", means to set in all chanregs of all vfats the calpulse bit off (test chanreg&64)
- ="setCal", means set the calpulse bit to 1 for any (vfat,channel) found in the text file AND set to 0 for all other channels
- if both zeroCal and setCal given, zeroCal takes precedence
- if both zeroCal and dropTheRest given, the latter has no effect since the text file is not read
- fileMonitor not used for output, doesn't affect fileOutTxt
Call functions like this:
- start root: [bash%] root
- tested with root v5.18 at vmepcS2B19-*
- [0] .L scriptfile.C+
- loads & compiles scriptfile.C
- Function1(param1,param2,""=default param3)
- Output text or xml file overwritten without warning
--
FredrikOljemark - 10-May-2010