Raw Data Format and Readout Source code¶
The raw data format and readout code code can be found in the lariat-online
GIT repository, with a browser here:
See the link LariatOnlineGit for instructions on how to checkout your own copy of
the lariat-online repository and how to commit changes back to it.
Raw Data Definition¶
The raw data files are one spill each and are closed at the termination of the spill
after all data has been read out of the spill buffers. The data are divided into
fragments, and each fragment is required to have two common 32 bit data words
at the beginning of the fragment:
The fragmentSize indicates the number of bytes in the fragment, including these first
two words. The fragmentType indicates the type of data following. The fragment
specific data definition is contained in a C style struct which can be used easily
from either C or C++. The fragment type codes are defined in:
The struct definition mapping in the include/ subdirectory is as follows:
|fragmentType Value||fragmentType Name||Header File||struct Name(s)|
|4||FRAGMENT_TYPE_V1495||V1495Fragment.h||V1495Header, V1495ChannelData, V1495TriggerPatternData|
Note that CAEN_ADC and TDC_EVENT_HEADER fragments contain two types
of struct, one header, followed by a a variable number of channel data
entries. The header always indicates how many channel data entries are present
following the header. The fragmentSize in this case represents the total amount
of data, header plus all channel data.
For backwards compatibility, if additions are necessary in the future, header and info
structures will only add additional words at the end of the data structure.
The RunInfo data appear once at the beginning of a data run in the first spill
data file. The SpillInfo data appear once at the beginning of a spill data file.
In general the header data will always exist at least once per trigger in a spill.
The TdcEventData, TdcChannelData and CaenChannelData may not exist for a
given trigger if no data were found.
- The V1740 and V1751 CAEN digitizers share their format, so you must check the
unique boardId in the header to figure out which board you are accessing
- The Time-of-Flight scintillators will have timing and pulse height information; its data
format has not yet been defined.