CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
CSCALCTHeader Class Reference

#include <CSCALCTHeader.h>

Public Types

enum  FIFO_MODE { NO_DUMP, FULL_DUMP, LOCAL_DUMP }
 

Public Member Functions

unsigned short int ActiveFEBs () const
 
void add (const std::vector< CSCALCTDigi > &digis)
 
std::vector< CSCALCTDigiALCTDigis () const
 
unsigned short int alctFirmwareVersion () const
 
CSCALCTHeader2006 alctHeader2006 () const
 
CSCALCTHeader2007 alctHeader2007 () const
 
unsigned short int BoardID () const
 
unsigned short int BXNCount () const
 
bool check () const
 
 CSCALCTHeader (const CSCALCTStatusDigi &digi)
 
 CSCALCTHeader (const unsigned short *buf)
 for packing More...
 
 CSCALCTHeader (int chamberType)
 
unsigned short int CSCID () const
 
unsigned short int * data ()
 
unsigned short int ExtTrig () const
 
unsigned short int FIFOMode () const
 
unsigned short int L1Acc () const
 
unsigned short int L1AMatch () const
 
unsigned short int LCTChipRead () const
 
unsigned short int nLCTChipRead () const
 for packing More...
 
unsigned short int NTBins () const
 
boost::dynamic_bitset pack ()
 
unsigned short int Promote1 () const
 
unsigned short int Promote2 () const
 
void setBXNCount (unsigned int bxn)
 
void setDAVForChannel (int wireGroup)
 
void setEventInformation (const CSCDMBHeader &)
 
void setL1Acc (unsigned int l1a)
 
int sizeInWords ()
 in 16-bit words More...
 

Static Public Member Functions

static void selfTest (int firmware)
 tests that we unpack what we packed More...
 
static void setDebug (bool value)
 to access data by via status digis More...
 

Private Attributes

CSCALCTs2006 alcts2006
 
unsigned short int bxn0
 
unsigned short int bxn1
 
std::vector< CSCCollisionMaskcollisionMasks
 
CSCConfigurationRegister configRegister
 
CSCALCTHeader2006 header2006
 
CSCALCTHeader2007 header2007
 
std::vector< CSCHotChannelMaskhotChannelMasks
 
unsigned short int sizeInWords2007_
 size of the 2007 header in words More...
 
std::vector< CSCALCTtheALCTs
 
unsigned short int theOriginalBuffer [116]
 
CSCVirtexID virtexID
 

Static Private Attributes

static std::atomic< bool > debug {false}
 
static std::atomic< unsigned short int > firmwareVersion {2007}
 

Detailed Description

documented in flags http://www.phys.ufl.edu/~madorsky/alctv/alct2000_spec.PDF

Definition at line 21 of file CSCALCTHeader.h.

Member Enumeration Documentation

◆ FIFO_MODE

some accessors here are only applicable to 2006 header some to both 2006 and 2007

Enumerator
NO_DUMP 
FULL_DUMP 
LOCAL_DUMP 

Definition at line 40 of file CSCALCTHeader.h.

Constructor & Destructor Documentation

◆ CSCALCTHeader() [1/3]

CSCALCTHeader::CSCALCTHeader ( int  chamberType)
explicit

Definition at line 22 of file CSCALCTHeader.cc.

23  : header2006(chamberType), header2007(chamberType) { //constructor for digi->raw packing based on header2006
24  if (firmwareVersion == 2006) {
26  } else if (firmwareVersion == 2007) {
28  // assume no virtex or masks or registers
30  theALCTs.resize(header2007.lctBins * 2);
31  } else {
32  edm::LogError("CSCALCTHeader|CSCRawToDigi")
33  << "Cannot construct ALCT header: ALCT firmware version is bad/not defined!" << firmwareVersion;
34  }
35 }

References firmwareVersion, header2006, header2007, CSCALCTHeader2007::lctBins, CSCALCTHeader2006::sizeInWords(), CSCALCT::sizeInWords(), CSCALCTHeader2007::sizeInWords(), sizeInWords2007_, theALCTs, and theOriginalBuffer.

Referenced by CSCALCTHeader().

◆ CSCALCTHeader() [2/3]

CSCALCTHeader::CSCALCTHeader ( const unsigned short *  buf)
explicit

for packing

collision and hot channel masks are variable sized the sizes vary depending on type of the ALCT board number of words for various alct board types: 1 2 3 5 6

first determine the correct format

Now fill data

the header part

the alct0 and alct1

the fixed sized header part

now come the variable parts

2007 has LCTbins * 2 alct words

also store raw data buffer too; it is later returned by data() method

Definition at line 37 of file CSCALCTHeader.cc.

37  {
42  constexpr unsigned short int collisionMaskWordcount[7] = {8, 8, 12, 16, 16, 24, 28};
43  constexpr unsigned short int hotChannelMaskWordcount[7] = {18, 18, 24, 36, 36, 48, 60};
44 
46  if (buf[0] == 0xDB0A) {
47  firmwareVersion = 2007;
48  } else if ((buf[0] & 0xF800) == 0x6000) {
49  firmwareVersion = 2006;
50  } else {
51  edm::LogError("CSCALCTHeader|CSCRawToDigi") << "failed to determine ALCT firmware version!!";
52  }
53 
54  LogTrace("CSCALCTHeader|CSCRawToDigi") << "firmware version - " << firmwareVersion;
55 
57 #ifdef LOCAL_UNPACK
58  switch (firmwareVersion) {
59 #else
60  switch (firmwareVersion.load()) {
61 #endif
62  case 2006:
67  break;
68 
69  case 2007:
74  if (header2007.configPresent == 1) {
81 
82  collisionMasks.resize(collisionMaskWordcount[header2007.boardType]);
83  for (unsigned int i = 0; i < collisionMaskWordcount[header2007.boardType]; ++i) {
84  collisionMasks[i].setFromBuffer(buf);
85  buf += collisionMasks[i].sizeInWords();
86  sizeInWords2007_ += collisionMasks[i].sizeInWords();
87  }
88 
89  hotChannelMasks.resize(hotChannelMaskWordcount[header2007.boardType]);
90  for (unsigned int i = 0; i < hotChannelMaskWordcount[header2007.boardType]; ++i) {
91  hotChannelMasks[i].setFromBuffer(buf);
92  buf += hotChannelMasks[i].sizeInWords();
93  sizeInWords2007_ += hotChannelMasks[i].sizeInWords();
94  }
95  }
96 
97  theALCTs.resize(header2007.lctBins * 2);
98  for (int i = 0; i < header2007.lctBins * 2; ++i) {
99  theALCTs[i].setFromBuffer(buf);
100  buf += theALCTs[i].sizeInWords();
101  sizeInWords2007_ += theALCTs[i].sizeInWords();
102  }
103 
104  ALCTDigis();
105  break;
106 
107  default:
108  edm::LogError("CSCALCTHeader|CSCRawToDigi") << "couldn't construct: ALCT firmware version is bad/not defined!";
109  break;
110  }
111 
113  if ((firmwareVersion == 2006) || (firmwareVersion == 2007))
114  memcpy(theOriginalBuffer, buf - sizeInWords(), sizeInWords() * 2);
115 }

References ALCTDigis(), alcts2006, CSCALCTHeader2007::boardType, visDQMUpload::buf, collisionMasks, CSCALCTHeader2007::configPresent, configRegister, firmwareVersion, header2006, header2007, hotChannelMasks, mps_fire::i, CSCALCTHeader2007::lctBins, LogTrace, CSCALCTHeader2006::setFromBuffer(), CSCALCTHeader2007::setFromBuffer(), CSCALCTs2006::setFromBuffer(), CSCVirtexID::setFromBuffer(), CSCConfigurationRegister::setFromBuffer(), CSCALCTHeader2006::sizeInWords(), CSCALCTHeader2007::sizeInWords(), CSCALCTs2006::sizeInWords(), CSCVirtexID::sizeInWords(), CSCConfigurationRegister::sizeInWords(), sizeInWords(), sizeInWords2007_, theALCTs, theOriginalBuffer, and virtexID.

◆ CSCALCTHeader() [3/3]

CSCALCTHeader::CSCALCTHeader ( const CSCALCTStatusDigi digi)

Definition at line 117 of file CSCALCTHeader.cc.

117 { CSCALCTHeader(digi.header()); }

References CSCALCTHeader(), and CSCALCTStatusDigi::header().

Member Function Documentation

◆ ActiveFEBs()

unsigned short int CSCALCTHeader::ActiveFEBs ( ) const
inline

Definition at line 133 of file CSCALCTHeader.h.

133 { return header2006.activeFEBs; }

References CSCALCTHeader2006::activeFEBs, and header2006.

◆ add()

void CSCALCTHeader::add ( const std::vector< CSCALCTDigi > &  digis)

Definition at line 189 of file CSCALCTHeader.cc.

189  {
190  if (firmwareVersion == 2006) {
191  alcts2006.add(digis);
192  } else if (firmwareVersion == 2007) {
193  if (theALCTs.empty()) {
194  theALCTs.resize(header2007.lctBins * 2);
195  }
196  for (std::vector<CSCALCTDigi>::const_iterator digi = digis.begin(); digi != digis.end(); ++digi) {
197  int bx = digi->getBX();
198  if (bx < (int)header2007.lctBins) {
199  // 2 ALCTs per bx
200  int i = bx * 2;
201  int q1 = theALCTs[i].quality;
202  int q2 = theALCTs[i + 1].quality;
203  // see if it's non=blank
204  if (!theALCTs[i].valid) {
205  theALCTs[i] = CSCALCT(*digi);
206  }
207  // new best LCT
208  else if (digi->getQuality() > q1) {
209  theALCTs[i + 1] = theALCTs[i];
210  theALCTs[i] = CSCALCT(*digi);
211  }
212  // new second best
213  else if (!theALCTs[i + 1].valid || (digi->getQuality() > q2)) {
214  theALCTs[i + 1] = CSCALCT(*digi);
215  }
216  }
217  }
218  }
219 }

References CSCALCTs2006::add(), alcts2006, l1GtPatternGenerator_cfi::bx, firmwareVersion, header2007, mps_fire::i, CSCALCTHeader2007::lctBins, q1, q2, theALCTs, and RunInfoPI::valid.

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

◆ ALCTDigis()

std::vector< CSCALCTDigi > CSCALCTHeader::ALCTDigis ( ) const

loop over all alct words

Definition at line 152 of file CSCALCTHeader.cc.

152  {
153  std::vector<CSCALCTDigi> result;
154 
155 #ifdef LOCAL_UNPACK
156  switch (firmwareVersion) {
157 #else
158  switch (firmwareVersion.load()) {
159 #endif
160  case 2006: {
162  break;
163  }
164  case 2007: {
165  result.reserve(theALCTs.size());
166  for (unsigned int i = 0; i < theALCTs.size(); ++i) {
167  CSCALCTDigi digi(theALCTs[i].valid,
168  theALCTs[i].quality,
169  theALCTs[i].accel,
170  theALCTs[i].pattern,
171  theALCTs[i].keyWire,
172  (int)i / 2,
173  i % 2 + 1);
174  result.push_back(digi);
175  }
176  break;
177  }
178  default:
179  edm::LogError("CSCALCTHeader|CSCRawToDigi")
180  << "Empty Digis: ALCT firmware version is bad/not defined!" << firmwareVersion;
181  break;
182  }
183  for (unsigned i = 0; i < result.size(); ++i) {
184  result[i].setFullBX(BXNCount());
185  }
186  return result;
187 }

References CSCALCTs2006::ALCTDigis(), alcts2006, BXNCount(), firmwareVersion, mps_fire::i, topSingleLeptonDQM_PU_cfi::pattern, quality, mps_fire::result, theALCTs, and RunInfoPI::valid.

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

◆ alctFirmwareVersion()

unsigned short int CSCALCTHeader::alctFirmwareVersion ( ) const
inline

Definition at line 137 of file CSCALCTHeader.h.

137 { return firmwareVersion; }

References firmwareVersion.

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

◆ alctHeader2006()

CSCALCTHeader2006 CSCALCTHeader::alctHeader2006 ( ) const
inline

Definition at line 144 of file CSCALCTHeader.h.

144 { return header2006; }

References header2006.

◆ alctHeader2007()

CSCALCTHeader2007 CSCALCTHeader::alctHeader2007 ( ) const
inline

Definition at line 143 of file CSCALCTHeader.h.

143 { return header2007; }

References header2007.

◆ BoardID()

unsigned short int CSCALCTHeader::BoardID ( ) const
inline

Definition at line 58 of file CSCALCTHeader.h.

58 { return header2006.boardID; }

References CSCALCTHeader2006::boardID, and header2006.

◆ BXNCount()

unsigned short int CSCALCTHeader::BXNCount ( ) const
inline

Definition at line 61 of file CSCALCTHeader.h.

61  {
62 #ifdef LOCAL_UNPACK
63  switch (firmwareVersion) {
64 #else
65  switch (firmwareVersion.load()) {
66 #endif
67  case 2006:
68  return header2006.bxnCount;
69  case 2007:
70  return header2007.bxnCount;
71  default:
72  edm::LogError("CSCALCTHeader|CSCRawToDigi")
73  << "trying to access BXNcount: ALCT firmware version is bad/not defined!";
74  return 0;
75  }
76  }

References CSCALCTHeader2007::bxnCount, CSCALCTHeader2006::bxnCount, firmwareVersion, header2006, and header2007.

Referenced by ALCTDigis(), and cscdqm::EventProcessor::processCSC().

◆ check()

bool CSCALCTHeader::check ( ) const
inline

Definition at line 165 of file CSCALCTHeader.h.

165  {
166 #ifdef LOCAL_UNPACK
167  switch (firmwareVersion) {
168 #else
169  switch (firmwareVersion.load()) {
170 #endif
171  case 2006:
172  return header2006.flag_0 == 0xC;
173  case 2007:
174  return header2007.flag1 == 0xDB0A;
175  default:
176  edm::LogError("CSCALCTHeader|CSCRawToDigi") << "check(): ALCT firmware version is bad/not defined!";
177  return false;
178  }
179  }

References add(), simCaloStage2Digis_cfi::firmware, firmwareVersion, CSCALCTHeader2007::flag1, CSCALCTHeader2006::flag_0, header2006, header2007, pack(), and selfTest().

Referenced by CSCEventData::unpack_data().

◆ CSCID()

unsigned short int CSCALCTHeader::CSCID ( ) const
inline

Definition at line 60 of file CSCALCTHeader.h.

60 { return header2006.cscID; }

References CSCALCTHeader2006::cscID, and header2006.

◆ data()

unsigned short int* CSCALCTHeader::data ( )
inline

Definition at line 146 of file CSCALCTHeader.h.

146 { return theOriginalBuffer; }

References theOriginalBuffer.

Referenced by CSCEventData::pack(), pack(), and CSCEventData::unpack_data().

◆ ExtTrig()

unsigned short int CSCALCTHeader::ExtTrig ( ) const
inline

Definition at line 59 of file CSCALCTHeader.h.

59 { return header2006.extTrig; }

References CSCALCTHeader2006::extTrig, and header2006.

◆ FIFOMode()

unsigned short int CSCALCTHeader::FIFOMode ( ) const
inline

Definition at line 41 of file CSCALCTHeader.h.

41 { return header2006.fifoMode; }

References CSCALCTHeader2006::fifoMode, and header2006.

◆ L1Acc()

unsigned short int CSCALCTHeader::L1Acc ( ) const
inline

Definition at line 97 of file CSCALCTHeader.h.

97  {
98 #ifdef LOCAL_UNPACK
99  switch (firmwareVersion) {
100 #else
101  switch (firmwareVersion.load()) {
102 #endif
103  case 2006:
104  return header2006.l1Acc;
105  case 2007:
106  return header2007.l1aCounter;
107  default:
108  edm::LogError("CSCALCTHeader|CSCRawToDigi")
109  << "trying to access L1Acc: ALCT firmware version is bad/not defined!";
110  return 0;
111  }
112  }

References firmwareVersion, header2006, header2007, CSCALCTHeader2006::l1Acc, and CSCALCTHeader2007::l1aCounter.

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

◆ L1AMatch()

unsigned short int CSCALCTHeader::L1AMatch ( ) const
inline

Definition at line 132 of file CSCALCTHeader.h.

132 { return header2006.l1aMatch; }

References header2006, and CSCALCTHeader2006::l1aMatch.

◆ LCTChipRead()

unsigned short int CSCALCTHeader::LCTChipRead ( ) const
inline

Definition at line 136 of file CSCALCTHeader.h.

136 { return header2006.lctChipRead; }

References header2006, and CSCALCTHeader2006::lctChipRead.

◆ nLCTChipRead()

unsigned short CSCALCTHeader::nLCTChipRead ( ) const

for packing

header2006 method

Definition at line 140 of file CSCALCTHeader.cc.

140  {
141  if (firmwareVersion == 2006) {
142  return header2006.nLCTChipRead();
143  } else {
144  // nLCTChip obsolete in ALCT2007 format (email Andrey K. & Victor B., 20.10.2008)
145  // and we don't think anyone makes uses of this call.
146  // edm::LogError("CSCALCTHeader|CSCRawToDigi")
147  // <<"How is nLCTChipRead() supposed to work for ALCTHeader2007?";
148  }
149  return 0;
150 }

References firmwareVersion, header2006, and CSCALCTHeader2006::nLCTChipRead().

◆ NTBins()

unsigned short int CSCALCTHeader::NTBins ( ) const
inline

Definition at line 42 of file CSCALCTHeader.h.

42  {
43 #ifdef LOCAL_UNPACK
44  switch (firmwareVersion) {
45 #else
46  switch (firmwareVersion.load()) {
47 #endif
48  case 2006:
49  return header2006.nTBins;
50  case 2007:
51  return header2007.rawBins;
52  default:
53  edm::LogError("CSCALCTHeader|CSCRawToDigi")
54  << "trying to access NTBINs: ALCT firmware version is bad/not defined!";
55  return 0;
56  }
57  }

References firmwareVersion, header2006, header2007, CSCALCTHeader2006::nTBins, and CSCALCTHeader2007::rawBins.

◆ pack()

boost::dynamic_bitset CSCALCTHeader::pack ( )

Definition at line 221 of file CSCALCTHeader.cc.

221  {
222  boost::dynamic_bitset<> result;
223  if (firmwareVersion == 2006) {
224  boost::dynamic_bitset<> header =
226  boost::dynamic_bitset<> alcts =
229 
230  bitset_utilities::bitsetToChar(result, (unsigned char *)data());
231  }
232 
233  else if (firmwareVersion == 2007) {
235 
236  for (unsigned i = 0; i < theALCTs.size(); ++i) {
237  boost::dynamic_bitset<> alct =
238  bitset_utilities::ushortToBitset(theALCTs[i].sizeInWords() * 16, (unsigned short *)&theALCTs[i]);
240  }
241 
242  bitset_utilities::bitsetToChar(result, (unsigned char *)data());
243  }
244  return result;
245 }

References alcts2006, bitset_utilities::append(), bitset_utilities::bitsetToChar(), data(), firmwareVersion, RecoTauValidation_cfi::header, header2006, header2007, mps_fire::i, mps_fire::result, CSCALCTHeader2006::sizeInWords(), CSCALCTHeader2007::sizeInWords(), CSCALCTs2006::sizeInWords(), sizeInWords(), theALCTs, and bitset_utilities::ushortToBitset().

Referenced by check(), and CSCEventData::pack().

◆ Promote1()

unsigned short int CSCALCTHeader::Promote1 ( ) const
inline

Definition at line 134 of file CSCALCTHeader.h.

134 { return header2006.promote1; }

References header2006, and CSCALCTHeader2006::promote1.

◆ Promote2()

unsigned short int CSCALCTHeader::Promote2 ( ) const
inline

Definition at line 135 of file CSCALCTHeader.h.

135 { return header2006.promote2; }

References header2006, and CSCALCTHeader2006::promote2.

◆ selfTest()

void CSCALCTHeader::selfTest ( int  firmware)
static

tests that we unpack what we packed

Definition at line 247 of file CSCALCTHeader.cc.

247  {
249  CSCALCTDigi alct0(true, 1, 1, 1, 10, 6, 1);
250  CSCALCTDigi alct1(true, 1, 1, 0, 11, 6, 2);
251 
252  // tests packing and unpacking
253  for (int station = 1; station <= 4; ++station) {
254  CSCDetId detId(1, station, 1, 1, 0);
255 
256  std::vector<CSCALCTDigi> oldAlcts;
257  oldAlcts.push_back(alct0);
258  oldAlcts.push_back(alct1);
259  CSCALCTHeader alctHeader(detId.iChamberType());
260 
261  alctHeader.add(oldAlcts);
262 
263  std::vector<CSCALCTDigi> alcts = alctHeader.ALCTDigis();
264  // pick out the valid ones
265  std::vector<CSCALCTDigi> validALCTs;
266  for (std::vector<CSCALCTDigi>::const_iterator alctItr = alcts.begin(); alctItr != alcts.end(); ++alctItr) {
267  if (alctItr->isValid()) {
268  validALCTs.push_back(*alctItr);
269  }
270  }
271  assert(validALCTs[0] == alct0);
272  assert(validALCTs[1] == alct1);
273  //cscClassPackerCompare(alctHeader);
274  }
275 }

References add(), cms::cuda::assert(), simCaloStage2Digis_cfi::firmware, firmwareVersion, CSCDetId::iChamberType(), and relativeConstraints::station.

Referenced by check().

◆ setBXNCount()

void CSCALCTHeader::setBXNCount ( unsigned int  bxn)
inline

Definition at line 78 of file CSCALCTHeader.h.

78  {
79 #ifdef LOCAL_UNPACK
80  switch (firmwareVersion) {
81 #else
82  switch (firmwareVersion.load()) {
83 #endif
84  case 2006:
85  header2006.bxnCount = bxn % 0xFFF;
86  break;
87  case 2007:
88  header2007.bxnCount = bxn % 0xFFF;
89  break;
90  default:
91  edm::LogError("CSCALCTHeader|CSCRawToDigi")
92  << "trying to set BXNcount: ALCT firmware version is bad/not defined!";
93  break;
94  }
95  }

References CSCALCTHeader2007::bxnCount, CSCALCTHeader2006::bxnCount, firmwareVersion, header2006, and header2007.

Referenced by CSCEventData::add().

◆ setDAVForChannel()

void CSCALCTHeader::setDAVForChannel ( int  wireGroup)
inline

Definition at line 138 of file CSCALCTHeader.h.

138  {
139  if (firmwareVersion == 2006) {
140  header2006.setDAV((wireGroup - 1) / 16);
141  }
142  }

References firmwareVersion, header2006, and CSCALCTHeader2006::setDAV().

Referenced by CSCEventData::add().

◆ setDebug()

static void CSCALCTHeader::setDebug ( bool  value)
inlinestatic

to access data by via status digis

turns on the debug flag for this class

Definition at line 30 of file CSCALCTHeader.h.

30 { debug = value; };

References debug, and relativeConstraints::value.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

◆ setEventInformation()

void CSCALCTHeader::setEventInformation ( const CSCDMBHeader dmb)

Definition at line 119 of file CSCALCTHeader.cc.

119  {
120 #ifdef LOCAL_UNPACK
121  switch (firmwareVersion) {
122 #else
123  switch (firmwareVersion.load()) {
124 #endif
125  case 2006: {
127  break;
128  }
129  case 2007: {
131  break;
132  }
133  default:
134  edm::LogError("CSCALCTHeader|CSCRawToDigi")
135  << "setEventInformation: ALCT firmware version is bad/not defined!" << firmwareVersion;
136  break;
137  }
138 }

References firmwareVersion, header2006, header2007, CSCALCTHeader2006::setEventInformation(), and CSCALCTHeader2007::setEventInformation().

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

◆ setL1Acc()

void CSCALCTHeader::setL1Acc ( unsigned int  l1a)
inline

Definition at line 114 of file CSCALCTHeader.h.

114  {
115 #ifdef LOCAL_UNPACK
116  switch (firmwareVersion) {
117 #else
118  switch (firmwareVersion.load()) {
119 #endif
120  case 2006:
121  header2006.l1Acc = l1a % 0xF;
122  break;
123  case 2007:
124  header2007.l1aCounter = l1a % 0xFFF;
125  break;
126  default:
127  edm::LogError("CSCALCTHeader|CSCRawToDigi") << "trying to set L1Acc: ALCT firmware version is bad/not defined!";
128  break;
129  }
130  }

References firmwareVersion, header2006, header2007, CSCALCTHeader2006::l1Acc, and CSCALCTHeader2007::l1aCounter.

◆ sizeInWords()

int CSCALCTHeader::sizeInWords ( )
inline

in 16-bit words

Definition at line 149 of file CSCALCTHeader.h.

149  {
150 #ifdef LOCAL_UNPACK
151  switch (firmwareVersion) {
152 #else
153  switch (firmwareVersion.load()) {
154 #endif
155  case 2006:
156  return 8;
157  case 2007:
158  return sizeInWords2007_;
159  default:
160  edm::LogError("CSCALCTHeader|CSCRawToDigi") << "SizeInWords(): ALCT firmware version is bad/not defined!";
161  return 0;
162  }
163  }

References firmwareVersion, and sizeInWords2007_.

Referenced by CSCEventData::checkALCTClasses(), CSCALCTHeader(), CSCEventData::pack(), pack(), and CSCEventData::unpack_data().

Member Data Documentation

◆ alcts2006

CSCALCTs2006 CSCALCTHeader::alcts2006
private

Definition at line 192 of file CSCALCTHeader.h.

Referenced by add(), ALCTDigis(), CSCALCTHeader(), and pack().

◆ bxn0

unsigned short int CSCALCTHeader::bxn0
private

Definition at line 211 of file CSCALCTHeader.h.

◆ bxn1

unsigned short int CSCALCTHeader::bxn1
private

Definition at line 211 of file CSCALCTHeader.h.

◆ collisionMasks

std::vector<CSCCollisionMask> CSCALCTHeader::collisionMasks
private

Definition at line 195 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

◆ configRegister

CSCConfigurationRegister CSCALCTHeader::configRegister
private

Definition at line 194 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

◆ debug

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

◆ firmwareVersion

std::atomic< short unsigned int > CSCALCTHeader::firmwareVersion {2007}
staticprivate

◆ header2006

CSCALCTHeader2006 CSCALCTHeader::header2006
private

◆ header2007

CSCALCTHeader2007 CSCALCTHeader::header2007
private

◆ hotChannelMasks

std::vector<CSCHotChannelMask> CSCALCTHeader::hotChannelMasks
private

Definition at line 196 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

◆ sizeInWords2007_

unsigned short int CSCALCTHeader::sizeInWords2007_
private

size of the 2007 header in words

Definition at line 211 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader(), and sizeInWords().

◆ theALCTs

std::vector<CSCALCT> CSCALCTHeader::theALCTs
private

Definition at line 191 of file CSCALCTHeader.h.

Referenced by add(), ALCTDigis(), CSCALCTHeader(), and pack().

◆ theOriginalBuffer

unsigned short int CSCALCTHeader::theOriginalBuffer[116]
private

Definition at line 200 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader(), and data().

◆ virtexID

CSCVirtexID CSCALCTHeader::virtexID
private

Definition at line 193 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

CSCALCTHeader2006::promote1
unsigned promote1
promotion bit for 1st LCT pattern
Definition: CSCALCTHeader2006.h:52
CSCVirtexID::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2007.h:89
CSCALCTHeader::header2007
CSCALCTHeader2007 header2007
Definition: CSCALCTHeader.h:190
CSCALCTHeader::FULL_DUMP
Definition: CSCALCTHeader.h:40
CSCALCTHeader2007::flag1
unsigned flag1
Definition: CSCALCTHeader2007.h:45
CSCALCTs2006::ALCTDigis
std::vector< CSCALCTDigi > ALCTDigis() const
Definition: CSCALCTHeader2006.cc:44
CSCConfigurationRegister::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:108
mps_fire.i
i
Definition: mps_fire.py:428
CSCALCTHeader::data
unsigned short int * data()
Definition: CSCALCTHeader.h:146
CSCALCTHeader2006::cscID
unsigned cscID
chamber ID number
Definition: CSCALCTHeader2006.h:37
CSCALCTHeader::theOriginalBuffer
unsigned short int theOriginalBuffer[116]
Definition: CSCALCTHeader.h:200
CSCALCTHeader::header2006
CSCALCTHeader2006 header2006
Definition: CSCALCTHeader.h:189
CSCALCTHeader2006::fifoMode
unsigned fifoMode
see the FIFO_MODE enum
Definition: CSCALCTHeader2006.h:44
CSCALCTHeader::sizeInWords2007_
unsigned short int sizeInWords2007_
size of the 2007 header in words
Definition: CSCALCTHeader.h:211
CSCALCTs2006::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2006.h:82
CSCALCTStatusDigi::header
const uint16_t * header() const
Data Accessors.
Definition: CSCALCTStatusDigi.h:24
CSCALCTHeader::sizeInWords
int sizeInWords()
in 16-bit words
Definition: CSCALCTHeader.h:149
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCALCTs2006::add
void add(const std::vector< CSCALCTDigi > &digis)
should try to sort, but doesn't for now
Definition: CSCALCTHeader2006.cc:57
CSCALCTHeader2006::lctChipRead
unsigned lctChipRead
LCT chips read out in raw hit dump.
Definition: CSCALCTHeader2006.h:68
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
CSCALCTHeader2006::extTrig
unsigned extTrig
trigger source was external
Definition: CSCALCTHeader2006.h:50
CSCALCTHeader2007::rawBins
unsigned rawBins
Definition: CSCALCTHeader2007.h:76
cms::cuda::assert
assert(be >=bs)
CSCALCTHeader::add
void add(const std::vector< CSCALCTDigi > &digis)
Definition: CSCALCTHeader.cc:189
CSCALCTHeader2006::l1Acc
unsigned l1Acc
l1 accept counter
Definition: CSCALCTHeader2006.h:35
CSCALCTHeader2006::setEventInformation
void setEventInformation(const CSCDMBHeader &)
Definition: CSCALCTHeader2006.cc:28
CSCALCTHeader2006::bxnCount
unsigned bxnCount
full bunch crossing number
Definition: CSCALCTHeader2006.h:61
CSCALCTHeader2006::activeFEBs
unsigned activeFEBs
LCT chips with ADB hits.
Definition: CSCALCTHeader2006.h:70
bitset_utilities::append
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1
Definition: bitset_append.cc:10
CSCALCTHeader2006::flag_0
unsigned flag_0
should be '01100', so it'll be a 6xxx in the ASCII dump
Definition: CSCALCTHeader2006.h:41
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
CSCALCT
Definition: CSCALCTHeader2007.h:17
CSCALCTHeader
Definition: CSCALCTHeader.h:21
bitset_utilities::bitsetToChar
void bitsetToChar(const boost::dynamic_bitset<> &bs, unsigned char *result)
this method takes bitset obj and returns char * array
Definition: bitset_append.cc:32
CSCALCTHeader::BXNCount
unsigned short int BXNCount() const
Definition: CSCALCTHeader.h:61
CSCALCTHeader2007::setEventInformation
void setEventInformation(const CSCDMBHeader &)
Definition: CSCALCTHeader2007.cc:38
simCaloStage2Digis_cfi.firmware
firmware
Definition: simCaloStage2Digis_cfi.py:6
q2
double q2[4]
Definition: TauolaWrapper.h:88
CSCALCTHeader2006::setDAV
void setDAV(int afebBoard)
for packing
Definition: CSCALCTHeader2006.h:32
CSCALCTHeader2006::promote2
unsigned promote2
promotion bit for 2nd LCT pattern
Definition: CSCALCTHeader2006.h:54
CSCConfigurationRegister::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2007.h:110
q1
double q1[4]
Definition: TauolaWrapper.h:87
CSCALCTHeader2007::bxnCount
unsigned bxnCount
Definition: CSCALCTHeader2007.h:56
CSCALCTHeader::theALCTs
std::vector< CSCALCT > theALCTs
Definition: CSCALCTHeader.h:191
CSCALCTs2006::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2006.h:80
CSCDetId
Definition: CSCDetId.h:26
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
CSCALCTHeader::debug
static std::atomic< bool > debug
Definition: CSCALCTHeader.h:206
CSCALCTHeader::ALCTDigis
std::vector< CSCALCTDigi > ALCTDigis() const
Definition: CSCALCTHeader.cc:152
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCALCTHeader2006::nTBins
unsigned nTBins
Definition: CSCALCTHeader2006.h:46
CSCALCTHeader2007::lctBins
unsigned lctBins
Definition: CSCALCTHeader2007.h:77
CSCALCTHeader2006::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2006.h:22
CSCALCTHeader::NO_DUMP
Definition: CSCALCTHeader.h:40
CSCALCTHeader::configRegister
CSCConfigurationRegister configRegister
Definition: CSCALCTHeader.h:194
CSCALCTHeader2007::l1aCounter
unsigned l1aCounter
Definition: CSCALCTHeader2007.h:50
CSCALCTHeader2006::l1aMatch
unsigned l1aMatch
exteran L1A arrived in L1A window
Definition: CSCALCTHeader2006.h:48
CSCALCTHeader2007::boardType
unsigned boardType
Definition: CSCALCTHeader2007.h:65
CSCALCTHeader::alcts2006
CSCALCTs2006 alcts2006
Definition: CSCALCTHeader.h:192
bitset_utilities::ushortToBitset
boost::dynamic_bitset ushortToBitset(const unsigned int numberOfBits, unsigned short *buf)
this method takes numberOfBits bits from unsigned short * array and returns them in the bitset obj.
Definition: bitset_append.cc:23
CSCALCTHeader::firmwareVersion
static std::atomic< unsigned short int > firmwareVersion
Definition: CSCALCTHeader.h:207
CSCALCTHeader::CSCALCTHeader
CSCALCTHeader(int chamberType)
Definition: CSCALCTHeader.cc:22
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CSCALCTHeader::virtexID
CSCVirtexID virtexID
Definition: CSCALCTHeader.h:193
CSCALCTHeader::collisionMasks
std::vector< CSCCollisionMask > collisionMasks
Definition: CSCALCTHeader.h:195
CSCALCTDigi
Definition: CSCALCTDigi.h:17
CSCALCTHeader2006::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2006.h:16
CSCVirtexID::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:87
CSCALCTHeader2007::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:37
CSCALCTHeader2006::boardID
unsigned boardID
ALCT2000 board ID.
Definition: CSCALCTHeader2006.h:39
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
CSCALCTHeader2006::nLCTChipRead
unsigned short nLCTChipRead() const
Definition: CSCALCTHeader2006.cc:35
mps_fire.result
result
Definition: mps_fire.py:311
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
CSCALCTHeader::LOCAL_DUMP
Definition: CSCALCTHeader.h:40
CSCALCT::sizeInWords
static short unsigned int sizeInWords()
Definition: CSCALCTHeader2007.h:23
CSCALCTHeader::hotChannelMasks
std::vector< CSCHotChannelMask > hotChannelMasks
Definition: CSCALCTHeader.h:196
CSCALCTHeader2007::configPresent
unsigned configPresent
Definition: CSCALCTHeader2007.h:59
CSCALCTHeader2007::sizeInWords
short unsigned int sizeInWords() const
for packing
Definition: CSCALCTHeader2007.h:41