CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | Friends
CSCTMBHeader Class Reference

#include <CSCTMBHeader.h>

Public Member Functions

void add (const std::vector< CSCCLCTDigi > &digis)
 these methods need more brains to figure which one goes first More...
 
void add (const std::vector< CSCCorrelatedLCTDigi > &digis)
 
void addALCT0 (const CSCALCTDigi &digi)
 
void addALCT1 (const CSCALCTDigi &digi)
 
void addCLCT0 (const CSCCLCTDigi &digi)
 Needed before data packing. More...
 
void addCLCT1 (const CSCCLCTDigi &digi)
 
void addCorrelatedLCT0 (const CSCCorrelatedLCTDigi &digi)
 
void addCorrelatedLCT1 (const CSCCorrelatedLCTDigi &digi)
 
uint16_t ALCTMatchTime () const
 
uint16_t ALCTOnly () const
 
uint16_t Bxn0Diff () const
 
uint16_t Bxn1Diff () const
 
uint16_t BXNCount () const
 
bool check () const
 
std::vector< CSCCLCTDigiCLCTDigis (uint32_t idlayer)
 returns CLCT digis More...
 
uint16_t CLCTOnly () const
 
std::vector< CSCCorrelatedLCTDigiCorrelatedLCTDigis (uint32_t idlayer) const
 returns CorrelatedLCT digis More...
 
 CSCTMBHeader (int firmwareVersion, int firmwareRevision)
 
 CSCTMBHeader (const CSCTMBStatusDigi &digi)
 
 CSCTMBHeader (const unsigned short *buf)
 
unsigned short * data ()
 
int FirmwareRevision () const
 
int FirmwareVersion () const
 
uint16_t L1ANumber () const
 
uint16_t NCFEBs () const
 
unsigned short int NHeaderFrames () const
 
uint16_t NTBins () const
 
void setEventInformation (const CSCDMBHeader &dmbHeader)
 fills fields like bxn and l1a More...
 
void setNCFEBs (uint16_t ncfebs)
 
uint16_t sizeInBytes () const
 
unsigned short int sizeInWords () const
 
uint16_t syncError () const
 
uint16_t syncErrorCLCT () const
 
uint16_t syncErrorMPC0 () const
 
uint16_t syncErrorMPC1 () const
 
CSCTMBHeader2006 tmbHeader2006 () const
 
CSCTMBHeader2007 tmbHeader2007 () const
 will throw if the cast fails More...
 
CSCTMBHeader2007_rev0x50c3 tmbHeader2007_rev0x50c3 () const
 
CSCTMBHeader2013 tmbHeader2013 () const
 
uint16_t TMBMatch () const
 

Static Public Member Functions

static void selfTest ()
 tests that packing and unpacking give same results More...
 
static void setDebug (const bool value)
 

Private Attributes

int theFirmwareVersion
 
boost::shared_ptr
< CSCVTMBHeaderFormat
theHeaderFormat
 

Static Private Attributes

static std::atomic< bool > debug {false}
 

Friends

std::ostream & operator<< (std::ostream &os, const CSCTMBHeader &hdr)
 

Detailed Description

Definition at line 25 of file CSCTMBHeader.h.

Constructor & Destructor Documentation

CSCTMBHeader::CSCTMBHeader ( int  firmwareVersion,
int  firmwareRevision 
)

Definition at line 20 of file CSCTMBHeader.cc.

CSCTMBHeader::CSCTMBHeader ( const CSCTMBStatusDigi digi)
CSCTMBHeader::CSCTMBHeader ( const unsigned short *  buf)

first determine the format

Definition at line 68 of file CSCTMBHeader.cc.

Member Function Documentation

void CSCTMBHeader::add ( const std::vector< CSCCLCTDigi > &  digis)

these methods need more brains to figure which one goes first

Definition at line 142 of file CSCTMBHeader.cc.

Referenced by counter.Counter::register().

void CSCTMBHeader::add ( const std::vector< CSCCorrelatedLCTDigi > &  digis)

Definition at line 152 of file CSCTMBHeader.cc.

Referenced by counter.Counter::register().

void CSCTMBHeader::addALCT0 ( const CSCALCTDigi digi)
inline

Definition at line 134 of file CSCTMBHeader.h.

References theHeaderFormat.

134 {theHeaderFormat->addALCT0(digi);}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::addALCT1 ( const CSCALCTDigi digi)
inline

Definition at line 135 of file CSCTMBHeader.h.

References theHeaderFormat.

135 {theHeaderFormat->addALCT1(digi);}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::addCLCT0 ( const CSCCLCTDigi digi)
inline

Needed before data packing.

for data packing

Definition at line 132 of file CSCTMBHeader.h.

References theHeaderFormat.

132 {theHeaderFormat->addCLCT0(digi);}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::addCLCT1 ( const CSCCLCTDigi digi)
inline

Definition at line 133 of file CSCTMBHeader.h.

References theHeaderFormat.

133 {theHeaderFormat->addCLCT1(digi);}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::addCorrelatedLCT0 ( const CSCCorrelatedLCTDigi digi)
inline

Definition at line 136 of file CSCTMBHeader.h.

References theHeaderFormat.

136  {
137  theHeaderFormat->addCorrelatedLCT0(digi);
138  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::addCorrelatedLCT1 ( const CSCCorrelatedLCTDigi digi)
inline

Definition at line 139 of file CSCTMBHeader.h.

References theHeaderFormat.

139  {
140  theHeaderFormat->addCorrelatedLCT1(digi);
141  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::ALCTMatchTime ( ) const
inline

Definition at line 45 of file CSCTMBHeader.h.

References theHeaderFormat.

45  {
46  return theHeaderFormat->ALCTMatchTime();
47  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::ALCTOnly ( ) const
inline

Definition at line 51 of file CSCTMBHeader.h.

References theHeaderFormat.

51  {
52  return theHeaderFormat->ALCTOnly();
53  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::Bxn0Diff ( ) const
inline

Definition at line 58 of file CSCTMBHeader.h.

References theHeaderFormat.

58  {
59  return theHeaderFormat->Bxn0Diff();
60  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::Bxn1Diff ( ) const
inline

Definition at line 61 of file CSCTMBHeader.h.

References theHeaderFormat.

61  {
62  return theHeaderFormat->Bxn1Diff();
63  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::BXNCount ( ) const
inline

Definition at line 42 of file CSCTMBHeader.h.

References theHeaderFormat.

42  {
43  return theHeaderFormat->BXNCount();
44  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
bool CSCTMBHeader::check ( ) const
inline

Definition at line 124 of file CSCTMBHeader.h.

References theHeaderFormat.

124  {
125  return theHeaderFormat->check();
126  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
std::vector<CSCCLCTDigi> CSCTMBHeader::CLCTDigis ( uint32_t  idlayer)
inline

returns CLCT digis

Definition at line 98 of file CSCTMBHeader.h.

References theHeaderFormat.

99  {
100  return theHeaderFormat->CLCTDigis(idlayer);
101  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::CLCTOnly ( ) const
inline

Definition at line 48 of file CSCTMBHeader.h.

References theHeaderFormat.

48  {
49  return theHeaderFormat->CLCTOnly();
50  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
std::vector<CSCCorrelatedLCTDigi> CSCTMBHeader::CorrelatedLCTDigis ( uint32_t  idlayer) const
inline

returns CorrelatedLCT digis

Definition at line 104 of file CSCTMBHeader.h.

References theHeaderFormat.

105  {
106  return theHeaderFormat->CorrelatedLCTDigis(idlayer);
107  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
unsigned short* CSCTMBHeader::data ( )
inline

Definition at line 117 of file CSCTMBHeader.h.

References theHeaderFormat.

117  {
118  return theHeaderFormat->data();
119  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
int CSCTMBHeader::FirmwareRevision ( ) const
inline

Definition at line 39 of file CSCTMBHeader.h.

References theHeaderFormat.

39 {return theHeaderFormat->firmwareRevision();}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
int CSCTMBHeader::FirmwareVersion ( ) const
inline

Definition at line 38 of file CSCTMBHeader.h.

References theFirmwareVersion.

38 {return theFirmwareVersion;}
int theFirmwareVersion
Definition: CSCTMBHeader.h:164
uint16_t CSCTMBHeader::L1ANumber ( ) const
inline

Definition at line 65 of file CSCTMBHeader.h.

References theHeaderFormat.

65  {
66  return theHeaderFormat->L1ANumber();
67  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::NCFEBs ( ) const
inline

Definition at line 82 of file CSCTMBHeader.h.

References theHeaderFormat.

82  {
83  return theHeaderFormat->NCFEBs();
84  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
unsigned short int CSCTMBHeader::NHeaderFrames ( ) const
inline

Definition at line 113 of file CSCTMBHeader.h.

References theHeaderFormat.

113  {
114  return theHeaderFormat->NHeaderFrames();
115  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::NTBins ( ) const
inline

Definition at line 79 of file CSCTMBHeader.h.

References theHeaderFormat.

79  {
80  return theHeaderFormat->NTBins();
81  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::selfTest ( )
static

tests that packing and unpacking give same results

Definition at line 202 of file CSCTMBHeader.cc.

static void CSCTMBHeader::setDebug ( const bool  value)
inlinestatic

turns on/off debug flag for this class

Definition at line 122 of file CSCTMBHeader.h.

References debug, and relativeConstraints::value.

122 {debug = value;}
static std::atomic< bool > debug
Definition: CSCTMBHeader.h:160
void CSCTMBHeader::setEventInformation ( const CSCDMBHeader dmbHeader)
inline

fills fields like bxn and l1a

Definition at line 33 of file CSCTMBHeader.h.

References theHeaderFormat.

34  {
35  theHeaderFormat->setEventInformation(dmbHeader);
36  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
void CSCTMBHeader::setNCFEBs ( uint16_t  ncfebs)
inline

Definition at line 92 of file CSCTMBHeader.h.

References theHeaderFormat.

92  {
93  theHeaderFormat->setNCFEBs(ncfebs);
94  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::sizeInBytes ( ) const
inline

Definition at line 69 of file CSCTMBHeader.h.

References theHeaderFormat.

69  {
70  return theHeaderFormat->sizeInWords()*2;
71  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
unsigned short int CSCTMBHeader::sizeInWords ( ) const
inline

in 16-bit words. Add olne because we include beginning(b0c) and end (e0c) flags

Definition at line 111 of file CSCTMBHeader.h.

References theHeaderFormat.

111 {return theHeaderFormat->sizeInWords();}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::syncError ( ) const
inline

Definition at line 86 of file CSCTMBHeader.h.

References theHeaderFormat.

86 { return theHeaderFormat->syncError();}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::syncErrorCLCT ( ) const
inline

Definition at line 87 of file CSCTMBHeader.h.

References theHeaderFormat.

87 { return theHeaderFormat->syncErrorCLCT();}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::syncErrorMPC0 ( ) const
inline

Definition at line 88 of file CSCTMBHeader.h.

References theHeaderFormat.

88 { return theHeaderFormat->syncErrorMPC0();}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::syncErrorMPC1 ( ) const
inline

Definition at line 89 of file CSCTMBHeader.h.

References theHeaderFormat.

89 { return theHeaderFormat->syncErrorMPC1();}
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
CSCTMBHeader2006 CSCTMBHeader::tmbHeader2006 ( ) const

Definition at line 191 of file CSCTMBHeader.cc.

CSCTMBHeader2007 CSCTMBHeader::tmbHeader2007 ( ) const

will throw if the cast fails

Definition at line 160 of file CSCTMBHeader.cc.

CSCTMBHeader2007_rev0x50c3 CSCTMBHeader::tmbHeader2007_rev0x50c3 ( ) const

Definition at line 170 of file CSCTMBHeader.cc.

CSCTMBHeader2013 CSCTMBHeader::tmbHeader2013 ( ) const

Definition at line 180 of file CSCTMBHeader.cc.

uint16_t CSCTMBHeader::TMBMatch ( ) const
inline

Definition at line 54 of file CSCTMBHeader.h.

References theHeaderFormat.

54  {
55  return theHeaderFormat->TMBMatch();
56  }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CSCTMBHeader hdr 
)
friend

Definition at line 266 of file CSCTMBHeader.cc.

Member Data Documentation

std::atomic< bool > CSCTMBHeader::debug {false}
staticprivate

Definition at line 160 of file CSCTMBHeader.h.

Referenced by setDebug().

int CSCTMBHeader::theFirmwareVersion
private

Definition at line 164 of file CSCTMBHeader.h.

Referenced by FirmwareVersion().

boost::shared_ptr<CSCVTMBHeaderFormat> CSCTMBHeader::theHeaderFormat
private