CMS 3D CMS Logo

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< CSCVTMBHeaderFormattheHeaderFormat
 

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.

References theHeaderFormat.

20  :
22  theFirmwareVersion(firmwareVersion)
23 {
24  if(firmwareVersion == 2013)
25  {
26  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2013());
27  }
28  else if(firmwareVersion == 2006)
29  {
30  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2006());
31  }
32  else if(firmwareVersion == 2007)
33  {
34 
35  /* Checks for TMB2007 firmware revisions ranges to detect data format
36  * rev.0x50c3 - first revision with changed format
37  * rev.0x42D5 - oldest known from 06/21/2007
38  * There is 4-bits year value rollover in revision number (0 in 2016)
39  */
40  if((firmwareRevision >= 0x50c3) || (firmwareRevision < 0x42D5))
41  {
42  // if (firmwareRevision >= 0x7a76) // First OTMB firmware revision with 2013 format
43  /* Revisions > 0x6000 - OTMB firmwares, < 0x42D5 - new TMB revisions in 2016 */
44  if ((firmwareRevision >= 0x6000) || (firmwareRevision < 0x42D5))
45  {
46  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2013());
47  }
48  else
49  {
50  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007_rev0x50c3());
51  }
52  }
53  else
54  {
55  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007());
56  }
57  }
58  else
59  {
60  edm::LogError("CSCTMBHeader|CSCRawToDigi") <<"failed to determine TMB firmware version!!";
61  }
62 }
int theFirmwareVersion
Definition: CSCTMBHeader.h:164
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
CSCTMBHeader::CSCTMBHeader ( const CSCTMBStatusDigi digi)
CSCTMBHeader::CSCTMBHeader ( const unsigned short *  buf)

first determine the format

Definition at line 68 of file CSCTMBHeader.cc.

References theFirmwareVersion, and theHeaderFormat.

69  : theHeaderFormat()
70 {
72  if (buf[0]==0xDB0C)
73  {
74  theFirmwareVersion=2007;
75  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007(buf));
76  /* Checks for TMB2007 firmware revisions ranges to detect data format
77  * rev.0x50c3 - first revision with changed format
78  * rev.0x42D5 - oldest known from 06/21/2007
79  * There is 4-bits year value rollover in revision number (0 in 2016)
80  */
81  if ((theHeaderFormat->firmwareRevision() >= 0x50c3) || (theHeaderFormat->firmwareRevision() < 0x42D5))
82  {
83  // if (theHeaderFormat->firmwareRevision() >= 0x7a76) // First OTMB firmware revision with 2013 format
84  /* Revisions > 0x6000 - OTMB firmwares, < 0x42D5 - new TMB revisions in 2016 */
85  if ((theHeaderFormat->firmwareRevision() >= 0x6000) || (theHeaderFormat->firmwareRevision() < 0x42D5))
86  {
87  theFirmwareVersion=2013;
88  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2013(buf));
89  }
90  else
91  {
92  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007_rev0x50c3(buf));
93  }
94  }
95 
96  }
97  else if (buf[0]==0x6B0C)
98  {
99  theFirmwareVersion=2006;
100  theHeaderFormat = boost::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2006(buf));
101  }
102  else
103  {
104  edm::LogError("CSCTMBHeader|CSCRawToDigi") <<"failed to determine TMB firmware version!!";
105  }
106 }
int theFirmwareVersion
Definition: CSCTMBHeader.h:164
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163

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.

References addCLCT0(), and addCLCT1().

Referenced by CSCEventData::add(), addCorrelatedLCT1(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

143 {
144  // sort???
145  if(!digis.empty()) {
146  addCLCT0(digis[0]);
147 
148  }
149  if(digis.size() > 1) addCLCT1(digis[1]);
150 }
void addCLCT1(const CSCCLCTDigi &digi)
Definition: CSCTMBHeader.h:133
void addCLCT0(const CSCCLCTDigi &digi)
Needed before data packing.
Definition: CSCTMBHeader.h:132
void CSCTMBHeader::add ( const std::vector< CSCCorrelatedLCTDigi > &  digis)

Definition at line 152 of file CSCTMBHeader.cc.

References addCorrelatedLCT0(), and addCorrelatedLCT1().

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

153 {
154  // sort???
155  if(!digis.empty()) addCorrelatedLCT0(digis[0]);
156  if(digis.size() > 1) addCorrelatedLCT1(digis[1]);
157 }
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi)
Definition: CSCTMBHeader.h:136
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi)
Definition: CSCTMBHeader.h:139
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.

Referenced by add(), and selfTest().

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.

Referenced by add(), and selfTest().

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.

Referenced by add(), and selfTest().

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 add(), debug, operator<<, selfTest(), and theHeaderFormat.

Referenced by add(), and selfTest().

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.

Referenced by CSCOfflineMonitor::doBXMonitor(), CSCValidation::doTimeMonitoring(), and cscdqm::EventProcessor::processCSC().

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.

Referenced by cscdqm::EventProcessor::processCSC().

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.

Referenced by cscdqm::EventProcessor::processCSC().

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.

Referenced by cscdqm::EventProcessor::processCSC().

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.

Referenced by CSCOfflineMonitor::doBXMonitor(), CSCValidation::doTimeMonitoring(), and cscdqm::EventProcessor::processCSC().

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.

Referenced by CSCTMBData::UnpackTMB().

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.

Referenced by cscdqm::EventProcessor::processCSC(), selfTest(), and CSCEventData::selfTest().

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.

Referenced by cscdqm::EventProcessor::processCSC().

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.

Referenced by selfTest(), and CSCEventData::selfTest().

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.

Referenced by CSCTMBData::pack(), and selfTest().

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.

Referenced by CSCCLCTData::CSCCLCTData(), and CSCTMBData::UnpackTMB().

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.

Referenced by cscdqm::EventProcessor::processCSC().

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.

Referenced by cscdqm::EventProcessor::processCSC(), and CSCTMBData::UnpackTMB().

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.

Referenced by CSCTMBData::UnpackTMB().

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.

References addCLCT0(), addCLCT1(), addCorrelatedLCT0(), addCorrelatedLCT1(), CLCTDigis(), CorrelatedLCTDigis(), gather_cfg::cout, cscPackerCompare(), data(), debug, DetId::rawId(), and relativeConstraints::station.

Referenced by addCorrelatedLCT1().

203 {
204  static bool debug = false;
205 
206  // tests packing and unpacking
207  for(int station = 1; station <= 4; ++station)
208  {
209  for(int iendcap = 1; iendcap <= 2; ++iendcap)
210  {
211  CSCDetId detId(iendcap, station, 1, 1, 0);
212 
213  // the next-to-last is the BX, which only gets
214  // saved in two bits and must be the same for clct0 and clct1.
215  //CSCCLCTDigi clct0(1, 1, 4, 0, 0, 30, 3, 0, 1); // valid for 2006
216  // In 2007 firmware, there are no distrips, so the 4th argument (strip
217  // type) should always be set to 1 (halfstrips).
218  CSCCLCTDigi clct0(1, 1, 4, 1, 0, 30, 4, 2, 1); // valid for 2007
219  CSCCLCTDigi clct1(1, 1, 2, 1, 1, 31, 1, 2, 2);
220 
221  // BX of LCT (8th argument) is 1-bit word (the least-significant bit
222  // of ALCT's bx).
223  CSCCorrelatedLCTDigi lct0(1, 1, 2, 10, 98, 5, 0, 1, 0, 0, 0, 0);
224  CSCCorrelatedLCTDigi lct1(2, 1, 2, 20, 15, 9, 1, 0, 0, 0, 0, 0);
225 
226  CSCTMBHeader tmbHeader(2007, 0x50c3);
227  tmbHeader.addCLCT0(clct0);
228  tmbHeader.addCLCT1(clct1);
229  tmbHeader.addCorrelatedLCT0(lct0);
230  tmbHeader.addCorrelatedLCT1(lct1);
231  std::vector<CSCCLCTDigi> clcts = tmbHeader.CLCTDigis(detId.rawId());
232  // guess they got reordered
233  assert(cscPackerCompare(clcts[0],clct0));
234  assert(cscPackerCompare(clcts[1],clct1));
235  if (debug)
236  {
237  std::cout << "Match for: " << clct0 << "\n";
238  std::cout << " " << clct1 << "\n \n";
239  }
240 
241  std::vector<CSCCorrelatedLCTDigi> lcts = tmbHeader.CorrelatedLCTDigis(detId.rawId());
242  assert(cscPackerCompare(lcts[0], lct0));
243  assert(cscPackerCompare(lcts[1], lct1));
244  if (debug)
245  {
246  std::cout << "Match for: " << lct0 << "\n";
247  std::cout << " " << lct1 << "\n";
248  }
249 
250  // try packing and re-packing, to make sure they're the same
251  unsigned short int * data = tmbHeader.data();
252  CSCTMBHeader newHeader(data);
253  clcts = newHeader.CLCTDigis(detId.rawId());
254  assert(cscPackerCompare(clcts[0],clct0));
255  assert(cscPackerCompare(clcts[1],clct1));
256  lcts = newHeader.CorrelatedLCTDigis(detId.rawId());
257  assert(cscPackerCompare(lcts[0], lct0));
258  assert(cscPackerCompare(lcts[1], lct1));
259 
260 
261  }
262  }
263 }
unsigned short * data()
Definition: CSCTMBHeader.h:117
static std::atomic< bool > debug
Definition: CSCTMBHeader.h:160
bool cscPackerCompare(const T &t1, const T &t2)
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.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

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.

Referenced by CSCEventData::checkTMBClasses(), and CSCEventData::setEventInformation().

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.

Referenced by CSCEventData::checkTMBClasses(), CSCTMBData::CSCTMBData(), and CSCEventData::setEventInformation().

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, tmbHeader2006(), tmbHeader2007(), tmbHeader2007_rev0x50c3(), and tmbHeader2013().

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.

Referenced by CSCTMBData::CSCTMBData(), CSCTMBData::pack(), and CSCTMBData::UnpackTMB().

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.

References Exception, mps_fire::result, and theHeaderFormat.

Referenced by sizeInBytes().

192 {
193  CSCTMBHeader2006 * result = dynamic_cast<CSCTMBHeader2006 *>(theHeaderFormat.get());
194  if(result == nullptr)
195  {
196  throw cms::Exception("Could not get 2006 TMB header format");
197  }
198  return *result;
199 }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
CSCTMBHeader2007 CSCTMBHeader::tmbHeader2007 ( ) const

will throw if the cast fails

Definition at line 160 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

Referenced by sizeInBytes().

161 {
162  CSCTMBHeader2007 * result = dynamic_cast<CSCTMBHeader2007 *>(theHeaderFormat.get());
163  if(result == nullptr)
164  {
165  throw cms::Exception("Could not get 2007 TMB header format");
166  }
167  return *result;
168 }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
CSCTMBHeader2007_rev0x50c3 CSCTMBHeader::tmbHeader2007_rev0x50c3 ( ) const

Definition at line 170 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

Referenced by sizeInBytes().

171 {
173  if(result == nullptr)
174  {
175  throw cms::Exception("Could not get 2007 rev0x50c3 TMB header format");
176  }
177  return *result;
178 }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
CSCTMBHeader2013 CSCTMBHeader::tmbHeader2013 ( ) const

Definition at line 180 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

Referenced by sizeInBytes().

181 {
182  CSCTMBHeader2013 * result = dynamic_cast<CSCTMBHeader2013 *>(theHeaderFormat.get());
183  if(result == nullptr)
184  {
185  throw cms::Exception("Could not get 2013 TMB header format");
186  }
187  return *result;
188 }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163
uint16_t CSCTMBHeader::TMBMatch ( ) const
inline

Definition at line 54 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by cscdqm::EventProcessor::processCSC().

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.

Referenced by addCorrelatedLCT1().

267 {
268  hdr.theHeaderFormat->print(os);
269  return os;
270 }
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:163

Member Data Documentation

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

Definition at line 164 of file CSCTMBHeader.h.

Referenced by CSCTMBHeader(), and FirmwareVersion().

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