#include <EventFilter/CSCTFRawToDigi/old/CSCTFTBFrontHeader.h>
Public Member Functions | |
bool | check () const |
Simple data integrity check. | |
CSCTFTBFrontHeader (const CSCTFTBFrontHeader &) | |
CSCTFTBFrontHeader () | |
unsigned | getSEBit (unsigned int frontFPGA, unsigned int link) const |
Synch Error for given link. | |
unsigned | getVPBit (unsigned int frontFPGA, unsigned int link) const |
Valid Pattern for given link. | |
unsigned | synchError () const |
Synch Error word (15 links/bits). | |
unsigned | validPattern () const |
Valid Pattern word (15 links/bits). | |
~CSCTFTBFrontHeader () | |
Static Public Member Functions | |
static unsigned | size () |
size of data bank in 16-bit words | |
Private Attributes | |
unsigned | synch_err_:15 |
unsigned | vld_patrn_:15 |
unsigned | zero1_:1 |
unsigned | zero2_:1 |
Static Private Attributes | |
static const unsigned | size_ = 2 |
Friends | |
class | CSCTFTBFrontBlock |
std::ostream & | operator<< (std::ostream &stream, const CSCTFTBFrontHeader &) |
pretty-print |
Definition at line 28 of file CSCTFTBFrontHeader.h.
CSCTFTBFrontHeader::CSCTFTBFrontHeader | ( | ) |
CSCTFTBFrontHeader::CSCTFTBFrontHeader | ( | const CSCTFTBFrontHeader & | parent | ) |
Definition at line 41 of file CSCTFTBFrontHeader.cc.
References size().
00042 { 00043 memcpy(this,&parent,size()*sizeof(unsigned short)); 00044 }
CSCTFTBFrontHeader::~CSCTFTBFrontHeader | ( | ) |
bool CSCTFTBFrontHeader::check | ( | ) | const [inline] |
Synch Error for given link.
Definition at line 59 of file CSCTFTBFrontHeader.cc.
References synch_err_.
00060 { 00061 frontFPGA = (frontFPGA >5 || frontFPGA < 1) ? 1 : frontFPGA; 00062 link = (link >3 || link < 1) ? 1 : link; 00063 unsigned shift = ( (frontFPGA-1)*3 + (link-1) ); 00064 return (synch_err_ & (1<<shift)) >> shift; 00065 }
Valid Pattern for given link.
Definition at line 50 of file CSCTFTBFrontHeader.cc.
References vld_patrn_.
Referenced by CSCTFTBFrontBlock::frontDigiData(), and CSCTFTBFrontBlock::unpackData().
00051 { 00052 frontFPGA = (frontFPGA >5 || frontFPGA < 1) ? 1 : frontFPGA; 00053 link = (link >3 || link < 1) ? 1 : link; 00054 unsigned shift = ( (frontFPGA-1)*3 + (link-1) ); 00055 return (vld_patrn_ & (1<<shift)) >> shift; 00056 }
static unsigned CSCTFTBFrontHeader::size | ( | void | ) | [inline, static] |
size of data bank in 16-bit words
Definition at line 63 of file CSCTFTBFrontHeader.h.
References size_.
Referenced by CSCTFTBFrontHeader(), and CSCTFTBFrontBlock::unpackData().
00063 {return size_;};
unsigned CSCTFTBFrontHeader::synchError | ( | ) | const [inline] |
Synch Error word (15 links/bits).
Definition at line 54 of file CSCTFTBFrontHeader.h.
References synch_err_.
Referenced by operator<<().
00054 {return synch_err_;}
unsigned CSCTFTBFrontHeader::validPattern | ( | ) | const [inline] |
Valid Pattern word (15 links/bits).
Definition at line 48 of file CSCTFTBFrontHeader.h.
References vld_patrn_.
Referenced by operator<<().
00048 {return vld_patrn_;}
friend class CSCTFTBFrontBlock [friend] |
Definition at line 67 of file CSCTFTBFrontHeader.h.
std::ostream& operator<< | ( | std::ostream & | stream, | |
const CSCTFTBFrontHeader & | hdr | |||
) | [friend] |
pretty-print
Definition at line 67 of file CSCTFTBFrontHeader.cc.
00068 { 00069 if(hdr.validPattern()) 00070 { 00071 stream << "\tFront Header Data:\n"; 00072 stream << "\t Valid Pattern Bits : " << std::hex << hdr.validPattern() 00073 << std::endl; 00074 stream << "\t Synch Error Bits : " << std::hex << hdr.synchError() 00075 <<std::endl; 00076 } 00077 return stream; 00078 }
const unsigned CSCTFTBFrontHeader::size_ = 2 [static, private] |
unsigned CSCTFTBFrontHeader::synch_err_ [private] |
unsigned CSCTFTBFrontHeader::vld_patrn_ [private] |
unsigned CSCTFTBFrontHeader::zero1_ [private] |
unsigned CSCTFTBFrontHeader::zero2_ [private] |