#include <CSCDDUHeader.h>
Public Member Functions | |
int | bxnum () const |
bool | check () const |
CSCDDUHeader (unsigned bx, unsigned l1num, unsigned sourceId) | |
CSCDDUHeader () | |
CSCDDUHeader (const CSCDDUStatusDigi &digi) | |
unsigned short * | data () |
int | dmb_dav () const |
int | event_type () const |
int | format_version () const |
int | live_cscs () const |
int | lvl1num () const |
int | ncsc () const |
int | s_link_status () const |
void | setDMBDAV (int dduInput) |
void | setSourceId (unsigned sourceId) |
int | source_id () const |
Static Public Member Functions | |
static unsigned | sizeInWords () |
Private Member Functions | |
void | init () |
initializes constants | |
Private Attributes | |
unsigned | bit64_: 4 |
should always be 5 | |
unsigned | boe_status_: 8 |
unsigned | bxnum_: 12 |
unsigned | dmb_dav_: 16 |
unsigned | dmb_full_: 16 |
should be 8000/0001/8000 | |
unsigned | event_type_: 4 |
unsigned | format_version_: 4 |
unsigned | header2_1_: 16 |
unsigned | header2_2_: 16 |
unsigned | header2_3_: 16 |
unsigned | live_cscs_: 16 |
unsigned | lvl1num_: 24 |
unsigned | ncsc_: 4 |
unsigned | output_path_: 16 |
unsigned | s_link_status_: 4 |
unsigned | source_id_: 12 |
unsigned | tts_status_: 4 |
Friends | |
class | CSCDDUEventData |
Definition at line 10 of file CSCDDUHeader.h.
CSCDDUHeader::CSCDDUHeader | ( | ) |
Definition at line 5 of file CSCDDUHeader.cc.
References init(), and sizeInWords().
{ bzero(this, sizeInWords()*2); init(); }
CSCDDUHeader::CSCDDUHeader | ( | unsigned | bx, |
unsigned | l1num, | ||
unsigned | sourceId | ||
) |
Definition at line 12 of file CSCDDUHeader.cc.
References bxnum_, init(), lvl1num_, sizeInWords(), and source_id_.
: source_id_(sourceId), bxnum_(bx), lvl1num_(l1num) { bzero(this, sizeInWords()*2); source_id_ = sourceId; bxnum_ = bx; lvl1num_ = l1num; init(); }
CSCDDUHeader::CSCDDUHeader | ( | const CSCDDUStatusDigi & | digi | ) | [inline] |
Definition at line 15 of file CSCDDUHeader.h.
References CSCDDUStatusDigi::header(), and sizeInWords().
{ memcpy(this, digi.header(), sizeInWords()*2); }
int CSCDDUHeader::bxnum | ( | ) | const [inline] |
Definition at line 22 of file CSCDDUHeader.h.
References bxnum_.
Referenced by CSCDDUEventData::add(), and cscdqm::EventProcessor::processDDU().
{ return bxnum_;}
bool CSCDDUHeader::check | ( | ) | const |
Definition at line 48 of file CSCDDUHeader.cc.
References bit64_, header2_1_, header2_2_, and header2_3_.
Referenced by CSCDDUEventData::check(), and CSCDDUDataItr::CSCDDUDataItr().
{ //std::cout <<"SANDRIK"<<std::hex <<header2_1_<<" "<<header2_2_ <<" "<<header2_3_<<std::endl; return bit64_ == 5 && header2_1_ == 0x8000 && header2_3_ == 0x8000 && header2_2_ == 0x0001; }
unsigned short* CSCDDUHeader::data | ( | ) | [inline] |
Definition at line 31 of file CSCDDUHeader.h.
Referenced by CSCDDUEventData::pack().
{return (unsigned short *) this;}
int CSCDDUHeader::dmb_dav | ( | ) | const [inline] |
Definition at line 26 of file CSCDDUHeader.h.
References dmb_dav_.
Referenced by cscdqm::EventProcessor::processDDU().
{ return dmb_dav_;}
int CSCDDUHeader::event_type | ( | ) | const [inline] |
int CSCDDUHeader::format_version | ( | ) | const [inline] |
Definition at line 20 of file CSCDDUHeader.h.
References format_version_.
{ return format_version_;}
void CSCDDUHeader::init | ( | void | ) | [private] |
initializes constants
Definition at line 23 of file CSCDDUHeader.cc.
References bit64_, header2_1_, header2_2_, and header2_3_.
Referenced by CSCDDUHeader().
{ bit64_ = 5; header2_2_ = 0x0001; header2_1_ = header2_3_ = 0x8000; }
int CSCDDUHeader::live_cscs | ( | ) | const [inline] |
Definition at line 28 of file CSCDDUHeader.h.
References live_cscs_.
Referenced by cscdqm::EventProcessor::processDDU().
{return live_cscs_;}
int CSCDDUHeader::lvl1num | ( | ) | const [inline] |
Definition at line 23 of file CSCDDUHeader.h.
References lvl1num_.
Referenced by CSCDDUEventData::add(), and cscdqm::EventProcessor::processDDU().
{ return lvl1num_;}
int CSCDDUHeader::ncsc | ( | ) | const [inline] |
Definition at line 25 of file CSCDDUHeader.h.
References ncsc_.
Referenced by cscdqm::EventProcessor::processDDU(), and CSCEventData::unpack_data().
{ return ncsc_;}
int CSCDDUHeader::s_link_status | ( | ) | const [inline] |
void CSCDDUHeader::setDMBDAV | ( | int | dduInput | ) |
Definition at line 31 of file CSCDDUHeader.cc.
References dmb_dav_, and ncsc_.
Referenced by CSCDDUEventData::add().
{ // Set appropriate bit in dmb_dav_ dmb_dav_ |= (1 << dduInput); // dduInput is 0-14 // Count bits set in dmb_dav_... for the trick used see // http://en.wikipedia.org/wiki/Hamming_weight or http://graphics.stanford.edu/~seander/bithacks.html ncsc_ = 0; unsigned short dmbdav = dmb_dav_; for( ; dmbdav; ++ncsc_ ) { dmbdav &= dmbdav - 1; } }
void CSCDDUHeader::setSourceId | ( | unsigned | sourceId | ) | [inline] |
static unsigned CSCDDUHeader::sizeInWords | ( | ) | [inline, static] |
Definition at line 29 of file CSCDDUHeader.h.
Referenced by CSCDDUHeader(), CSCDDUEventData::pack(), and CSCEventData::unpack_data().
{return 12;}
int CSCDDUHeader::source_id | ( | ) | const [inline] |
Definition at line 21 of file CSCDDUHeader.h.
References source_id_.
Referenced by cscdqm::EventProcessor::processDDU(), and CSCEventData::unpack_data().
{ return source_id_;}
friend class CSCDDUEventData [friend] |
Definition at line 35 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::bit64_ [private] |
unsigned CSCDDUHeader::boe_status_ [private] |
Definition at line 59 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::bxnum_ [private] |
Definition at line 43 of file CSCDDUHeader.h.
Referenced by bxnum(), and CSCDDUHeader().
unsigned CSCDDUHeader::dmb_dav_ [private] |
Definition at line 60 of file CSCDDUHeader.h.
Referenced by dmb_dav(), and setDMBDAV().
unsigned CSCDDUHeader::dmb_full_ [private] |
should be 8000/0001/8000
Definition at line 51 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::event_type_ [private] |
Definition at line 46 of file CSCDDUHeader.h.
Referenced by event_type().
unsigned CSCDDUHeader::format_version_ [private] |
Definition at line 41 of file CSCDDUHeader.h.
Referenced by format_version().
unsigned CSCDDUHeader::header2_1_ [private] |
Definition at line 52 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::header2_2_ [private] |
Definition at line 53 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::header2_3_ [private] |
Definition at line 54 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::live_cscs_ [private] |
Definition at line 62 of file CSCDDUHeader.h.
Referenced by live_cscs().
unsigned CSCDDUHeader::lvl1num_ [private] |
Definition at line 45 of file CSCDDUHeader.h.
Referenced by CSCDDUHeader(), and lvl1num().
unsigned CSCDDUHeader::ncsc_ [private] |
Definition at line 57 of file CSCDDUHeader.h.
Referenced by ncsc(), and setDMBDAV().
unsigned CSCDDUHeader::output_path_ [private] |
Definition at line 61 of file CSCDDUHeader.h.
unsigned CSCDDUHeader::s_link_status_ [private] |
Definition at line 40 of file CSCDDUHeader.h.
Referenced by s_link_status().
unsigned CSCDDUHeader::source_id_ [private] |
Definition at line 42 of file CSCDDUHeader.h.
Referenced by CSCDDUHeader(), setSourceId(), and source_id().
unsigned CSCDDUHeader::tts_status_ [private] |
Definition at line 58 of file CSCDDUHeader.h.