Difference between revisions of "ROC Configuration File to User Event"
From Hall A Wiki
(→Example User Event Structure) |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Here we'll describe the user event structure that contains the configuration files used by the ROCs to initialize various modules and settings. | + | Here we'll describe the user event 137 structure that contains the configuration files used by the ROCs to initialize various modules and settings. |
+ | These are inserted at Prestart. | ||
+ | == Example User Event 137 Structure == | ||
− | == | + | === c source code in readout list === |
− | + | size_t maxsize = 3 * 1024 * 1024; | |
+ | int nwords = 0, inum=0; | ||
+ | |||
+ | UEOPEN(137,BT_BANK,0); | ||
+ | |||
+ | nwords = rocFile2Event("/daqfs/daq_setups/vtp-mpdro/cfg/davtp3.config", | ||
+ | (uint8_t *)rol->dabufp, | ||
+ | ROCID, inum++, maxsize); | ||
+ | rol->dabufp += nwords; | ||
+ | nwords = rocFile2Event("/daqfs/daq_setups/vtp-mpdro/cfg/pedestals/daq_ped_bb_gem_run10975.dat", | ||
+ | (uint8_t *)rol->dabufp, | ||
+ | ROCID, inum++, maxsize); | ||
+ | rol->dabufp += nwords; | ||
+ | |||
+ | UECLOSE; | ||
=== hex dump === | === hex dump === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | 0x0007A75F # Length of User Event | ||
+ | 0x00891000 # User Event Header ( Tag = 137, num = 0, type = Bank of Banks) | ||
+ | 0x00000290 # Length of Bank | ||
+ | 0x00064300 # Bank Header ( Tag = 6 = ROCID, Num = 0, type = string) | ||
+ | .... # ... file0 dump ... | ||
+ | 0x0007A4CC # Length of Bank | ||
+ | 0x00060301 # Bank Header ( Tag = 6 = ROCID, Num = 1, type = string) | ||
+ | .... # ... file1 dump ... | ||
=== xml format === | === xml format === | ||
Line 21: | Line 36: | ||
<!-- ===================== Buffer 3 contains 501600 words (2006400 bytes) ===================== --> | <!-- ===================== Buffer 3 contains 501600 words (2006400 bytes) ===================== --> | ||
− | <!-- header words: 501599, | + | <!-- header words: 501599, 0x891000 --> |
− | <event format="evio" count="3" content="bank" data_type="0x10" tag=" | + | <event format="evio" count="3" content="bank" data_type="0x10" tag="137" padding="0" num="0" length="501599" ndata="501598"> |
− | <!-- header words: 656, | + | <!-- header words: 656, 0x64300 --> |
− | <bank content="string" data_type="0x3" tag="6" padding="1" num=" | + | <bank content="string" data_type="0x3" tag="6" padding="1" num="0" length="656" ndata="1"> |
+ | <![CDATA[... file0 dump ...]]> | ||
</bank> | </bank> | ||
− | <!-- header words: 500940, | + | <!-- header words: 500940, 0x60301 --> |
− | <bank content="string" data_type="0x3" tag="6" padding="0" num=" | + | <bank content="string" data_type="0x3" tag="6" padding="0" num="1" length="500940" ndata="1"> |
+ | <![CDATA[... file1 dump ...]]> | ||
</bank> | </bank> | ||
</event> | </event> | ||
<!-- end buffer 3 --> | <!-- end buffer 3 --> | ||
− | |||
</nowiki> | </nowiki> | ||
+ | |||
+ | === jeviodmp capture === | ||
+ | [[File:Jeviodmp.png]] |
Latest revision as of 04:23, 13 October 2021
Here we'll describe the user event 137 structure that contains the configuration files used by the ROCs to initialize various modules and settings. These are inserted at Prestart.
Contents
Example User Event 137 Structure
c source code in readout list
size_t maxsize = 3 * 1024 * 1024; int nwords = 0, inum=0; UEOPEN(137,BT_BANK,0); nwords = rocFile2Event("/daqfs/daq_setups/vtp-mpdro/cfg/davtp3.config", (uint8_t *)rol->dabufp, ROCID, inum++, maxsize); rol->dabufp += nwords; nwords = rocFile2Event("/daqfs/daq_setups/vtp-mpdro/cfg/pedestals/daq_ped_bb_gem_run10975.dat", (uint8_t *)rol->dabufp, ROCID, inum++, maxsize); rol->dabufp += nwords; UECLOSE;
hex dump
0x0007A75F # Length of User Event 0x00891000 # User Event Header ( Tag = 137, num = 0, type = Bank of Banks) 0x00000290 # Length of Bank 0x00064300 # Bank Header ( Tag = 6 = ROCID, Num = 0, type = string) .... # ... file0 dump ... 0x0007A4CC # Length of Bank 0x00060301 # Bank Header ( Tag = 6 = ROCID, Num = 1, type = string) .... # ... file1 dump ...
xml format
<!-- ===================== Buffer 3 contains 501600 words (2006400 bytes) ===================== --> <!-- header words: 501599, 0x891000 --> <event format="evio" count="3" content="bank" data_type="0x10" tag="137" padding="0" num="0" length="501599" ndata="501598"> <!-- header words: 656, 0x64300 --> <bank content="string" data_type="0x3" tag="6" padding="1" num="0" length="656" ndata="1"> <![CDATA[... file0 dump ...]]> </bank> <!-- header words: 500940, 0x60301 --> <bank content="string" data_type="0x3" tag="6" padding="0" num="1" length="500940" ndata="1"> <![CDATA[... file1 dump ...]]> </bank> </event> <!-- end buffer 3 -->