Difference between revisions of "Translation table 13-jul-2011"
From GlueXWiki
m |
m |
||
Line 55: | Line 55: | ||
</translation_table> | </translation_table> | ||
+ | |||
+ | |||
+ | ===Fake Table Generation=== | ||
+ | |||
+ | I used a Python script to generate a full translation table. | ||
+ | detectorOn = { | ||
+ | 'CDC': 1, | ||
+ | 'FDC': 1, | ||
+ | 'BCAL': 1, | ||
+ | 'FCAL': 1, | ||
+ | 'SC': 1, | ||
+ | 'TOF': 1, | ||
+ | 'TAGGER': 1 | ||
+ | } | ||
+ | |||
+ | |||
+ | # SC: FADC250, 16 channels/slot | ||
+ | if (detectorOn['SC']==1): | ||
+ | type = 'FADC250' | ||
+ | slot = slot+1 | ||
+ | channel = 1 | ||
+ | if (slot>max_slot): | ||
+ | file.write(' </crate>\n\n\n') | ||
+ | crate = crate+1 | ||
+ | file.write(' <crate number="%i" type="VXS">\n\n' % crate) | ||
+ | slot=1 | ||
+ | file.write((' <slot number="%i"' % slot) + ' type="' + type + '">\n') | ||
+ | |||
+ | for sector in range(1,41): | ||
+ | if (channel>channelCount[type]): | ||
+ | file.write(' </slot>\n\n') | ||
+ | slot = slot+1 | ||
+ | channel = 1 | ||
+ | if (slot>max_slot): | ||
+ | file.write(' </crate>\n\n\n') | ||
+ | crate = crate+1 | ||
+ | file.write(' <crate number="%i" type="VXS">\n\n' % crate) | ||
+ | slot = 1 | ||
+ | file.write((' <slot number="%i"' % slot) + ' type="' + type + '">\n') | ||
+ | file.write(' <channel number="%i" detector="SC" sector="%i" />\n' % (channel,sector) ) | ||
+ | channel = channel+1 | ||
+ | file.write(' </slot>\n\n') | ||
+ | |||
+ | |||
+ | Fragment: | ||
+ | |||
+ | <translation_table version="0.1"> | ||
+ | |||
+ | <crate number="1" type="VXS"> | ||
+ | |||
+ | <slot number="1" type="FADC125"> | ||
+ | <channel number="1" detector="CDC" ring="1" straw="1" /> | ||
+ | <channel number="2" detector="CDC" ring="1" straw="2" /> | ||
+ | <channel number="3" detector="CDC" ring="1" straw="3" /> | ||
+ | <channel number="4" detector="CDC" ring="1" straw="4" /> | ||
+ | <channel number="5" detector="CDC" ring="1" straw="5" /> | ||
+ | <channel number="6" detector="CDC" ring="1" straw="6" /> | ||
+ | <channel number="7" detector="CDC" ring="1" straw="7" /> | ||
+ | <channel number="8" detector="CDC" ring="1" straw="8" /> | ||
+ | |||
===Discussion=== | ===Discussion=== |
Revision as of 10:23, 12 July 2011
Background
We need a prototype translation table in order for the DAQ group to create a simulated raw data file from HDDM input. We will pay the DAQ group will do this work.
Proposed Translation Table Format
<translation_table version="0.1"> <crate number="1" type="VXS"> <slot number="1" type="FADC250"> <channel number="1" detector="FCAL" row="3" column="4" /> <channel number="2" detector="BCAL" module="10" sector="2" layer="3" end="0" /> <channel number="3" detector="SC" sector="21" /> <channel number="4" detector="Tagger" row="24" column="2" /> <channel number="5" detector="TOF" plane="1" bar="6" end="1" /> </slot> <slot number="2" type="FADC125" > <channel number="1" detector="FDCCathode" gplane="5" element="33" /> <channel number="2" detector="CDC" ring="3" straw="45" /> </slot> <slot number="3" type="F1TDC32" > <channel number="1" detector="TOF" plane="2" bar="1" end="0" /> <channel number="2" detector="Tagger" row="42" column="10" /> <channel number="3" detector="BCAL" module="6" sector="1" layer="3" end="1" /> <channel number="4" detector="SC" sector="38" /> </slot> <slot number="3" type="F1TDC64" > <channel number="1" detector="FDCAnode" gplane="2" element="99" /> </slot> <slot number="17" type="TI" /> <slot number="18" type="CPU" /> <switchSlot number="1" type="CTP" /> <switchSlot number="2" type="SD" /> </crate> </translation_table>
Fake Table Generation
I used a Python script to generate a full translation table.
detectorOn = { 'CDC': 1, 'FDC': 1, 'BCAL': 1, 'FCAL': 1, 'SC': 1, 'TOF': 1, 'TAGGER': 1 } # SC: FADC250, 16 channels/slot if (detectorOn['SC']==1): type = 'FADC250' slot = slot+1 channel = 1 if (slot>max_slot): file.write(' </crate>\n\n\n') crate = crate+1 file.write(' <crate number="%i" type="VXS">\n\n' % crate) slot=1 file.write((' <slot number="%i"' % slot) + ' type="' + type + '">\n') for sector in range(1,41): if (channel>channelCount[type]): file.write(' </slot>\n\n') slot = slot+1 channel = 1 if (slot>max_slot): file.write(' </crate>\n\n\n') crate = crate+1 file.write(' <crate number="%i" type="VXS">\n\n' % crate) slot = 1 file.write((' <slot number="%i"' % slot) + ' type="' + type + '">\n') file.write(' <channel number="%i" detector="SC" sector="%i" />\n' % (channel,sector) ) channel = channel+1 file.write(' </slot>\n\n')
Fragment:
<translation_table version="0.1">
<crate number="1" type="VXS">
<slot number="1" type="FADC125"> <channel number="1" detector="CDC" ring="1" straw="1" /> <channel number="2" detector="CDC" ring="1" straw="2" /> <channel number="3" detector="CDC" ring="1" straw="3" /> <channel number="4" detector="CDC" ring="1" straw="4" /> <channel number="5" detector="CDC" ring="1" straw="5" /> <channel number="6" detector="CDC" ring="1" straw="6" /> <channel number="7" detector="CDC" ring="1" straw="7" /> <channel number="8" detector="CDC" ring="1" straw="8" />