CMS 3D CMS Logo

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

#include <CSCTMBData.h>

Public Member Functions

std::bitset< 22 > calCRC22 (const std::vector< std::bitset< 16 > > &datain)
 
bool checkSize () const
 sees if the size adds up to the word count More...
 
CSCCLCTDataclctData ()
 
 CSCTMBData ()
 
 CSCTMBData (const CSCTMBData &data)
 
 CSCTMBData (const uint16_t *buf)
 
 CSCTMBData (int firmwareVersion, int firmwareRevision, int ncfebs=5)
 
short unsigned int CWordCnt () const
 
int getCRC () const
 
bool hasRPC () const
 check this before using RPC More...
 
bool hasTMBBlockedCFEB () const
 check this before TMB Block CFEB More...
 
bool hasTMBMiniScope () const
 check this before using TMB mini scope More...
 
bool hasTMBScope () const
 check this before using TMB Scope More...
 
std::bitset< 22 > nextCRC22_D16 (const std::bitset< 16 > &D, const std::bitset< 22 > &C)
 
boost::dynamic_bitset pack ()
 not const because it sets size int TMBTrailer More...
 
CSCRPCDatarpcData ()
 
const unsigned short size () const
 
CSCTMBBlockedCFEBtmbBlockedCFEB () const
 
int TMBCRCcalc ()
 
CSCTMBHeadertmbHeader ()
 
CSCTMBMiniScopetmbMiniScope () const
 
CSCTMBScopetmbScope () const
 
CSCTMBTrailertmbTrailer ()
 
int UnpackTMB (const uint16_t *buf)
 
 ~CSCTMBData ()
 

Static Public Member Functions

static void selfTest ()
 tests packing More...
 
static void setDebug (const bool value)
 

Private Attributes

unsigned short cWordCnt
 
unsigned short size_
 
unsigned theB0CLine
 
bool theBlockedCFEBIsPresent
 
CSCCLCTData theCLCTData
 
unsigned theE0FLine
 
const uint16_t * theOriginalBuffer
 
CSCRPCData theRPCData
 
bool theRPCDataIsPresent
 
CSCTMBBlockedCFEBtheTMBBlockedCFEB
 
CSCTMBHeader theTMBHeader
 
CSCTMBMiniScopetheTMBMiniScope
 
bool theTMBMiniScopeIsPresent
 
CSCTMBScopetheTMBScope
 
bool theTMBScopeIsPresent
 The TMB scope is not present in most of data hence its dynamic. More...
 
CSCTMBTrailer theTMBTrailer
 

Static Private Attributes

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

Detailed Description

Author
A. Tumanov - Rice

Definition at line 24 of file CSCTMBData.h.

Constructor & Destructor Documentation

◆ CSCTMBData() [1/4]

CSCTMBData::CSCTMBData ( )

Definition at line 21 of file CSCTMBData.cc.

22  : theOriginalBuffer(nullptr),
23  theB0CLine(0),
24  theE0FLine(0),
25  theTMBHeader(2007, 0x50c3),
27  theTMBScopeIsPresent(false),
28  theTMBScope(nullptr),
30  theTMBMiniScope(nullptr),
32  theTMBBlockedCFEB(nullptr),
34  size_(0),
35  cWordCnt(0),
36  theRPCDataIsPresent(false) {}

◆ CSCTMBData() [2/4]

CSCTMBData::CSCTMBData ( int  firmwareVersion,
int  firmwareRevision,
int  ncfebs = 5 
)

◆ ~CSCTMBData()

CSCTMBData::~CSCTMBData ( )

Definition at line 109 of file CSCTMBData.cc.

109  {
110  if (theTMBScopeIsPresent) {
111  delete theTMBScope;
112  theTMBScopeIsPresent = false;
113  }
114 
116  delete theTMBMiniScope;
117  theTMBMiniScopeIsPresent = false;
118  }
119 
121  delete theTMBBlockedCFEB;
122  theBlockedCFEBIsPresent = false;
123  }
124 }

References theBlockedCFEBIsPresent, theTMBBlockedCFEB, theTMBMiniScope, theTMBMiniScopeIsPresent, theTMBScope, and theTMBScopeIsPresent.

◆ CSCTMBData() [3/4]

CSCTMBData::CSCTMBData ( const uint16_t *  buf)

Definition at line 59 of file CSCTMBData.cc.

61  theTMBHeader(2007, 0x50c3),
63  theTMBScopeIsPresent(false),
64  theTMBScope(nullptr),
66  theTMBMiniScope(nullptr),
68  theTMBBlockedCFEB(nullptr),
70  theRPCDataIsPresent(false) {
71  size_ = UnpackTMB(buf);
72 }

References visDQMUpload::buf, size_, and UnpackTMB().

◆ CSCTMBData() [4/4]

CSCTMBData::CSCTMBData ( const CSCTMBData data)

Definition at line 76 of file CSCTMBData.cc.

77  : theOriginalBuffer(data.theOriginalBuffer),
78  theB0CLine(data.theB0CLine),
79  theE0FLine(data.theE0FLine),
80  theTMBHeader(data.theTMBHeader),
81  theCLCTData(data.theCLCTData),
82  theRPCData(data.theRPCData),
83  theTMBScopeIsPresent(data.theTMBScopeIsPresent),
84  theTMBMiniScopeIsPresent(data.theTMBMiniScopeIsPresent),
85  theBlockedCFEBIsPresent(data.theBlockedCFEBIsPresent),
86  theTMBTrailer(data.theTMBTrailer),
87  size_(data.size_),
88  cWordCnt(data.cWordCnt),
89  theRPCDataIsPresent(data.theRPCDataIsPresent) {
91  theTMBScope = new CSCTMBScope(*(data.theTMBScope));
92  } else {
93  theTMBScope = nullptr;
94  }
95 
97  theTMBMiniScope = new CSCTMBMiniScope(*(data.theTMBMiniScope));
98  } else {
99  theTMBMiniScope = nullptr;
100  }
101 
103  theTMBBlockedCFEB = new CSCTMBBlockedCFEB(*(data.theTMBBlockedCFEB));
104  } else {
105  theTMBBlockedCFEB = nullptr;
106  }
107 }

References data, theBlockedCFEBIsPresent, theTMBBlockedCFEB, theTMBMiniScope, theTMBMiniScopeIsPresent, theTMBScope, and theTMBScopeIsPresent.

Member Function Documentation

◆ calCRC22()

std::bitset< 22 > CSCTMBData::calCRC22 ( const std::vector< std::bitset< 16 > > &  datain)

Definition at line 338 of file CSCTMBData.cc.

338  {
339  std::bitset<22> CRC;
340  CRC.reset();
341  for (unsigned int i = 0; i < datain.size() - 3; ++i) {
342  CRC = nextCRC22_D16(datain[i], CRC);
343  }
344  return CRC;
345 }

References RawDataTask_cfi::CRC, mps_fire::i, and nextCRC22_D16().

Referenced by pack(), and TMBCRCcalc().

◆ checkSize()

bool CSCTMBData::checkSize ( ) const

sees if the size adds up to the word count

Definition at line 333 of file CSCTMBData.cc.

333  {
334  // sum up all the components and see if they have the size indicated in the TMBTrailer
335  return true;
336 }

Referenced by UnpackTMB().

◆ clctData()

CSCCLCTData* CSCTMBData::clctData ( )
inline

Definition at line 40 of file CSCTMBData.h.

40 { return &theCLCTData; }

References theCLCTData.

Referenced by CSCEventData::add(), CSCEventData::clctData(), and pack().

◆ CWordCnt()

short unsigned int CSCTMBData::CWordCnt ( ) const
inline

Definition at line 35 of file CSCTMBData.h.

35 { return cWordCnt; }

References cWordCnt.

◆ getCRC()

int CSCTMBData::getCRC ( ) const
inline

Definition at line 36 of file CSCTMBData.h.

36 { return theTMBTrailer.crc22(); }

References CSCTMBTrailer::crc22(), and theTMBTrailer.

◆ hasRPC()

bool CSCTMBData::hasRPC ( ) const
inline

check this before using RPC

Definition at line 52 of file CSCTMBData.h.

52 { return theRPCDataIsPresent; }

References theRPCDataIsPresent.

◆ hasTMBBlockedCFEB()

bool CSCTMBData::hasTMBBlockedCFEB ( ) const
inline

check this before TMB Block CFEB

Definition at line 48 of file CSCTMBData.h.

48 { return theBlockedCFEBIsPresent; }

References theBlockedCFEBIsPresent.

◆ hasTMBMiniScope()

bool CSCTMBData::hasTMBMiniScope ( ) const
inline

check this before using TMB mini scope

Definition at line 45 of file CSCTMBData.h.

45 { return theTMBMiniScopeIsPresent; }

References theTMBMiniScopeIsPresent.

◆ hasTMBScope()

bool CSCTMBData::hasTMBScope ( ) const
inline

check this before using TMB Scope

Definition at line 42 of file CSCTMBData.h.

42 { return theTMBScopeIsPresent; }

References theTMBScopeIsPresent.

◆ nextCRC22_D16()

std::bitset< 22 > CSCTMBData::nextCRC22_D16 ( const std::bitset< 16 > &  D,
const std::bitset< 22 > &  C 
)

Definition at line 365 of file CSCTMBData.cc.

365  {
366  std::bitset<22> NewCRC;
367 
368  NewCRC[0] = D[0] ^ C[6];
369  NewCRC[1] = D[1] ^ D[0] ^ C[6] ^ C[7];
370  NewCRC[2] = D[2] ^ D[1] ^ C[7] ^ C[8];
371  NewCRC[3] = D[3] ^ D[2] ^ C[8] ^ C[9];
372  NewCRC[4] = D[4] ^ D[3] ^ C[9] ^ C[10];
373  NewCRC[5] = D[5] ^ D[4] ^ C[10] ^ C[11];
374  NewCRC[6] = D[6] ^ D[5] ^ C[11] ^ C[12];
375  NewCRC[7] = D[7] ^ D[6] ^ C[12] ^ C[13];
376  NewCRC[8] = D[8] ^ D[7] ^ C[13] ^ C[14];
377  NewCRC[9] = D[9] ^ D[8] ^ C[14] ^ C[15];
378  NewCRC[10] = D[10] ^ D[9] ^ C[15] ^ C[16];
379  NewCRC[11] = D[11] ^ D[10] ^ C[16] ^ C[17];
380  NewCRC[12] = D[12] ^ D[11] ^ C[17] ^ C[18];
381  NewCRC[13] = D[13] ^ D[12] ^ C[18] ^ C[19];
382  NewCRC[14] = D[14] ^ D[13] ^ C[19] ^ C[20];
383  NewCRC[15] = D[15] ^ D[14] ^ C[20] ^ C[21];
384  NewCRC[16] = D[15] ^ C[0] ^ C[21];
385  NewCRC[17] = C[1];
386  NewCRC[18] = C[2];
387  NewCRC[19] = C[3];
388  NewCRC[20] = C[4];
389  NewCRC[21] = C[5];
390 
391  return NewCRC;
392 }

References gen::C.

Referenced by calCRC22().

◆ pack()

boost::dynamic_bitset CSCTMBData::pack ( )

not const because it sets size int TMBTrailer

this method is for digi2raw

Definition at line 394 of file CSCTMBData.cc.

394  {
395  boost::dynamic_bitset<> result =
397  boost::dynamic_bitset<> clctData =
400  boost::dynamic_bitset<> newResult = result;
401  // theTMBTrailer.setCRC(TMBCRCcalc());
402 
403  boost::dynamic_bitset<> tmbTrailer =
406 
407  // now convert to a vector<bitset<16>>, so we can calculate the crc
408  std::vector<std::bitset<16> > wordVector;
409  // try to tune so it stops before the e0f line
410  for (unsigned pos = 0; pos < result.size() - 16; pos += 16) {
411  std::bitset<16> word;
412  for (int i = 0; i < 16; ++i) {
413  word[i] = result[pos + i];
414  }
415  wordVector.push_back(word);
416  }
417  theTMBTrailer.setCRC(calCRC22(wordVector).to_ulong());
419  newResult = bitset_utilities::append(newResult, tmbTrailer);
420 
421  return newResult;
422 }

References bitset_utilities::append(), calCRC22(), clctData(), CSCCLCTData::data(), CSCTMBTrailer::data(), CSCTMBHeader::data(), mps_fire::i, mps_fire::result, CSCTMBTrailer::setCRC(), CSCCLCTData::sizeInWords(), CSCTMBTrailer::sizeInWords(), CSCTMBHeader::sizeInWords(), theCLCTData, theTMBHeader, theTMBTrailer, tmbTrailer(), and bitset_utilities::ushortToBitset().

Referenced by CSCEventData::pack().

◆ rpcData()

CSCRPCData* CSCTMBData::rpcData ( )
inline

Definition at line 53 of file CSCTMBData.h.

53 { return &theRPCData; }

References theRPCData.

◆ selfTest()

void CSCTMBData::selfTest ( )
static

tests packing

Definition at line 424 of file CSCTMBData.cc.

424  {
425  CSCTMBData tmbData;
426  cscClassPackerCompare(tmbData);
427 }

References cscClassPackerCompare().

◆ setDebug()

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

Definition at line 34 of file CSCTMBData.h.

34 { debug = value; }

References debug, and relativeConstraints::value.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

◆ size()

const unsigned short CSCTMBData::size ( void  ) const
inline

◆ tmbBlockedCFEB()

CSCTMBBlockedCFEB & CSCTMBData::tmbBlockedCFEB ( ) const

Definition at line 359 of file CSCTMBData.cc.

359  {
361  throw("No TMB Blocked CFEB in this chamber");
362  return *theTMBBlockedCFEB;
363 }

References theBlockedCFEBIsPresent, and theTMBBlockedCFEB.

◆ TMBCRCcalc()

int CSCTMBData::TMBCRCcalc ( )

Definition at line 137 of file CSCTMBData.cc.

137  {
138  std::vector<std::bitset<16> > theTotalTMBData(theE0FLine + 1 - theB0CLine);
139  unsigned i = 0;
140  for (unsigned int line = theB0CLine; line < theE0FLine + 1; ++line) {
141  theTotalTMBData[i] = std::bitset<16>(theOriginalBuffer[line]);
142  ++i;
143  }
144  if (!theTotalTMBData.empty()) {
145  std::bitset<22> CRC = calCRC22(theTotalTMBData);
146  LogTrace("CSCTMBData|CSCRawToDigi") << " Test here " << CRC.to_ulong();
147  return CRC.to_ulong();
148  } else {
149  LogTrace("CSCTMBData|CSCRawToDigi") << "theTotalTMBData doesn't exist";
150  return 0;
151  }
152 }

References calCRC22(), RawDataTask_cfi::CRC, mps_fire::i, mps_splice::line, LogTrace, theB0CLine, theE0FLine, and theOriginalBuffer.

◆ tmbHeader()

CSCTMBHeader* CSCTMBData::tmbHeader ( )
inline

◆ tmbMiniScope()

CSCTMBMiniScope & CSCTMBData::tmbMiniScope ( ) const

Definition at line 353 of file CSCTMBData.cc.

353  {
355  throw("No TMBScope in this chamber");
356  return *theTMBMiniScope;
357 }

References theTMBMiniScope, and theTMBMiniScopeIsPresent.

◆ tmbScope()

CSCTMBScope & CSCTMBData::tmbScope ( ) const

Definition at line 347 of file CSCTMBData.cc.

347  {
349  throw("No TMBScope in this chamber");
350  return *theTMBScope;
351 }

References theTMBScope, and theTMBScopeIsPresent.

◆ tmbTrailer()

CSCTMBTrailer* CSCTMBData::tmbTrailer ( )
inline

Definition at line 50 of file CSCTMBData.h.

50 { return &theTMBTrailer; }

References theTMBTrailer.

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

◆ UnpackTMB()

int CSCTMBData::UnpackTMB ( const uint16_t *  buf)

determine 2007 or 2006 version

assumes that buf starts at the tmb data this is not true if something is wrong in the data before TMB - then we skip the whole event

Now Find the miniscope

end for the mini scope

Now Find the blocked CFEB DiStrips List Format

end for the blocked CFEB DiStrips List Format

Definition at line 154 of file CSCTMBData.cc.

154  {
156  unsigned short int firmwareVersion = 0;
157  int Ntbins = 0;
158  int NRPCtbins = 0; // =VB= number of RPC tbins
159 
160  int b0cLine = 0;
161 
164  if (buf[b0cLine] == 0xdb0c) {
165  firmwareVersion = 2007;
166  Ntbins = buf[b0cLine + 19] & 0xF8;
167  NRPCtbins = (buf[b0cLine + 36] >> 5) & 0x1F; // =VB= get RPC tbins
168  } else if (buf[b0cLine] == 0x6b0c) {
169  firmwareVersion = 2006;
170  Ntbins = buf[b0cLine + 1] & 0x1f;
171  NRPCtbins = Ntbins;
172  } else {
173  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ Can't find b0C flag";
174  }
175 
176  if ((firmwareVersion == 2007) &&
177  (!(((buf[b0cLine] & 0xFFFF) == 0xDB0C) && ((buf[b0cLine + 1] & 0xf000) == 0xD000) &&
178  ((buf[b0cLine + 2] & 0xf000) == 0xD000) && ((buf[b0cLine + 3] & 0xf000) == 0xD000)))) {
179  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ CSCTMBData warning: error in header in 2007 format!";
180  }
181 
182  int MaxSizeRPC = 1 + NRPCtbins * 2 * 4 + 1;
183  //int MaxSizeScope = 5;
184  int e0bLine = -1;
185  switch (firmwareVersion) {
186  case 2007:
187  e0bLine = 42; //last word of header2007
188  break;
189  case 2006:
190  e0bLine = 26; //last word of header in 2006 format
191  break;
192  default:
193  edm::LogError("CSCTMBData|CSCRawToDigi") << "+++ undetermined firmware format - cant find e0bLine";
194  }
195 
197 
198  if (!theTMBHeader.check()) {
199  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ CSCTMBData warning: Bad TMB header e0bLine=" << std::hex
200  << buf[e0bLine];
201  return 0;
202  }
203 
204  int currentPosition = theTMBHeader.sizeInWords();
205  int theFirmwareVersion = theTMBHeader.FirmwareVersion();
206 
207  theCLCTData = CSCCLCTData(theTMBHeader.NCFEBs(), theTMBHeader.NTBins(), buf + e0bLine + 1, theFirmwareVersion);
208 
209  if (!theCLCTData.check()) {
210  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ CSCTMBData warning: Bad CLCT data";
211  } else {
212  currentPosition += theCLCTData.sizeInWords();
213  }
214 
215  //int i = currentPosition-1;
216  //printf ( "%04x %04x %04x %04x\n",buf[i+3],buf[i+2],buf[i+1],buf[i] ) ;
217 
218  // look for RPC
219  int b04Line = currentPosition;
220 
221  if (buf[b04Line] == 0x6b04) {
222  // we need an e04 line to calculate the size
223  int e04Line = findLine(buf, 0x6e04, currentPosition, currentPosition + MaxSizeRPC);
224  if (e04Line != -1) {
225  theRPCDataIsPresent = true;
226  theRPCData = CSCRPCData(buf + b04Line, e04Line - b04Line + 1);
227  currentPosition += theRPCData.sizeInWords();
228  } else {
229  LogTrace("CSCTMBData|CSCRawToDigi") << "CSCTMBData::corrupt RPC data! Failed to find end! ";
230  return 0;
231  }
232  }
233 
234  int TotTMBReadout = 0;
235  switch (firmwareVersion) {
236  case 2007:
237  TotTMBReadout = 43 + Ntbins * 6 * 5 + 1 + NRPCtbins * 2 * 4 + 2 + 8 * 256 + 8;
238  break;
239  case 2006:
240  TotTMBReadout =
241  27 + Ntbins * 6 * 5 + 1 + NRPCtbins * 2 * 4 + 2 + 8 * 256 + 8; //see tmb2004 manual (version v2p06) page54.
242  break;
243  default:
244  edm::LogError("CSCTMBData|CSCRawToDigi") << "can't find TotTMBReadout - unknown firmware version!";
245  break;
246  }
247 
248  //std::cout << " !!!TMB Scope!!! " << std::endl;
249  if (buf[currentPosition] == 0x6b05) {
250  int b05Line = currentPosition;
251  LogTrace("CSCTMBData|CSCRawToDigi") << "found scope!";
252  int e05Line = findLine(buf, 0x6e05, currentPosition, TotTMBReadout - currentPosition);
253  if (e05Line != -1) {
254  theTMBScopeIsPresent = true;
255  theTMBScope = new CSCTMBScope(buf, b05Line, e05Line);
256  // The size of the TMB scope data can vary, and I see no good reasons
257  // not to determine it dynamically. -SV, 5 Nov 2008.
258  //currentPosition+=theTMBScope->sizeInWords();
259  currentPosition += (e05Line - b05Line + 1);
260  } else {
261  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ CSCTMBData warning: found 0x6b05 line, but not 0x6e05! +++";
262  }
263  }
264 
266  if (buf[currentPosition] == 0x6b07) {
267  int Line6b07 = currentPosition;
268  LogTrace("CSCTMBData") << " TMBData ---> Begin of MiniScope found ";
269  int Line6E07 = findLine(buf, 0x6E07, currentPosition, TotTMBReadout - currentPosition);
270  if (Line6E07 != -1) {
271  LogTrace("CSCTMBData") << " TMBData --> End of MiniScope found " << Line6E07 - Line6b07 + 1 << " words ";
273  theTMBMiniScope = new CSCTMBMiniScope(buf, Line6b07, Line6E07);
274  currentPosition += (Line6E07 - Line6b07 + 1);
275  } else {
276  LogTrace("CSCTMBData") << "+++ CSCTMBData warning MiniScope!: found 0x6b07 line, but not 0x6e07! +++";
277  }
278  }
280 
282  if (buf[currentPosition] == 0x6BCB) {
283  int Line6BCB = currentPosition;
284  LogTrace("CSCTMBData") << " TMBData ---> Begin of Blocked CFEB found ";
285  int Line6ECB = findLine(buf, 0x6ECB, currentPosition, TotTMBReadout - currentPosition);
286  if (Line6ECB != -1) {
287  LogTrace("CSCTMBData") << " TMBData --> End of Blocked CFEB found " << Line6ECB - Line6BCB + 1 << " words ";
289  theTMBBlockedCFEB = new CSCTMBBlockedCFEB(buf, Line6BCB, Line6ECB);
290  currentPosition += (Line6ECB - Line6BCB + 1);
291  } else {
292  LogTrace("CSCTMBData") << "+++ CSCTMBData warning Blocked CFEB!: found 0x6BCB line, but not 0x6ECB! +++";
293  }
294  }
296 
297  int maxLine = findLine(buf, 0xde0f, currentPosition, TotTMBReadout - currentPosition);
298  if (maxLine == -1) {
299  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ CSCTMBData warning: No e0f line!";
300  return 0;
301  }
302 
303  //Now for CRC check put this information into bitset
304 
305  theB0CLine = b0cLine;
306  theE0FLine = maxLine;
307 
308  // finally, the trailer
309  int e0cLine = findLine(buf, 0x6e0c, currentPosition, maxLine);
310  if (e0cLine == -1) {
311  LogTrace("CSCTMBData|CSCRawToDigi") << "+++ CSCTMBData warning: No e0c line!";
312  } else {
314  LogTrace("CSCTMBData|CSCRawToDigi") << "TMB trailer size: " << theTMBTrailer.sizeInWords();
315  }
316 
317  checkSize();
318 
319  // Dump of TMB; format proposed by JK.
320 #ifdef TMBDUMP
321  LogTrace("CSCTMBData") << "Dump of TMB data:";
322  for (int line = b0cLine; line <= maxLine + 3; line++) {
323  LogTrace("CSCTMBData") << "Adr= " << std::setw(4) << line << " Data= " << std::setfill('0') << std::setw(5)
324  << std::uppercase << std::hex << buf[line] << std::dec << std::endl;
325  }
326 #endif
327 
328  // size, since we count from 0 and have one more trailer word
329  // there are sometimes multiple "de0f" lines in trailer, so key on "6e0c"
330  return e0cLine - b0cLine + theTMBTrailer.sizeInWords();
331 } //UnpackTMB

References visDQMUpload::buf, CSCCLCTData::check(), CSCTMBHeader::check(), checkSize(), TauDecayModes::dec, findLine(), simCaloStage2Layer1Digis_cfi::firmwareVersion, CSCTMBHeader::FirmwareVersion(), mps_splice::line, LogTrace, CSCTMBHeader::NCFEBs(), CSCTMBHeader::NTBins(), CSCRPCData::sizeInWords(), CSCCLCTData::sizeInWords(), CSCTMBTrailer::sizeInWords(), CSCTMBHeader::sizeInWords(), theB0CLine, theBlockedCFEBIsPresent, theCLCTData, theE0FLine, theRPCData, theRPCDataIsPresent, theTMBBlockedCFEB, theTMBHeader, theTMBMiniScope, theTMBMiniScopeIsPresent, theTMBScope, theTMBScopeIsPresent, and theTMBTrailer.

Referenced by CSCTMBData().

Member Data Documentation

◆ cWordCnt

unsigned short CSCTMBData::cWordCnt
private

Definition at line 98 of file CSCTMBData.h.

Referenced by CWordCnt().

◆ debug

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

◆ size_

unsigned short CSCTMBData::size_
private

Definition at line 97 of file CSCTMBData.h.

Referenced by CSCTMBData(), and size().

◆ theB0CLine

unsigned CSCTMBData::theB0CLine
private

CRC calc needs to know where 0x6B0C and 0x6E0F lines were we want to put off CRC calc until needed

Definition at line 73 of file CSCTMBData.h.

Referenced by TMBCRCcalc(), and UnpackTMB().

◆ theBlockedCFEBIsPresent

bool CSCTMBData::theBlockedCFEBIsPresent
private

Definition at line 88 of file CSCTMBData.h.

Referenced by CSCTMBData(), hasTMBBlockedCFEB(), tmbBlockedCFEB(), UnpackTMB(), and ~CSCTMBData().

◆ theCLCTData

CSCCLCTData CSCTMBData::theCLCTData
private

Definition at line 77 of file CSCTMBData.h.

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

◆ theE0FLine

unsigned CSCTMBData::theE0FLine
private

Definition at line 74 of file CSCTMBData.h.

Referenced by TMBCRCcalc(), and UnpackTMB().

◆ theOriginalBuffer

const uint16_t* CSCTMBData::theOriginalBuffer
private

@ not sure what this means for simulation. I keep this around so we can calculate CRCs

Definition at line 70 of file CSCTMBData.h.

Referenced by TMBCRCcalc().

◆ theRPCData

CSCRPCData CSCTMBData::theRPCData
private

Definition at line 78 of file CSCTMBData.h.

Referenced by rpcData(), and UnpackTMB().

◆ theRPCDataIsPresent

bool CSCTMBData::theRPCDataIsPresent
private

Definition at line 99 of file CSCTMBData.h.

Referenced by hasRPC(), and UnpackTMB().

◆ theTMBBlockedCFEB

CSCTMBBlockedCFEB* CSCTMBData::theTMBBlockedCFEB
private

Definition at line 89 of file CSCTMBData.h.

Referenced by CSCTMBData(), tmbBlockedCFEB(), UnpackTMB(), and ~CSCTMBData().

◆ theTMBHeader

CSCTMBHeader CSCTMBData::theTMBHeader
private

Definition at line 76 of file CSCTMBData.h.

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

◆ theTMBMiniScope

CSCTMBMiniScope* CSCTMBData::theTMBMiniScope
private

Definition at line 86 of file CSCTMBData.h.

Referenced by CSCTMBData(), tmbMiniScope(), UnpackTMB(), and ~CSCTMBData().

◆ theTMBMiniScopeIsPresent

bool CSCTMBData::theTMBMiniScopeIsPresent
private

The TMB MiniScope must presen in every event, hovewer make it dynamic as for the main scope

Definition at line 85 of file CSCTMBData.h.

Referenced by CSCTMBData(), hasTMBMiniScope(), tmbMiniScope(), UnpackTMB(), and ~CSCTMBData().

◆ theTMBScope

CSCTMBScope* CSCTMBData::theTMBScope
private

Definition at line 81 of file CSCTMBData.h.

Referenced by CSCTMBData(), tmbScope(), UnpackTMB(), and ~CSCTMBData().

◆ theTMBScopeIsPresent

bool CSCTMBData::theTMBScopeIsPresent
private

The TMB scope is not present in most of data hence its dynamic.

Definition at line 80 of file CSCTMBData.h.

Referenced by CSCTMBData(), hasTMBScope(), tmbScope(), UnpackTMB(), and ~CSCTMBData().

◆ theTMBTrailer

CSCTMBTrailer CSCTMBData::theTMBTrailer
private

Definition at line 91 of file CSCTMBData.h.

Referenced by CSCTMBData(), getCRC(), pack(), tmbTrailer(), and UnpackTMB().

CSCTMBBlockedCFEB
Definition: CSCTMBBlockedCFEB.h:13
CSCTMBData::theTMBTrailer
CSCTMBTrailer theTMBTrailer
Definition: CSCTMBData.h:91
mps_fire.i
i
Definition: mps_fire.py:355
CSCTMBHeader::FirmwareVersion
int FirmwareVersion() const
Definition: CSCTMBHeader.h:34
CSCTMBData::size_
unsigned short size_
Definition: CSCTMBData.h:97
CSCTMBData::theTMBScope
CSCTMBScope * theTMBScope
Definition: CSCTMBData.h:81
CSCTMBData::checkSize
bool checkSize() const
sees if the size adds up to the word count
Definition: CSCTMBData.cc:333
pos
Definition: PixelAliasList.h:18
CSCTMBScope
Definition: CSCTMBScope.h:15
CSCTMBData::theBlockedCFEBIsPresent
bool theBlockedCFEBIsPresent
Definition: CSCTMBData.h:88
CSCCLCTData::check
bool check() const
Definition: CSCCLCTData.cc:295
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
CSCTMBData::tmbTrailer
CSCTMBTrailer * tmbTrailer()
Definition: CSCTMBData.h:50
CSCTMBData::theTMBMiniScopeIsPresent
bool theTMBMiniScopeIsPresent
Definition: CSCTMBData.h:85
CSCTMBData::clctData
CSCCLCTData * clctData()
Definition: CSCTMBData.h:40
CSCTMBData::theRPCDataIsPresent
bool theRPCDataIsPresent
Definition: CSCTMBData.h:99
CSCTMBData::theTMBHeader
CSCTMBHeader theTMBHeader
Definition: CSCTMBData.h:76
CSCTMBData::calCRC22
std::bitset< 22 > calCRC22(const std::vector< std::bitset< 16 > > &datain)
Definition: CSCTMBData.cc:338
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
simCaloStage2Layer1Digis_cfi.firmwareVersion
firmwareVersion
Definition: simCaloStage2Layer1Digis_cfi.py:21
CSCTMBTrailer::data
unsigned short * data()
Definition: CSCTMBTrailer.h:43
CSCTMBData::cWordCnt
unsigned short cWordCnt
Definition: CSCTMBData.h:98
CSCTMBData::theTMBBlockedCFEB
CSCTMBBlockedCFEB * theTMBBlockedCFEB
Definition: CSCTMBData.h:89
CSCTMBData::nextCRC22_D16
std::bitset< 22 > nextCRC22_D16(const std::bitset< 16 > &D, const std::bitset< 22 > &C)
Definition: CSCTMBData.cc:365
CSCTMBHeader::NTBins
uint16_t NTBins() const
Definition: CSCTMBHeader.h:56
CSCTMBData::theTMBMiniScope
CSCTMBMiniScope * theTMBMiniScope
Definition: CSCTMBData.h:86
CSCCLCTData::data
unsigned short * data()
Definition: CSCCLCTData.h:39
CSCTMBHeader::NCFEBs
uint16_t NCFEBs() const
Definition: CSCTMBHeader.h:57
CSCTMBData::theTMBScopeIsPresent
bool theTMBScopeIsPresent
The TMB scope is not present in most of data hence its dynamic.
Definition: CSCTMBData.h:80
edm::LogError
Definition: MessageLogger.h:183
CSCCLCTData::sizeInWords
int sizeInWords() const
in 16-bit words
Definition: CSCCLCTData.h:41
CSCTMBTrailer
Definition: CSCTMBTrailer.h:28
findLine
int findLine(const uint16_t *buf, uint16_t marker, int first, int maxToDo)
Definition: CSCTMBData.cc:128
CSCTMBData
Definition: CSCTMBData.h:24
RawDataTask_cfi.CRC
CRC
Definition: RawDataTask_cfi.py:59
CSCTMBData::UnpackTMB
int UnpackTMB(const uint16_t *buf)
Definition: CSCTMBData.cc:154
CSCTMBHeader::check
bool check() const
Definition: CSCTMBHeader.h:85
CSCTMBData::theOriginalBuffer
const uint16_t * theOriginalBuffer
Definition: CSCTMBData.h:70
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCTMBMiniScope
Definition: CSCTMBMiniScope.h:13
CSCTMBHeader
Definition: CSCTMBHeader.h:25
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
gen::C
C
Definition: PomwigHadronizer.cc:76
CSCTMBTrailer::crc22
unsigned int crc22() const
Definition: CSCTMBTrailer.cc:51
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
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CSCTMBTrailer::setCRC
void setCRC(int crc)
Definition: CSCTMBTrailer.cc:55
cscClassPackerCompare
bool cscClassPackerCompare(T &t)
Definition: cscPackerCompare.h:28
CSCTMBHeader::setNCFEBs
void setNCFEBs(uint16_t ncfebs)
Definition: CSCTMBHeader.h:64
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
CSCTMBData::theB0CLine
unsigned theB0CLine
Definition: CSCTMBData.h:73
mps_fire.result
result
Definition: mps_fire.py:303
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
CSCCLCTData
Definition: CSCCLCTData.h:24
CSCRPCData::sizeInWords
int sizeInWords()
Definition: CSCRPCData.h:21
CSCTMBHeader::sizeInWords
unsigned short int sizeInWords() const
Definition: CSCTMBHeader.h:76
mps_splice.line
line
Definition: mps_splice.py:76
CSCTMBHeader::data
unsigned short * data()
Definition: CSCTMBHeader.h:80
CSCTMBData::theE0FLine
unsigned theE0FLine
Definition: CSCTMBData.h:74
CSCTMBTrailer::sizeInWords
int sizeInWords() const
in 16-bit frames
Definition: CSCTMBTrailer.h:42
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
CSCTMBData::theCLCTData
CSCCLCTData theCLCTData
Definition: CSCTMBData.h:77
CSCTMBData::theRPCData
CSCRPCData theRPCData
Definition: CSCTMBData.h:78
CSCTMBData::debug
static std::atomic< bool > debug
Definition: CSCTMBData.h:95
CSCRPCData
Definition: CSCRPCData.h:11