#include <DataFormats/FEDRawData/interface/FEDHeader.h>
Public Member Functions | |
int | bxID () |
The bunch crossing number. | |
int | bxID () |
The bunch crossing number. | |
bool | check () |
Check that the header is OK. | |
bool | check () |
Check that the header is OK. | |
FEDHeader (const unsigned char *header) | |
Constructor. | |
FEDHeader (const unsigned char *header) | |
Constructor. | |
int | lvl1ID () |
Level-1 event number generated by the TTC system. | |
int | lvl1ID () |
Level-1 event number generated by the TTC system. | |
bool | moreHeaders () |
0 -> the current header word is the last one. | |
bool | moreHeaders () |
0 -> the current header word is the last one. | |
int | sourceID () |
Identifier of the FED. | |
int | sourceID () |
Identifier of the FED. | |
int | triggerType () |
Event Trigger type identifier. | |
int | triggerType () |
Event Trigger type identifier. | |
int | version () |
Version identifier of the FED data format. | |
int | version () |
Version identifier of the FED data format. | |
~FEDHeader () | |
Destructor. | |
~FEDHeader () | |
Destructor. | |
Static Public Member Functions | |
static void | set (unsigned char *header, int evt_ty, int lvl1_ID, int bx_ID, int source_ID, int version=0, bool H=false) |
Set all fields in the header. | |
static void | set (unsigned char *header, int evt_ty, int lvl1_ID, int bx_ID, int source_ID, int version=0, bool H=false) |
Set all fields in the header. | |
Private Attributes | |
const fedh_t * | theHeader |
const fedh_struct * | theHeader |
FIXME: will be replaced by the xdaq implementation.
Definition at line 15 of file FEDHeader.h.
FEDHeader::FEDHeader | ( | const unsigned char * | header | ) |
FEDHeader::~FEDHeader | ( | ) |
FEDHeader::FEDHeader | ( | const unsigned char * | header | ) |
Constructor.
FEDHeader::~FEDHeader | ( | ) |
Destructor.
int FEDHeader::bxID | ( | ) |
The bunch crossing number.
int FEDHeader::bxID | ( | ) |
The bunch crossing number.
Definition at line 26 of file FEDHeader.cc.
References FED_BXID_MASK, FED_BXID_SHIFT, fedh_struct::sourceid, and theHeader.
Referenced by HcalTBWriter::extractEventInfo(), ESUnpacker::interpretRawData(), DTDDUUnpacker::interpretRawData(), DTDataIntegrityTask::processFED(), RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().
00026 { 00027 return ((theHeader->sourceid & FED_BXID_MASK) >> FED_BXID_SHIFT); 00028 }
bool FEDHeader::check | ( | ) |
Check that the header is OK.
bool FEDHeader::check | ( | ) |
Check that the header is OK.
Definition at line 66 of file FEDHeader.cc.
References fedh_struct::eventid, FED_HCTRLID, FED_HCTRLID_MASK, HLT_VtxMuL3::result, and theHeader.
Referenced by ErrorChecker::checkHeader(), ESUnpacker::interpretRawData(), DTDDUUnpacker::interpretRawData(), DTDDUFileReader::isHeader(), DTSpyReader::isHeader(), and RPCUnpackingModule::produce().
00066 { 00067 // ...may report with finer detail 00068 bool result = true; 00069 result &= ((theHeader->eventid & FED_HCTRLID_MASK) == FED_HCTRLID); 00070 00071 return result; 00072 }
int FEDHeader::lvl1ID | ( | ) |
Level-1 event number generated by the TTC system.
int FEDHeader::lvl1ID | ( | ) |
Level-1 event number generated by the TTC system.
Definition at line 22 of file FEDHeader.cc.
References fedh_struct::eventid, FED_LVL1_MASK, and theHeader.
Referenced by HcalTBWriter::extractEventInfo(), ESUnpacker::interpretRawData(), DTDDUUnpacker::interpretRawData(), DTDataIntegrityTask::processFED(), RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().
00022 { 00023 return (theHeader->eventid & FED_LVL1_MASK); 00024 }
bool FEDHeader::moreHeaders | ( | ) |
0 -> the current header word is the last one.
1-> other header words can follow (always 1 for ECAL)
bool FEDHeader::moreHeaders | ( | ) |
0 -> the current header word is the last one.
1-> other header words can follow (always 1 for ECAL)
Definition at line 38 of file FEDHeader.cc.
References FED_MORE_HEADERS, fedh_struct::sourceid, and theHeader.
Referenced by ErrorChecker::checkHeader(), ESUnpacker::interpretRawData(), RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().
00038 { 00039 return ((theHeader->sourceid & FED_MORE_HEADERS)!=0); 00040 }
static void FEDHeader::set | ( | unsigned char * | header, | |
int | evt_ty, | |||
int | lvl1_ID, | |||
int | bx_ID, | |||
int | source_ID, | |||
int | version = 0 , |
|||
bool | H = false | |||
) | [static] |
Set all fields in the header.
void FEDHeader::set | ( | unsigned char * | header, | |
int | evt_ty, | |||
int | lvl1_ID, | |||
int | bx_ID, | |||
int | source_ID, | |||
int | version = 0 , |
|||
bool | H = false | |||
) | [static] |
Set all fields in the header.
Definition at line 42 of file FEDHeader.cc.
References fedh_struct::eventid, FED_BXID_SHIFT, FED_EVTY_SHIFT, FED_HCTRLID, FED_LVL1_SHIFT, FED_MORE_HEADERS, FED_SOID_SHIFT, FED_VERSION_SHIFT, h, and fedh_struct::sourceid.
Referenced by CSCDCCHeader::CSCDCCHeader(), ESDataFormatter::DigiToRaw(), ESDataFormatter::DigiToRawTB(), PixelDataFormatter::formatData(), L1GTDigiToRaw::packHeader(), L1GTEvmDigiToRaw::packHeader(), GctDigiToRaw::produce(), and RPCPackingModule::rawData().
00048 { 00049 00050 // FIXME: should check that input ranges are OK!!! 00051 fedh_t* h = reinterpret_cast<fedh_t*>(header); 00052 h->eventid = 00053 FED_HCTRLID | 00054 evt_ty << FED_EVTY_SHIFT | 00055 lvl1_ID << FED_LVL1_SHIFT; 00056 00057 h->sourceid = 00058 bx_ID << FED_BXID_SHIFT | 00059 source_ID << FED_SOID_SHIFT | 00060 version << FED_VERSION_SHIFT; 00061 00062 if (H) h->sourceid |= FED_MORE_HEADERS; 00063 00064 }
int FEDHeader::sourceID | ( | ) |
Identifier of the FED.
int FEDHeader::sourceID | ( | ) |
Identifier of the FED.
Definition at line 30 of file FEDHeader.cc.
References FED_SOID_MASK, FED_SOID_SHIFT, fedh_struct::sourceid, and theHeader.
Referenced by ErrorChecker::checkHeader(), ESUnpacker::interpretRawData(), DTSpyReader::isHeader(), RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().
00030 { 00031 return ((theHeader->sourceid & FED_SOID_MASK) >> FED_SOID_SHIFT); 00032 }
int FEDHeader::triggerType | ( | ) |
Event Trigger type identifier.
Definition at line 18 of file FEDHeader.cc.
References fedh_struct::eventid, FED_EVTY_MASK, FED_EVTY_SHIFT, and theHeader.
Referenced by DTDataIntegrityTask::processFED(), RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().
00018 { 00019 return ((theHeader->eventid & FED_EVTY_MASK) >> FED_EVTY_SHIFT); 00020 }
int FEDHeader::version | ( | ) |
Version identifier of the FED data format.
Definition at line 34 of file FEDHeader.cc.
References FED_VERSION_MASK, FED_VERSION_SHIFT, fedh_struct::sourceid, and theHeader.
Referenced by RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().
00034 { 00035 return ((theHeader->sourceid & FED_VERSION_MASK) >> FED_VERSION_SHIFT); 00036 }
const fedh_t* FEDHeader::theHeader [private] |
Definition at line 55 of file FEDHeader.h.
const fedh_struct* FEDHeader::theHeader [private] |
Definition at line 56 of file FEDHeader.h.
Referenced by bxID(), check(), lvl1ID(), moreHeaders(), sourceID(), triggerType(), and version().