#include <CSCDCCHeader.h>
Public Member Functions | |
bool | check () const |
CSCDCCHeader (int bx, int l1a, int sourceId, int version=0) | |
CSCDCCHeader () | |
CSCDCCHeader (const CSCDCCStatusDigi &digi) | |
unsigned short * | data () |
int | getCDFBunchCounter () const |
int | getCDFEventNumber () const |
int | getCDFEventType () const |
int | getCDFFOV () const |
int | getCDFSourceId () const |
void | setDAV (int dduSlot) |
Static Public Member Functions | |
static unsigned | sizeInWords () |
Private Attributes | |
unsigned long long | word [2] |
Friends | |
class | CSCDDUEventData |
Definition at line 11 of file CSCDCCHeader.h.
CSCDCCHeader::CSCDCCHeader | ( | int | bx, |
int | l1a, | ||
int | sourceId, | ||
int | version = 0 |
||
) |
=VB= Should pass true as last parameter for FEDHeader::set() method to construct correct data
Definition at line 7 of file CSCDCCHeader.cc.
References data(), FEDHeader::set(), and word.
{ word[0] = 0x5100000000000008LL; word[1] = 0xD900000000000000LL; FEDHeader::set(reinterpret_cast<unsigned char *>(data()), 1, l1a, bx, sourceId, version, true); }
CSCDCCHeader::CSCDCCHeader | ( | ) |
Definition at line 16 of file CSCDCCHeader.cc.
References word.
CSCDCCHeader::CSCDCCHeader | ( | const CSCDCCStatusDigi & | digi | ) |
Definition at line 22 of file CSCDCCHeader.cc.
References CSCDCCStatusDigi::header(), and sizeInWords().
{ memcpy(this, digi.header(), sizeInWords()*2); }
bool CSCDCCHeader::check | ( | ) | const [inline] |
Definition at line 24 of file CSCDCCHeader.h.
Referenced by CSCDCCEventData::check(), and CSCChamberDataItr::CSCChamberDataItr().
{ return true/*dcc_code1==0xD9 && dcc_code2==0x97*/;}
unsigned short* CSCDCCHeader::data | ( | ) | [inline] |
Definition at line 25 of file CSCDCCHeader.h.
References word.
Referenced by CSCDCCHeader(), and CSCDCCEventData::pack().
{return (short unsigned *)word;}
int CSCDCCHeader::getCDFBunchCounter | ( | ) | const |
int CSCDCCHeader::getCDFEventNumber | ( | ) | const |
Definition at line 29 of file CSCDCCHeader.cc.
References word.
{ return ((word[0]>>32)&0x00FFFFFF); }
int CSCDCCHeader::getCDFEventType | ( | ) | const |
int CSCDCCHeader::getCDFFOV | ( | ) | const |
int CSCDCCHeader::getCDFSourceId | ( | ) | const |
void CSCDCCHeader::setDAV | ( | int | dduSlot | ) |
Definition at line 52 of file CSCDCCHeader.cc.
References word.
Referenced by CSCDCCEventData::addChamber().
{ /* Bits 7,6,5,4,2 to indicate available DDU. For slink0, the DDU slots are 5, 12, 4, 13, 3 (same as Fifo_in_use[4:0]); for slink1, the DDU slots are 9, 7, 10, 6, 11 */ assert(slot>=3 && slot <= 13); int bit[] = {0, 0, 0, 2, 5, 7, 4, 6, 0, 7, 5, 2, 6, 4}; word[0] |= 1 << bit[slot]; }
static unsigned CSCDCCHeader::sizeInWords | ( | ) | [inline, static] |
Definition at line 26 of file CSCDCCHeader.h.
Referenced by CSCDCCHeader(), CSCDCCEventData::pack(), and CSCDCCEventData::unpack_data().
{return 8;}
friend class CSCDDUEventData [friend] |
Definition at line 29 of file CSCDCCHeader.h.
unsigned long long CSCDCCHeader::word[2] [private] |
Definition at line 32 of file CSCDCCHeader.h.
Referenced by CSCDCCHeader(), data(), getCDFBunchCounter(), getCDFEventNumber(), getCDFEventType(), getCDFFOV(), getCDFSourceId(), and setDAV().