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 add (const std::vector< CSCShowerDigi > &digis)
 
void addALCT0 (const CSCALCTDigi &digi)
 
void addALCT1 (const CSCALCTDigi &digi)
 
void addAnodeShower (const CSCShowerDigi &digi)
 
void addCathodeShower (const CSCShowerDigi &digi)
 
void addCLCT0 (const CSCCLCTDigi &digi)
 for data packing More...
 
void addCLCT1 (const CSCCLCTDigi &digi)
 
void addCorrelatedLCT0 (const CSCCorrelatedLCTDigi &digi)
 
void addCorrelatedLCT1 (const CSCCorrelatedLCTDigi &digi)
 
void addShower (const CSCShowerDigi &digi)
 
uint16_t alctHMT () const
 
uint16_t ALCTMatchTime () const
 
uint16_t ALCTOnly () const
 
CSCShowerDigi anodeShowerDigi (uint32_t idlayer) const
 returns Run3 anode Shower Digi for HMT More...
 
uint16_t Bxn0Diff () const
 
uint16_t Bxn1Diff () const
 
uint16_t BXNCount () const
 
CSCShowerDigi cathodeShowerDigi (uint32_t idlayer) const
 returns Run3 cathode Shower Digi for HMT More...
 
bool check () const
 
uint16_t clct0_ComparatorCode () const
 == Run 3 CSC-GEM Trigger Format More...
 
uint16_t clct0_xky () const
 
uint16_t clct1_ComparatorCode () const
 
uint16_t clct1_xky () const
 
std::vector< CSCCLCTDigiCLCTDigis (uint32_t idlayer)
 returns CLCT digis More...
 
uint16_t clctHMT () const
 
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 gem_enabled_fibers () const
 
uint16_t gem_fifo_pretrig () const
 
uint16_t gem_fifo_tbins () const
 
uint16_t gem_sync_dataword () const
 
uint16_t gem_timing_dataword () const
 
uint16_t gem_zero_suppress () const
 
uint16_t hmt_ALCTMatchTime () const
 
uint16_t hmt_nhits () const
 
uint16_t L1AMatchTime () const
 
uint16_t L1ANumber () const
 
uint16_t NCFEBs () const
 
unsigned short int NHeaderFrames () const
 
uint16_t NTBins () const
 
uint16_t run3_CLCT_patternID () const
 
void setALCTMatchTime (uint16_t alctmatchtime)
 
void setEventInformation (const CSCDMBHeader &dmbHeader)
 fills fields like bxn and l1a More...
 
void setNCFEBs (uint16_t ncfebs)
 
CSCShowerDigi showerDigi (uint32_t idlayer) const
 returns Run3 lct Shower Digi for HMT More...
 
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
 
CSCTMBHeader2020_CCLUT tmbHeader2020_CCLUT () const
 
CSCTMBHeader2020_GEM tmbHeader2020_GEM () const
 
CSCTMBHeader2020_Run2 tmbHeader2020_Run2 () const
 
CSCTMBHeader2020_TMB tmbHeader2020_TMB () const
 
uint16_t TMBMatch () const
 

Static Public Member Functions

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

Private Attributes

int theFirmwareVersion
 
std::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 31 of file CSCTMBHeader.h.

Constructor & Destructor Documentation

◆ CSCTMBHeader() [1/3]

CSCTMBHeader::CSCTMBHeader ( int  firmwareVersion,
int  firmwareRevision 
)

Copper TMB hybrid fw Run2 CLCT + Run3 LCT/MPC + anode-only HMT (March 2022)

Definition at line 24 of file CSCTMBHeader.cc.

References simCaloStage2Layer1Digis_cfi::firmwareVersion, and theHeaderFormat.

26  if (firmwareVersion == 2020) {
27  if ((firmwareRevision < 0x4000) && (firmwareRevision > 0x0)) { /* New (O)TMB firmware revision format */
28  bool isGEM_fw = false;
29  bool isCCLUT_HMT_fw = false;
30  bool isOTMB_Run2_fw = false;
31  bool isTMB_Run3_fw = false;
32  bool isTMB_Run2_fw = false;
33  bool isTMB_hybrid_fw = false;
34  bool isRun2_df = false;
35  unsigned df_version = (firmwareRevision >> 9) & 0xF; // 4-bits Data Format version
36  unsigned major_ver = (firmwareRevision >> 5) & 0xF; // 4-bits major version part
37  // unsigned minor_ver = firmwareRevision & 0x1F; // 5-bits minor version part
38  switch (df_version) {
39  case 0x4:
40  isTMB_hybrid_fw = true;
41  break;
42  case 0x3:
43  isGEM_fw = true;
44  break;
45  case 0x2:
46  isCCLUT_HMT_fw = true;
47  break;
48  case 0x1:
49  isOTMB_Run2_fw = true;
50  break;
51  case 0x0:
52  if (major_ver == 1)
53  isTMB_Run2_fw = true;
54  else
55  isTMB_Run3_fw = true;
56  break;
57  default:
58  isGEM_fw = true;
59  }
60  if (major_ver == 1) {
61  isRun2_df = true;
62  }
63 
64  if (isGEM_fw) {
65  if (isRun2_df) {
66  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_Run2(firmwareRevision));
67  } else {
68  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_GEM());
69  }
70  } else if (isCCLUT_HMT_fw) {
71  if (isRun2_df) {
72  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_Run2(firmwareRevision));
73  } else {
74  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_CCLUT());
75  }
76  } else if (isOTMB_Run2_fw || isTMB_Run2_fw || isRun2_df) {
77  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_Run2(firmwareRevision));
78  } else if (isTMB_Run3_fw) {
79  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_CCLUT());
80  } else if (isTMB_hybrid_fw) {
81  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_TMB());
82  }
83  }
84  } else if (firmwareVersion == 2013) {
85  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2013());
86  } else if (firmwareVersion == 2006) {
87  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2006());
88  } else if (firmwareVersion == 2007) {
89  /* Checks for TMB2007 firmware revisions ranges to detect data format
90  * rev.0x50c3 - first revision with changed format
91  * rev.0x42D5 - oldest known from 06/21/2007
92  * There is 4-bits year value rollover in revision number (0 in 2016)
93  */
94  if ((firmwareRevision >= 0x50c3) || (firmwareRevision < 0x42D5)) {
95  // if (firmwareRevision >= 0x7a76) // First OTMB firmware revision with 2013 format
96  /* Revisions > 0x6000 - OTMB firmwares, < 0x42D5 - new TMB revisions in 2016 */
97  if ((firmwareRevision >= 0x6000) || (firmwareRevision < 0x42D5)) {
98  bool isGEMfirmware = false;
99  /* There are OTMB2013 firmware versions exist, which reports firmwareRevision code = 0x0 */
100  if ((firmwareRevision < 0x4000) && (firmwareRevision > 0x0)) { /* New (O)TMB firmware revision format */
101  if (((firmwareRevision >> 9) & 0x3) == 0x3)
102  isGEMfirmware = true;
103  if (isGEMfirmware) {
104  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_GEM());
105  } else {
106  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2013());
107  }
108  }
109  } else {
110  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007_rev0x50c3());
111  }
112  } else {
113  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007());
114  }
115  } else {
116  edm::LogError("CSCTMBHeader|CSCRawToDigi") << "failed to determine TMB firmware version!!";
117  }
118 }
int theFirmwareVersion
Definition: CSCTMBHeader.h:156
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155
Log< level::Error, false > LogError

◆ CSCTMBHeader() [2/3]

CSCTMBHeader::CSCTMBHeader ( const CSCTMBStatusDigi digi)

◆ CSCTMBHeader() [3/3]

CSCTMBHeader::CSCTMBHeader ( const unsigned short *  buf)

first determine the format

Run3 ME11+GE11 OTMB fw with CCLUT and HMT

Run3 MEx1 OTMB fw with CCLUT and HMT

Run2-compatible data format OTMB fw with Run3 revision code format

Copper TMB hybrid fw Run2 CLCT + Run3 LCT/MPC + anode-only HMT (March 2022)

Definition at line 124 of file CSCTMBHeader.cc.

References visDQMUpload::buf, theFirmwareVersion, and theHeaderFormat.

124  : theHeaderFormat() {
126  if (buf[0] == 0xDB0C) {
127  theFirmwareVersion = 2007;
128  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007(buf));
129  /* Checks for TMB2007 firmware revisions ranges to detect data format
130  * rev.0x50c3 - first revision with changed format
131  * rev.0x42D5 - oldest known from 06/21/2007
132  * There is 4-bits year value rollover in revision number (0 in 2016)
133  */
134  if ((theHeaderFormat->firmwareRevision() >= 0x50c3) || (theHeaderFormat->firmwareRevision() < 0x42D5)) {
135  // if (theHeaderFormat->firmwareRevision() >= 0x7a76) // First OTMB firmware revision with 2013 format
136  /* Revisions > 0x6000 - OTMB firmwares, < 0x42D5 - new TMB revisions in 2016 */
137  if ((theHeaderFormat->firmwareRevision() >= 0x6000) || (theHeaderFormat->firmwareRevision() < 0x42D5)) {
138  theFirmwareVersion = 2013;
139  bool isGEM_fw = false;
140  bool isCCLUT_HMT_fw = false;
141  bool isOTMB_Run2_fw = false;
142  bool isTMB_Run3_fw = false;
143  bool isTMB_Run2_fw = false;
144  bool isTMB_hybrid_fw = false;
145  bool isRun2_df = false;
146  unsigned firmwareRevision = theHeaderFormat->firmwareRevision();
147  /* There are OTMB2013 firmware versions exist, which reports firmwareRevision code = 0x0 */
148  if ((firmwareRevision < 0x4000) && (firmwareRevision > 0x0)) { /* New (O)TMB firmware revision format */
149  theFirmwareVersion = 2020;
150  unsigned df_version = (firmwareRevision >> 9) & 0xF; // 4-bits Data Format version
151  unsigned major_ver = (firmwareRevision >> 5) & 0xF; // 4-bits major version part
152  // unsigned minor_ver = firmwareRevision & 0x1F; // 5-bits minor version part
153  switch (df_version) {
154  case 0x4:
155  isTMB_hybrid_fw = true;
156  break;
157  case 0x3:
158  isGEM_fw = true;
159  break;
160  case 0x2:
161  isCCLUT_HMT_fw = true;
162  break;
163  case 0x1:
164  isOTMB_Run2_fw = true;
165  break;
166  case 0x0:
167  if (major_ver == 1)
168  isTMB_Run2_fw = true;
169  else
170  isTMB_Run3_fw = true;
171  break;
172  default:
173  isGEM_fw = true;
174  }
175  if (major_ver == 1) {
176  isRun2_df = true;
177  }
178  }
179  if (theFirmwareVersion == 2020) {
180  if (isGEM_fw) {
181  if (isRun2_df) {
182  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_Run2(buf));
183  } else {
184  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_GEM(buf));
185  }
186  } else if (isCCLUT_HMT_fw) {
187  if (isRun2_df) {
188  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_Run2(buf));
189  } else {
190  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_CCLUT(buf));
191  }
192  } else if (isOTMB_Run2_fw || isTMB_Run2_fw || isRun2_df) {
193  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_Run2(buf));
194  } else if (isTMB_Run3_fw) {
195  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_CCLUT(buf));
196  } else if (isTMB_hybrid_fw) {
197  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2020_TMB(buf));
198  }
199 
200  } else {
201  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2013(buf));
202  }
203 
204  } else {
205  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2007_rev0x50c3(buf));
206  }
207  }
208 
209  } else if (buf[0] == 0x6B0C) {
210  theFirmwareVersion = 2006;
211  theHeaderFormat = std::shared_ptr<CSCVTMBHeaderFormat>(new CSCTMBHeader2006(buf));
212  } else {
213  edm::LogError("CSCTMBHeader|CSCRawToDigi") << "failed to determine TMB firmware version!!";
214  }
215 }
int theFirmwareVersion
Definition: CSCTMBHeader.h:156
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155
Log< level::Error, false > LogError

Member Function Documentation

◆ add() [1/3]

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

these methods need more brains to figure which one goes first

Definition at line 250 of file CSCTMBHeader.cc.

References addCLCT0(), and addCLCT1().

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

250  {
251  // sort???
252  if (!digis.empty()) {
253  addCLCT0(digis[0]);
254  }
255  if (digis.size() > 1)
256  addCLCT1(digis[1]);
257 }
void addCLCT1(const CSCCLCTDigi &digi)
Definition: CSCTMBHeader.h:124
void addCLCT0(const CSCCLCTDigi &digi)
for data packing
Definition: CSCTMBHeader.h:123

◆ add() [2/3]

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

Definition at line 259 of file CSCTMBHeader.cc.

References addCorrelatedLCT0(), and addCorrelatedLCT1().

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

259  {
260  // sort???
261  if (!digis.empty())
262  addCorrelatedLCT0(digis[0]);
263  if (digis.size() > 1)
264  addCorrelatedLCT1(digis[1]);
265 }
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi)
Definition: CSCTMBHeader.h:127
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi)
Definition: CSCTMBHeader.h:128

◆ add() [3/3]

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

Definition at line 267 of file CSCTMBHeader.cc.

References theHeaderFormat.

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

267  {
268  if (!digis.empty())
269  theHeaderFormat->addShower(digis[0]);
270 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addALCT0()

void CSCTMBHeader::addALCT0 ( const CSCALCTDigi digi)
inline

Definition at line 125 of file CSCTMBHeader.h.

References theHeaderFormat.

125 { theHeaderFormat->addALCT0(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addALCT1()

void CSCTMBHeader::addALCT1 ( const CSCALCTDigi digi)
inline

Definition at line 126 of file CSCTMBHeader.h.

References theHeaderFormat.

126 { theHeaderFormat->addALCT1(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addAnodeShower()

void CSCTMBHeader::addAnodeShower ( const CSCShowerDigi digi)
inline

Definition at line 132 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::addAnodeShower().

132 { theHeaderFormat->addAnodeShower(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addCathodeShower()

void CSCTMBHeader::addCathodeShower ( const CSCShowerDigi digi)
inline

Definition at line 134 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::addCathodeShower().

134 { theHeaderFormat->addCathodeShower(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addCLCT0()

void CSCTMBHeader::addCLCT0 ( const CSCCLCTDigi digi)
inline

for data packing

Definition at line 123 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by add(), and selfTest().

123 { theHeaderFormat->addCLCT0(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addCLCT1()

void CSCTMBHeader::addCLCT1 ( const CSCCLCTDigi digi)
inline

Definition at line 124 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by add(), and selfTest().

124 { theHeaderFormat->addCLCT1(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addCorrelatedLCT0()

void CSCTMBHeader::addCorrelatedLCT0 ( const CSCCorrelatedLCTDigi digi)
inline

Definition at line 127 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by add(), and selfTest().

127 { theHeaderFormat->addCorrelatedLCT0(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addCorrelatedLCT1()

void CSCTMBHeader::addCorrelatedLCT1 ( const CSCCorrelatedLCTDigi digi)
inline

Definition at line 128 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by add(), and selfTest().

128 { theHeaderFormat->addCorrelatedLCT1(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ addShower()

void CSCTMBHeader::addShower ( const CSCShowerDigi digi)
inline

Definition at line 130 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::addShower().

130 { theHeaderFormat->addShower(digi); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ alctHMT()

uint16_t CSCTMBHeader::alctHMT ( ) const
inline

Definition at line 85 of file CSCTMBHeader.h.

References theHeaderFormat.

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

85 { return theHeaderFormat->alctHMT(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ ALCTMatchTime()

uint16_t CSCTMBHeader::ALCTMatchTime ( ) const
inline

Definition at line 44 of file CSCTMBHeader.h.

References theHeaderFormat.

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

44 { return theHeaderFormat->ALCTMatchTime(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ ALCTOnly()

uint16_t CSCTMBHeader::ALCTOnly ( ) const
inline

Definition at line 47 of file CSCTMBHeader.h.

References theHeaderFormat.

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

47 { return theHeaderFormat->ALCTOnly(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ anodeShowerDigi()

CSCShowerDigi CSCTMBHeader::anodeShowerDigi ( uint32_t  idlayer) const
inline

returns Run3 anode Shower Digi for HMT

Definition at line 97 of file CSCTMBHeader.h.

References theHeaderFormat.

97 { return theHeaderFormat->anodeShowerDigi(idlayer); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ Bxn0Diff()

uint16_t CSCTMBHeader::Bxn0Diff ( ) const
inline

Definition at line 50 of file CSCTMBHeader.h.

References theHeaderFormat.

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

50 { return theHeaderFormat->Bxn0Diff(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ Bxn1Diff()

uint16_t CSCTMBHeader::Bxn1Diff ( ) const
inline

Definition at line 51 of file CSCTMBHeader.h.

References theHeaderFormat.

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

51 { return theHeaderFormat->Bxn1Diff(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ BXNCount()

uint16_t CSCTMBHeader::BXNCount ( ) const
inline

Definition at line 43 of file CSCTMBHeader.h.

References theHeaderFormat.

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

43 { return theHeaderFormat->BXNCount(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ cathodeShowerDigi()

CSCShowerDigi CSCTMBHeader::cathodeShowerDigi ( uint32_t  idlayer) const
inline

returns Run3 cathode Shower Digi for HMT

Definition at line 99 of file CSCTMBHeader.h.

References theHeaderFormat.

99 { return theHeaderFormat->cathodeShowerDigi(idlayer); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ check()

bool CSCTMBHeader::check ( ) const
inline

Definition at line 120 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by CSCTMBData::UnpackTMB().

120 { return theHeaderFormat->check(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ clct0_ComparatorCode()

uint16_t CSCTMBHeader::clct0_ComparatorCode ( ) const
inline

== Run 3 CSC-GEM Trigger Format

Definition at line 79 of file CSCTMBHeader.h.

References theHeaderFormat.

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

79 { return theHeaderFormat->clct0_ComparatorCode(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ clct0_xky()

uint16_t CSCTMBHeader::clct0_xky ( ) const
inline

Definition at line 81 of file CSCTMBHeader.h.

References theHeaderFormat.

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

81 { return theHeaderFormat->clct0_xky(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ clct1_ComparatorCode()

uint16_t CSCTMBHeader::clct1_ComparatorCode ( ) const
inline

Definition at line 80 of file CSCTMBHeader.h.

References theHeaderFormat.

80 { return theHeaderFormat->clct1_ComparatorCode(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ clct1_xky()

uint16_t CSCTMBHeader::clct1_xky ( ) const
inline

Definition at line 82 of file CSCTMBHeader.h.

References theHeaderFormat.

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

82 { return theHeaderFormat->clct1_xky(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ CLCTDigis()

std::vector<CSCCLCTDigi> CSCTMBHeader::CLCTDigis ( uint32_t  idlayer)
inline

returns CLCT digis

Definition at line 102 of file CSCTMBHeader.h.

References theHeaderFormat.

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

102 { return theHeaderFormat->CLCTDigis(idlayer); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ clctHMT()

uint16_t CSCTMBHeader::clctHMT ( ) const
inline

Definition at line 86 of file CSCTMBHeader.h.

References theHeaderFormat.

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

86 { return theHeaderFormat->clctHMT(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ CLCTOnly()

uint16_t CSCTMBHeader::CLCTOnly ( ) const
inline

Definition at line 46 of file CSCTMBHeader.h.

References theHeaderFormat.

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

46 { return theHeaderFormat->CLCTOnly(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ CorrelatedLCTDigis()

std::vector<CSCCorrelatedLCTDigi> CSCTMBHeader::CorrelatedLCTDigis ( uint32_t  idlayer) const
inline

returns CorrelatedLCT digis

Definition at line 105 of file CSCTMBHeader.h.

References theHeaderFormat.

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

105  {
106  return theHeaderFormat->CorrelatedLCTDigis(idlayer);
107  }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ data()

unsigned short* CSCTMBHeader::data ( )
inline

Definition at line 115 of file CSCTMBHeader.h.

References theHeaderFormat.

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

115 { return theHeaderFormat->data(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ FirmwareRevision()

int CSCTMBHeader::FirmwareRevision ( ) const
inline

Definition at line 41 of file CSCTMBHeader.h.

References theHeaderFormat.

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

41 { return theHeaderFormat->firmwareRevision(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ FirmwareVersion()

int CSCTMBHeader::FirmwareVersion ( ) const
inline

◆ gem_enabled_fibers()

uint16_t CSCTMBHeader::gem_enabled_fibers ( ) const
inline

Definition at line 87 of file CSCTMBHeader.h.

References theHeaderFormat.

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

87 { return theHeaderFormat->gem_enabled_fibers(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ gem_fifo_pretrig()

uint16_t CSCTMBHeader::gem_fifo_pretrig ( ) const
inline

Definition at line 89 of file CSCTMBHeader.h.

References theHeaderFormat.

89 { return theHeaderFormat->gem_fifo_pretrig(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ gem_fifo_tbins()

uint16_t CSCTMBHeader::gem_fifo_tbins ( ) const
inline

Definition at line 88 of file CSCTMBHeader.h.

References theHeaderFormat.

88 { return theHeaderFormat->gem_fifo_tbins(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ gem_sync_dataword()

uint16_t CSCTMBHeader::gem_sync_dataword ( ) const
inline

Definition at line 91 of file CSCTMBHeader.h.

References theHeaderFormat.

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

91 { return theHeaderFormat->gem_sync_dataword(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ gem_timing_dataword()

uint16_t CSCTMBHeader::gem_timing_dataword ( ) const
inline

Definition at line 92 of file CSCTMBHeader.h.

References theHeaderFormat.

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

92 { return theHeaderFormat->gem_timing_dataword(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ gem_zero_suppress()

uint16_t CSCTMBHeader::gem_zero_suppress ( ) const
inline

Definition at line 90 of file CSCTMBHeader.h.

References theHeaderFormat.

90 { return theHeaderFormat->gem_zero_suppress(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ hmt_ALCTMatchTime()

uint16_t CSCTMBHeader::hmt_ALCTMatchTime ( ) const
inline

Definition at line 84 of file CSCTMBHeader.h.

References theHeaderFormat.

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

84 { return theHeaderFormat->hmt_ALCTMatchTime(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ hmt_nhits()

uint16_t CSCTMBHeader::hmt_nhits ( ) const
inline

Definition at line 83 of file CSCTMBHeader.h.

References theHeaderFormat.

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

83 { return theHeaderFormat->hmt_nhits(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ L1AMatchTime()

uint16_t CSCTMBHeader::L1AMatchTime ( ) const
inline

Definition at line 57 of file CSCTMBHeader.h.

References theHeaderFormat.

57 { return theHeaderFormat->L1AMatchTime(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ L1ANumber()

uint16_t CSCTMBHeader::L1ANumber ( ) const
inline

Definition at line 53 of file CSCTMBHeader.h.

References theHeaderFormat.

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

53 { return theHeaderFormat->L1ANumber(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ NCFEBs()

uint16_t CSCTMBHeader::NCFEBs ( ) const
inline

Definition at line 69 of file CSCTMBHeader.h.

References theHeaderFormat.

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

69 { return theHeaderFormat->NCFEBs(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ NHeaderFrames()

unsigned short int CSCTMBHeader::NHeaderFrames ( ) const
inline

Definition at line 113 of file CSCTMBHeader.h.

References theHeaderFormat.

113 { return theHeaderFormat->NHeaderFrames(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ NTBins()

uint16_t CSCTMBHeader::NTBins ( ) const
inline

Definition at line 68 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by CSCTMBData::UnpackTMB().

68 { return theHeaderFormat->NTBins(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ run3_CLCT_patternID()

uint16_t CSCTMBHeader::run3_CLCT_patternID ( ) const
inline

Definition at line 93 of file CSCTMBHeader.h.

References theHeaderFormat.

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

93 { return theHeaderFormat->run3_CLCT_patternID(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ selfTest()

void CSCTMBHeader::selfTest ( int  firmwwareVersion,
int  firmwareRevision 
)
static

tests that packing and unpacking give same results

Definition at line 336 of file CSCTMBHeader.cc.

References addCLCT0(), addCLCT1(), addCorrelatedLCT0(), addCorrelatedLCT1(), cms::cuda::assert(), CLCTDigis(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), CorrelatedLCTDigis(), gather_cfg::cout, cscPackerCompare(), data(), debug, hcalRecHitTable_cff::detId, simCaloStage2Layer1Digis_cfi::firmwareVersion, CSCCorrelatedLCTDigi::Run3, CSCCLCTDigi::Run3, and relativeConstraints::station.

336  {
337  constexpr bool debug = false;
338 
339  // tests packing and unpacking
340  for (int station = 1; station <= 4; ++station) {
341  for (int iendcap = 1; iendcap <= 2; ++iendcap) {
342  CSCDetId detId(iendcap, station, 1, 1, 0);
343 
344  // the next-to-last is the BX, which only gets
345  // saved in two bits and must be the same for clct0 and clct1.
346  //CSCCLCTDigi clct0(1, 1, 4, 0, 0, 30, 3, 0, 1); // valid for 2006
347  // In 2007 firmware, there are no distrips, so the 4th argument (strip
348  // type) should always be set to 1 (halfstrips).
349  CSCCLCTDigi clct0(1, 1, 4, 1, 0, 30, 4, 2, 1); // valid for 2007
350  CSCCLCTDigi clct1(1, 1, 3, 1, 1, 31, 1, 2, 2);
351 
352  // BX of LCT (8th argument) is 1-bit word (the least-significant bit
353  // of ALCT's bx).
354  CSCCorrelatedLCTDigi lct0(1, 1, 2, 10, 98, 5, 0, 1, 0, 0, 0, 0);
355  CSCCorrelatedLCTDigi lct1(2, 1, 2, 20, 15, 9, 1, 0, 0, 0, 0, 0);
356 
357  // Use Run3 format digis for TMB firmwareVersion 2020
358  // and revision codes for MEx1 CCLUT, ME11 CCLUT/GEM
359  if (firmwareVersion >= 2020) {
360  bool isGEM_fw = false;
361  bool isCCLUT_HMT_fw = false;
362  bool isOTMB_Run2_fw = false;
363  bool isTMB_Run3_fw = false;
364  bool isTMB_Run2_fw = false;
365  bool isTMB_hybrid_fw = false;
366  bool isRun2_df = false;
367  unsigned df_version = (firmwareRevision >> 9) & 0xF; // 4-bits Data Format version
368  unsigned major_ver = (firmwareRevision >> 5) & 0xF; // 4-bits major version part
369  // unsigned minor_ver = firmwareRevision & 0x1F; // 5-bits minor version part
370  switch (df_version) {
371  case 0x4:
372  isTMB_hybrid_fw = true;
373  break;
374  case 0x3:
375  isGEM_fw = true;
376  break;
377  case 0x2:
378  isCCLUT_HMT_fw = true;
379  break;
380  case 0x1:
381  isOTMB_Run2_fw = true;
382  break;
383  case 0x0:
384  if (major_ver == 1)
385  isTMB_Run2_fw = true;
386  else
387  isTMB_Run3_fw = true;
388  break;
389  default:
390  isGEM_fw = true;
391  }
392  if (major_ver == 1) {
393  isRun2_df = true;
394  }
395  if ((isGEM_fw || isCCLUT_HMT_fw || isTMB_Run3_fw) && !isRun2_df && !isOTMB_Run2_fw && !isTMB_Run2_fw &&
396  !isTMB_hybrid_fw) {
397  clct0 = CSCCLCTDigi(
398  1, 6, 6, 1, 0, (120 % 32), (120 / 32), 2, 1, 3, 0xebf, CSCCLCTDigi::Version::Run3, true, false, 2, 6);
399  clct1 = CSCCLCTDigi(
400  1, 6, 3, 1, 1, (132 % 32), (132 / 32), 2, 2, 3, 0xe54, CSCCLCTDigi::Version::Run3, false, true, 1, 15);
401  }
402  if ((isGEM_fw || isCCLUT_HMT_fw || isTMB_Run3_fw) && !isRun2_df && !isOTMB_Run2_fw && !isTMB_Run2_fw &&
403  !isTMB_hybrid_fw) {
404  lct0 = CSCCorrelatedLCTDigi(
405  1, 1, 3, 85, 120, 6, 0, 0, 0, 0, 0, 0, CSCCorrelatedLCTDigi::Version::Run3, true, false, 2, 6);
406  lct1 = CSCCorrelatedLCTDigi(
407  2, 1, 2, 81, 132, 3, 1, 0, 0, 0, 0, 0, CSCCorrelatedLCTDigi::Version::Run3, false, true, 0, 15);
408  }
409  if (isTMB_hybrid_fw) {
410  lct0 = CSCCorrelatedLCTDigi(
411  1, 1, 3, 85, 120, 6, 0, 0, 0, 0, 0, 0, CSCCorrelatedLCTDigi::Version::Run3, false, false, 0, 0);
412  lct1 = CSCCorrelatedLCTDigi(
413  2, 1, 2, 81, 132, 3, 1, 0, 0, 0, 0, 0, CSCCorrelatedLCTDigi::Version::Run3, false, false, 0, 0);
414  }
415  }
416 
417  CSCTMBHeader tmbHeader(firmwareVersion, firmwareRevision);
418  tmbHeader.addCLCT0(clct0);
419  tmbHeader.addCLCT1(clct1);
420  tmbHeader.addCorrelatedLCT0(lct0);
421  tmbHeader.addCorrelatedLCT1(lct1);
422  std::vector<CSCCLCTDigi> clcts = tmbHeader.CLCTDigis(detId.rawId());
423  // guess they got reordered
424  assert(cscPackerCompare(clcts[0], clct0));
425  assert(cscPackerCompare(clcts[1], clct1));
426  if (debug) {
427  std::cout << "Match for: " << clct0 << "\n";
428  std::cout << " " << clct1 << "\n \n";
429  }
430 
431  std::vector<CSCCorrelatedLCTDigi> lcts = tmbHeader.CorrelatedLCTDigis(detId.rawId());
432  assert(cscPackerCompare(lcts[0], lct0));
433  assert(cscPackerCompare(lcts[1], lct1));
434  if (debug) {
435  std::cout << "Match for: " << lct0 << "\n";
436  std::cout << " " << lct1 << "\n";
437  }
438 
439  // try packing and re-packing, to make sure they're the same
440  unsigned short int *data = tmbHeader.data();
441  CSCTMBHeader newHeader(data);
442  clcts = newHeader.CLCTDigis(detId.rawId());
443  assert(cscPackerCompare(clcts[0], clct0));
444  assert(cscPackerCompare(clcts[1], clct1));
445  lcts = newHeader.CorrelatedLCTDigis(detId.rawId());
446  assert(cscPackerCompare(lcts[0], lct0));
447  assert(cscPackerCompare(lcts[1], lct1));
448  }
449  }
450 }
assert(be >=bs)
unsigned short * data()
Definition: CSCTMBHeader.h:115
static std::atomic< bool > debug
Definition: CSCTMBHeader.h:152
bool cscPackerCompare(const T &t1, const T &t2)

◆ setALCTMatchTime()

void CSCTMBHeader::setALCTMatchTime ( uint16_t  alctmatchtime)
inline

Definition at line 45 of file CSCTMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::add().

45 { theHeaderFormat->setALCTMatchTime(alctmatchtime); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ setDebug()

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

turns on/off debug flag for this class

Definition at line 118 of file CSCTMBHeader.h.

References debug, and relativeConstraints::value.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

118 { debug = value; }
static std::atomic< bool > debug
Definition: CSCTMBHeader.h:152

◆ setEventInformation()

void CSCTMBHeader::setEventInformation ( const CSCDMBHeader dmbHeader)
inline

fills fields like bxn and l1a

Definition at line 38 of file CSCTMBHeader.h.

References theHeaderFormat.

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

38 { theHeaderFormat->setEventInformation(dmbHeader); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ setNCFEBs()

void CSCTMBHeader::setNCFEBs ( uint16_t  ncfebs)
inline

Definition at line 76 of file CSCTMBHeader.h.

References theHeaderFormat.

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

76 { theHeaderFormat->setNCFEBs(ncfebs); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ showerDigi()

CSCShowerDigi CSCTMBHeader::showerDigi ( uint32_t  idlayer) const
inline

returns Run3 lct Shower Digi for HMT

Definition at line 95 of file CSCTMBHeader.h.

References theHeaderFormat.

95 { return theHeaderFormat->showerDigi(idlayer); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ sizeInBytes()

uint16_t CSCTMBHeader::sizeInBytes ( ) const
inline

Definition at line 55 of file CSCTMBHeader.h.

References theHeaderFormat.

55 { return theHeaderFormat->sizeInWords() * 2; }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ sizeInWords()

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(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ syncError()

uint16_t CSCTMBHeader::syncError ( ) const
inline

Definition at line 71 of file CSCTMBHeader.h.

References theHeaderFormat.

71 { return theHeaderFormat->syncError(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ syncErrorCLCT()

uint16_t CSCTMBHeader::syncErrorCLCT ( ) const
inline

Definition at line 72 of file CSCTMBHeader.h.

References theHeaderFormat.

72 { return theHeaderFormat->syncErrorCLCT(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ syncErrorMPC0()

uint16_t CSCTMBHeader::syncErrorMPC0 ( ) const
inline

Definition at line 73 of file CSCTMBHeader.h.

References theHeaderFormat.

73 { return theHeaderFormat->syncErrorMPC0(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ syncErrorMPC1()

uint16_t CSCTMBHeader::syncErrorMPC1 ( ) const
inline

Definition at line 74 of file CSCTMBHeader.h.

References theHeaderFormat.

74 { return theHeaderFormat->syncErrorMPC1(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2006()

CSCTMBHeader2006 CSCTMBHeader::tmbHeader2006 ( ) const

Definition at line 328 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

328  {
329  CSCTMBHeader2006 *result = dynamic_cast<CSCTMBHeader2006 *>(theHeaderFormat.get());
330  if (result == nullptr) {
331  throw cms::Exception("Could not get 2006 TMB header format");
332  }
333  return *result;
334 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2007()

CSCTMBHeader2007 CSCTMBHeader::tmbHeader2007 ( ) const

will throw if the cast fails

Definition at line 272 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

272  {
273  CSCTMBHeader2007 *result = dynamic_cast<CSCTMBHeader2007 *>(theHeaderFormat.get());
274  if (result == nullptr) {
275  throw cms::Exception("Could not get 2007 TMB header format");
276  }
277  return *result;
278 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2007_rev0x50c3()

CSCTMBHeader2007_rev0x50c3 CSCTMBHeader::tmbHeader2007_rev0x50c3 ( ) const

Definition at line 280 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

280  {
282  if (result == nullptr) {
283  throw cms::Exception("Could not get 2007 rev0x50c3 TMB header format");
284  }
285  return *result;
286 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2013()

CSCTMBHeader2013 CSCTMBHeader::tmbHeader2013 ( ) const

Definition at line 288 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

288  {
289  CSCTMBHeader2013 *result = dynamic_cast<CSCTMBHeader2013 *>(theHeaderFormat.get());
290  if (result == nullptr) {
291  throw cms::Exception("Could not get 2013 TMB header format");
292  }
293  return *result;
294 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2020_CCLUT()

CSCTMBHeader2020_CCLUT CSCTMBHeader::tmbHeader2020_CCLUT ( ) const

Definition at line 304 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

304  {
306  if (result == nullptr) {
307  throw cms::Exception("Could not get 2020 (O)TMB CCLUT header format");
308  }
309  return *result;
310 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2020_GEM()

CSCTMBHeader2020_GEM CSCTMBHeader::tmbHeader2020_GEM ( ) const

Definition at line 312 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

312  {
314  if (result == nullptr) {
315  throw cms::Exception("Could not get 2020 (O)TMB GEM header format");
316  }
317  return *result;
318 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2020_Run2()

CSCTMBHeader2020_Run2 CSCTMBHeader::tmbHeader2020_Run2 ( ) const

Definition at line 320 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

320  {
322  if (result == nullptr) {
323  throw cms::Exception("Could not get 2020 (O)TMB legacy Run2 header format");
324  }
325  return *result;
326 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ tmbHeader2020_TMB()

CSCTMBHeader2020_TMB CSCTMBHeader::tmbHeader2020_TMB ( ) const

Definition at line 296 of file CSCTMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

296  {
298  if (result == nullptr) {
299  throw cms::Exception("Could not get 2020 TMB Run3 header format");
300  }
301  return *result;
302 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

◆ TMBMatch()

uint16_t CSCTMBHeader::TMBMatch ( ) const
inline

Definition at line 48 of file CSCTMBHeader.h.

References theHeaderFormat.

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

48 { return theHeaderFormat->TMBMatch(); }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 452 of file CSCTMBHeader.cc.

452  {
453  hdr.theHeaderFormat->print(os);
454  return os;
455 }
std::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition: CSCTMBHeader.h:155

Member Data Documentation

◆ debug

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

◆ theFirmwareVersion

int CSCTMBHeader::theFirmwareVersion
private

Definition at line 156 of file CSCTMBHeader.h.

Referenced by CSCTMBHeader(), and FirmwareVersion().

◆ theHeaderFormat

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