#include <EventFilter/CSCTFRawToDigi/old/CSCTFTBEventHeader.h>
Public Member Functions | |
bool | check () const |
simple data integrity check | |
CSCTFTBEventHeader (const CSCTFTBEventHeader &) | |
CSCTFTBEventHeader () | |
unsigned int | getActiveDT () const |
DT data flag word. | |
unsigned int | getActiveFront () const |
Overall Active Front FPGA word. | |
unsigned int | getActiveFrontFPGA1 () const |
unsigned int | getActiveFrontFPGA2 () const |
unsigned int | getActiveFrontFPGA3 () const |
unsigned int | getActiveFrontFPGA4 () const |
unsigned int | getActiveFrontFPGA5 () const |
unsigned int | getActiveME1a () const |
ME1 data flag words. | |
unsigned int | getActiveME1b () const |
unsigned int | getActiveME2 () const |
ME2 data flag words. | |
unsigned int | getActiveME3 () const |
ME3 data flag words. | |
unsigned int | getActiveME4 () const |
ME4 data flag words. | |
int | getBXnum () const |
BX number (for first bx read out). | |
int | getLvl1num () const |
L1A number. | |
unsigned int | getNumActiveFront () const |
Calculate number of active front FPGAs. | |
unsigned int | getPtLutSpy () const |
PT LUT Spy flag 0 = no track, 1 = 1st track, 2 = 2nd, 3 = 3rd. | |
unsigned int | getZeroSupp () const |
Zero Supp word. | |
int | numBX () const |
number of BX read out per link | |
int | numLinks () const |
number of links to read out per MPC connection | |
int | numMPC () const |
number of MPC connections to read out | |
~CSCTFTBEventHeader () | |
Static Public Member Functions | |
static unsigned | size () |
Private Attributes | |
unsigned | act_DT_:1 |
unsigned | act_ffpga_:5 |
unsigned | bunch_cntr_:12 |
unsigned | key1_:4 |
unsigned | key2_:4 |
unsigned | key3_:4 |
unsigned | key4_:4 |
unsigned | l1a_lsb_:12 |
unsigned | l1a_msb_:12 |
unsigned | num_bx_:3 |
unsigned | pt_lut_spy_:2 |
unsigned | zero_supp_:1 |
Static Private Attributes | |
static const unsigned | nLinks_ = 3 |
static const unsigned | nMPC_ = 5 |
static const unsigned | size_ = 4 |
Friends | |
class | CSCTFTBEventData |
filled by EventData | |
std::ostream & | operator<< (std::ostream &stream, const CSCTFTBEventHeader &) |
pretty-print |
Definition at line 73 of file CSCTFTBEventHeader.h.
CSCTFTBEventHeader::CSCTFTBEventHeader | ( | ) |
CSCTFTBEventHeader::CSCTFTBEventHeader | ( | const CSCTFTBEventHeader & | parent | ) |
Definition at line 107 of file CSCTFTBEventHeader.cc.
References size().
00108 { 00109 memcpy(reinterpret_cast<unsigned*>(this),&parent,size()*sizeof(unsigned short)); 00110 }
CSCTFTBEventHeader::~CSCTFTBEventHeader | ( | ) |
bool CSCTFTBEventHeader::check | ( | ) | const |
unsigned int CSCTFTBEventHeader::getActiveDT | ( | ) | const [inline] |
DT data flag word.
Definition at line 101 of file CSCTFTBEventHeader.h.
References act_DT_.
Referenced by operator<<(), and CSCTFTBSPBlock::unpackData().
00101 {return act_DT_;}
unsigned int CSCTFTBEventHeader::getActiveFront | ( | ) | const [inline] |
Overall Active Front FPGA word.
Definition at line 122 of file CSCTFTBEventHeader.h.
References act_ffpga_.
Referenced by operator<<(), and CSCTFTBFrontBlock::unpackData().
00122 {return act_ffpga_;}
unsigned int CSCTFTBEventHeader::getActiveFrontFPGA1 | ( | ) | const [inline] |
Definition at line 106 of file CSCTFTBEventHeader.h.
References act_ffpga_.
Referenced by getActiveME1a().
00106 {return (act_ffpga_&1);}
unsigned int CSCTFTBEventHeader::getActiveFrontFPGA2 | ( | ) | const [inline] |
Definition at line 107 of file CSCTFTBEventHeader.h.
References act_ffpga_.
Referenced by getActiveME1b().
00107 {return ((act_ffpga_&2)>>1);}
unsigned int CSCTFTBEventHeader::getActiveFrontFPGA3 | ( | ) | const [inline] |
Definition at line 111 of file CSCTFTBEventHeader.h.
References act_ffpga_.
Referenced by getActiveME2().
00111 {return ((act_ffpga_&4)>>2);}
unsigned int CSCTFTBEventHeader::getActiveFrontFPGA4 | ( | ) | const [inline] |
Definition at line 115 of file CSCTFTBEventHeader.h.
References act_ffpga_.
Referenced by getActiveME3(), and getActiveME4().
00115 {return ((act_ffpga_&8)>>3);}
unsigned int CSCTFTBEventHeader::getActiveFrontFPGA5 | ( | ) | const [inline] |
Definition at line 119 of file CSCTFTBEventHeader.h.
References act_ffpga_.
00119 {return ((act_ffpga_&10)>>4);}
unsigned int CSCTFTBEventHeader::getActiveME1a | ( | ) | const [inline] |
ME1 data flag words.
Definition at line 104 of file CSCTFTBEventHeader.h.
References getActiveFrontFPGA1().
00104 {return getActiveFrontFPGA1();}
unsigned int CSCTFTBEventHeader::getActiveME1b | ( | ) | const [inline] |
Definition at line 105 of file CSCTFTBEventHeader.h.
References getActiveFrontFPGA2().
00105 {return getActiveFrontFPGA2();}
unsigned int CSCTFTBEventHeader::getActiveME2 | ( | ) | const [inline] |
ME2 data flag words.
Definition at line 110 of file CSCTFTBEventHeader.h.
References getActiveFrontFPGA3().
00110 {return getActiveFrontFPGA3();}
unsigned int CSCTFTBEventHeader::getActiveME3 | ( | ) | const [inline] |
ME3 data flag words.
Definition at line 114 of file CSCTFTBEventHeader.h.
References getActiveFrontFPGA4().
00114 {return getActiveFrontFPGA4();}
unsigned int CSCTFTBEventHeader::getActiveME4 | ( | ) | const [inline] |
ME4 data flag words.
Definition at line 118 of file CSCTFTBEventHeader.h.
References getActiveFrontFPGA4().
00118 {return getActiveFrontFPGA4();}
int CSCTFTBEventHeader::getBXnum | ( | ) | const [inline] |
BX number (for first bx read out).
Definition at line 95 of file CSCTFTBEventHeader.h.
References bunch_cntr_.
Referenced by operator<<().
00095 {return bunch_cntr_;}
int CSCTFTBEventHeader::getLvl1num | ( | ) | const [inline] |
L1A number.
Definition at line 92 of file CSCTFTBEventHeader.h.
References l1a_lsb_, and l1a_msb_.
Referenced by operator<<().
unsigned int CSCTFTBEventHeader::getNumActiveFront | ( | ) | const |
Calculate number of active front FPGAs.
Definition at line 115 of file CSCTFTBEventHeader.cc.
References act_ffpga_, i, and funct::num().
Referenced by operator<<().
00116 { 00117 unsigned int num = 0; 00118 00119 for(int i=0;i<5;i++) 00120 { 00121 if(act_ffpga_&(1<<i)) num++; 00122 } 00123 return num; 00124 }
unsigned int CSCTFTBEventHeader::getPtLutSpy | ( | ) | const [inline] |
PT LUT Spy flag 0 = no track, 1 = 1st track, 2 = 2nd, 3 = 3rd.
Definition at line 128 of file CSCTFTBEventHeader.h.
References pt_lut_spy_.
Referenced by operator<<(), and CSCTFTBSPBlock::unpackData().
00128 { return pt_lut_spy_;}
unsigned int CSCTFTBEventHeader::getZeroSupp | ( | ) | const [inline] |
Zero Supp word.
Definition at line 98 of file CSCTFTBEventHeader.h.
References zero_supp_.
Referenced by operator<<(), CSCTFTBSPBlock::unpackData(), and CSCTFTBFrontBlock::unpackData().
00098 {return zero_supp_;}
int CSCTFTBEventHeader::numBX | ( | ) | const [inline] |
number of BX read out per link
Definition at line 137 of file CSCTFTBEventHeader.h.
References num_bx_.
Referenced by operator<<(), and CSCTFTBEventData::unpackData().
00137 {return num_bx_;}
int CSCTFTBEventHeader::numLinks | ( | ) | const [inline] |
number of links to read out per MPC connection
Definition at line 131 of file CSCTFTBEventHeader.h.
References nLinks_.
Referenced by operator<<(), and CSCTFTBFrontBlock::unpackData().
00131 {return nLinks_;}
int CSCTFTBEventHeader::numMPC | ( | ) | const [inline] |
number of MPC connections to read out
Definition at line 134 of file CSCTFTBEventHeader.h.
References nMPC_.
Referenced by operator<<(), and CSCTFTBFrontBlock::unpackData().
00134 {return nMPC_;}
static unsigned CSCTFTBEventHeader::size | ( | void | ) | [inline, static] |
Definition at line 143 of file CSCTFTBEventHeader.h.
References size_.
Referenced by CSCTFTBEventHeader(), and CSCTFTBEventData::unpackData().
00143 {return size_;}
friend class CSCTFTBEventData [friend] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const CSCTFTBEventHeader & | header | |||
) | [friend] |
pretty-print
Definition at line 131 of file CSCTFTBEventHeader.cc.
00131 { 00132 stream << std::dec <<"Event Header for L1A " << header.getLvl1num()<<" :\n" 00133 << " BX " << header.getBXnum() << std::endl 00134 << " " << header.numMPC() << " MPC(s)" 00135 << " with " << header.numLinks() << " links per MPC.\n" 00136 << " There are " << header.numBX() << " BX in this event." << std::endl; 00137 if(header.getZeroSupp()) stream << " Zero Suppression is active.\n"; 00138 if(header.getActiveDT()) stream << " DT is active.\n"; 00139 if(header.getPtLutSpy()) 00140 stream << " PT LUT data present on link " << header.getPtLutSpy()<<".\n"; 00141 if(header.getActiveFront()) 00142 { 00143 stream << " There are "<<header.getNumActiveFront()<<" active front FPGAs." <<std::endl; 00144 } 00145 stream<<std::hex; 00146 return stream; 00147 }
unsigned CSCTFTBEventHeader::act_DT_ [private] |
unsigned CSCTFTBEventHeader::act_ffpga_ [private] |
Definition at line 154 of file CSCTFTBEventHeader.h.
Referenced by getActiveFront(), getActiveFrontFPGA1(), getActiveFrontFPGA2(), getActiveFrontFPGA3(), getActiveFrontFPGA4(), getActiveFrontFPGA5(), and getNumActiveFront().
unsigned CSCTFTBEventHeader::bunch_cntr_ [private] |
Definition at line 159 of file CSCTFTBEventHeader.h.
Referenced by getBXnum(), and CSCTFTBEventData::setEventInformation().
unsigned CSCTFTBEventHeader::key1_ [private] |
unsigned CSCTFTBEventHeader::key2_ [private] |
unsigned CSCTFTBEventHeader::key3_ [private] |
unsigned CSCTFTBEventHeader::key4_ [private] |
unsigned CSCTFTBEventHeader::l1a_lsb_ [private] |
Definition at line 162 of file CSCTFTBEventHeader.h.
Referenced by getLvl1num(), and CSCTFTBEventData::setEventInformation().
unsigned CSCTFTBEventHeader::l1a_msb_ [private] |
Definition at line 165 of file CSCTFTBEventHeader.h.
Referenced by getLvl1num(), and CSCTFTBEventData::setEventInformation().
const unsigned CSCTFTBEventHeader::nLinks_ = 3 [static, private] |
const unsigned CSCTFTBEventHeader::nMPC_ = 5 [static, private] |
unsigned CSCTFTBEventHeader::num_bx_ [private] |
unsigned CSCTFTBEventHeader::pt_lut_spy_ [private] |
const unsigned CSCTFTBEventHeader::size_ = 4 [static, private] |
unsigned CSCTFTBEventHeader::zero_supp_ [private] |