#include <MatacqRawEvent.h>
Classes | |
struct | ChannelData |
struct | field32spec_t |
struct | int16le_t |
struct | matacqHeader_t |
struct | uint16le_t |
struct | uint32le_t |
Public Types | |
enum | matacqError_t { errorLengthConsistency = 1<<0, errorLength = 1<<1, errorWrongBoe = 1<<2 } |
Public Member Functions | |
int | getBoe () const |
int | getBxId () const |
int | getChannelCount () const |
const std::vector< ChannelData > & | getChannelData () const |
unsigned | getDaqLen () const |
int | getDccErrors () const |
unsigned | getDccLen () const |
unsigned | getEventId () const |
int | getFedId () const |
int | getFov () const |
int | getFreqGHz () const |
int | getH1Marker () const |
int | getMatacqDataFormatVersion () const |
int | getParsedLen () |
unsigned | getRunNum () const |
int32_t | getStatus () const |
time_t | getTimeStamp () const |
int | getTriggerType () const |
int | getTTrigPs () const |
MatacqTBRawEvent (const unsigned char *dataBuffer, size_t bufferSize) | |
Private Member Functions | |
int | read32 (uint32le_t *pData, field32spec_t spec) const |
void | setRawData (const unsigned char *buffer, size_t bufferSize) |
Private Attributes | |
int | boe |
int | bxId |
int | channelCount |
std::vector< ChannelData > | channelData |
uint32le_t * | daqHeader |
int | dccErrors |
unsigned | dccLen |
int32_t | error |
unsigned | eventId |
int | fedId |
int | fov |
int | fragLen |
int | freqGHz |
int | h1Marker |
int | matacqDataFormatVersion |
matacqHeader_t * | matacqHeader |
int | parsedLen |
uint16le_t * | pSamples |
unsigned | runNum |
time_t | timeStamp |
int | triggerType |
int | tTrigPs |
Static Private Attributes | |
static const field32spec_t | boeType32 = {1, 0xF0000000} |
static const field32spec_t | bxId32 = {0, 0xFFF00000} |
static const field32spec_t | dccErrors32 = {2, 0xFF000000} |
static const field32spec_t | dccLen32 = {2, 0x00FFFFFF} |
static const field32spec_t | fedId32 = {0, 0x000FFF00} |
static const field32spec_t | fov32 = {0, 0x000000F0} |
static const field32spec_t | h1Marker32 = {3, 0xF0000000} |
static const field32spec_t | lv132 = {1, 0x00FFFFFF} |
static const field32spec_t | runNum32 = {3, 0x00FFFFFF} |
static const field32spec_t | triggerType32 = {1, 0x0F000000} |
Wrapper for matacq raw event fragments. This class provides the method to interpret the data.
Definition at line 26 of file MatacqRawEvent.h.
Enumerator | |
---|---|
errorLengthConsistency |
Event length is specified both in the data header and the trailer. This flags indicates an inconsitency between the two indications. |
errorLength |
Error in data length. |
errorWrongBoe |
Wrong Begin of eevent flag |
Definition at line 29 of file MatacqRawEvent.h.
|
inline |
Constuctor.
dataBuffer | pointer to the raw data. Beware the data are not copied, therefore the data must be kept valid during the lifetime of the constructed object. pData must be aligned at least on 32-bit words. |
bufferSize | size of the buffer pointed by dataBuffer and containing the data. The data themselves are allowed to be smaller than the buffer. |
std::exception | if the data cannot be decoded due to data corruption or truncation. |
Definition at line 122 of file MatacqRawEvent.h.
References setRawData().
|
inline |
Gets the beging of event field contents (BOE). Must be 0x5.
Definition at line 158 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by setRawData().
|
inline |
Gets the bunch crossing id field contents.
Definition at line 143 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the matacq channel count field contents.
Definition at line 206 of file MatacqRawEvent.h.
References MatacqTBRawEvent::matacqHeader_t::channelCount, and matacqHeader.
Referenced by MatacqTBDataFormatter::printData(), and setRawData().
|
inline |
Gets the matacq channel data. Beware that no copy is done and that the returned data will be invalidated if the data contains in the buffer is modified (see constructor and setRawData().
Definition at line 213 of file MatacqRawEvent.h.
References channelData.
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the event length specifies in the DAQ trailer
Definition at line 168 of file MatacqRawEvent.h.
References fragLen.
|
inline |
Gets the contents of the DCC error field. Currently Not used for Matacq.
Definition at line 174 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the event length specifies in the "a la DCC" header.
Definition at line 163 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the LV1 field contents.
Definition at line 148 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the FED ID field contents. Should be 43.
Definition at line 138 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the Fed event fragment data format (FOV) field content. Currently the FOV is not used for MATACQ. Note that matacq data format has its own internal version. See getMatacqDataFormatVersion()
Definition at line 133 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the matacq sampling frequency field contents.
Definition at line 201 of file MatacqRawEvent.h.
References MatacqTBRawEvent::matacqHeader_t::freqGHz, and matacqHeader.
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the header marker field contents. Must be 1
Definition at line 184 of file MatacqRawEvent.h.
References daqHeader, and read32().
|
inline |
Gets the matcq data format version
Definition at line 190 of file MatacqRawEvent.h.
References matacqHeader, and MatacqTBRawEvent::matacqHeader_t::version.
Referenced by MatacqTBDataFormatter::printData(), and setRawData().
|
inline |
Gets the data length in number of 64-bit words computed by the data parser.
Definition at line 221 of file MatacqRawEvent.h.
References parsedLen.
|
inline |
Gets the run number field contents.
Definition at line 179 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the raw data status. Bitwise OR of the error flags defined by matcqError_t
Definition at line 196 of file MatacqRawEvent.h.
References error.
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the matacq data timestamp field contents:
Definition at line 228 of file MatacqRawEvent.h.
References matacqHeader, and MatacqTBRawEvent::matacqHeader_t::timeStamp.
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the trigger type field contents.
Definition at line 153 of file MatacqRawEvent.h.
References daqHeader, and read32().
Referenced by MatacqTBDataFormatter::printData().
|
inline |
Gets the Matacq trigger time.
Definition at line 235 of file MatacqRawEvent.h.
References read32(), setRawData(), and tTrigPs.
|
private |
Help function to decode header content.
data | pointer |
spec | specification of the data field to read |
Definition at line 103 of file MatacqRawEvent.cc.
References RecoTauDiscriminantConfiguration::mask, MatacqTBRawEvent::field32spec_t::mask, MatacqTBRawEvent::field32spec_t::offset, and mps_fire::result.
Referenced by getBoe(), getBxId(), getDccErrors(), getDccLen(), getEventId(), getFedId(), getFov(), getH1Marker(), getRunNum(), getTriggerType(), getTTrigPs(), and setRawData().
|
private |
Changes the raw data pointer and updates accordingly this object.
buffer | new pointer to the data buffer. Must be aligned at least on 32-bit words. |
size | of the data buffer. |
std::exception | if the data cannot be decoded due to data corruption or truncation. |
Definition at line 34 of file MatacqRawEvent.cc.
References channelData, daqHeader, dccLen32, error, errorLength, errorLengthConsistency, errorWrongBoe, fragLen, getBoe(), getChannelCount(), getMatacqDataFormatVersion(), matacqHeader, hpstanc_transforms::max, parsedLen, read32(), AlCaHLTBitMon_QueryRunRegistry::string, and tTrigPs.
Referenced by getTTrigPs(), and MatacqTBRawEvent().
|
private |
Begin Of Event marker
Definition at line 258 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 104 of file MatacqRawEvent.h.
|
private |
Bunch crossing Id
Definition at line 262 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 101 of file MatacqRawEvent.h.
|
private |
Number of matacq channels in the data.
Definition at line 266 of file MatacqRawEvent.h.
|
private |
Channel samples
Definition at line 270 of file MatacqRawEvent.h.
Referenced by getChannelData(), and setRawData().
|
private |
Pointer to the standard CMS DAQ header
Definition at line 274 of file MatacqRawEvent.h.
Referenced by getBoe(), getBxId(), getDccErrors(), getDccLen(), getEventId(), getFedId(), getFov(), getH1Marker(), getRunNum(), getTriggerType(), and setRawData().
|
private |
DCC error field content.
Definition at line 278 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 106 of file MatacqRawEvent.h.
|
private |
Event length specified in 'DCC' header
Definition at line 282 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 105 of file MatacqRawEvent.h.
Referenced by setRawData().
|
private |
Error code or 0 if no error.
Definition at line 290 of file MatacqRawEvent.h.
Referenced by argparse.ArgumentParser::_get_option_tuples(), python.rootplot.argparse.ArgumentParser::_get_option_tuples(), argparse.ArgumentParser::_parse_known_args(), python.rootplot.argparse.ArgumentParser::_parse_known_args(), argparse.ArgumentParser::_parse_optional(), python.rootplot.argparse.ArgumentParser::_parse_optional(), argparse.ArgumentParser::_read_args_from_files(), python.rootplot.argparse.ArgumentParser::_read_args_from_files(), argparse.ArgumentParser::add_subparsers(), python.rootplot.argparse.ArgumentParser::add_subparsers(), Page1Parser.Page1Parser::check_for_whole_start_tag(), getStatus(), argparse.ArgumentParser::parse_args(), python.rootplot.argparse.ArgumentParser::parse_args(), argparse.ArgumentParser::parse_known_args(), python.rootplot.argparse.ArgumentParser::parse_known_args(), and setRawData().
|
private |
Event id. Actually LV1 ID.
Definition at line 286 of file MatacqRawEvent.h.
Referenced by ntupleDataFormat.Event::eventIdStr().
|
private |
FED ID
Definition at line 294 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 100 of file MatacqRawEvent.h.
|
private |
FED data format version
Definition at line 298 of file MatacqRawEvent.h.
|
staticprivate |
DAQ header field specifications.
Definition at line 99 of file MatacqRawEvent.h.
|
private |
event fragment length as read in the std DAQ trailer. In 64-bit words
Definition at line 302 of file MatacqRawEvent.h.
Referenced by getDaqLen(), and setRawData().
|
private |
MATACQ sampling frequency in GHz
Definition at line 306 of file MatacqRawEvent.h.
|
private |
header marker
Definition at line 310 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 108 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 102 of file MatacqRawEvent.h.
|
private |
MATACQ data format internal version
Definition at line 318 of file MatacqRawEvent.h.
|
private |
Matacq header:
Definition at line 314 of file MatacqRawEvent.h.
Referenced by getChannelCount(), getFreqGHz(), getMatacqDataFormatVersion(), getTimeStamp(), and setRawData().
|
private |
event lenght computed by the raw data parser
Definition at line 322 of file MatacqRawEvent.h.
Referenced by getParsedLen(), and setRawData().
|
private |
Pointer to MATACQ samples block
Definition at line 326 of file MatacqRawEvent.h.
|
private |
Run number
Definition at line 330 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 107 of file MatacqRawEvent.h.
|
private |
Matacq acquisition time stamp
Definition at line 334 of file MatacqRawEvent.h.
|
private |
Trigger type
Definition at line 342 of file MatacqRawEvent.h.
|
staticprivate |
Definition at line 103 of file MatacqRawEvent.h.
|
private |
MATACQ trigger time position in ps
Definition at line 338 of file MatacqRawEvent.h.
Referenced by getTTrigPs(), and setRawData().