CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 (int chamberType)
 
 CSCALCTHeader (const unsigned short *buf)
 for packing More...
 
 CSCALCTHeader (const CSCALCTStatusDigi &digi)
 
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 setDAVForChannel (int wireGroup)
 
void setEventInformation (const CSCDMBHeader &)
 
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 bool debug =false
 
static unsigned short int firmwareVersion =2007
 

Detailed Description

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

Definition at line 18 of file CSCALCTHeader.h.

Member Enumeration Documentation

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 37 of file CSCALCTHeader.h.

Constructor & Destructor Documentation

CSCALCTHeader::CSCALCTHeader ( int  chamberType)
explicit

Definition at line 11 of file CSCALCTHeader.cc.

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

Referenced by CSCALCTHeader().

12 : header2006(chamberType),
13  header2007(chamberType)
14 { //constructor for digi->raw packing based on header2006
15  if (firmwareVersion==2006)
16  {
18  }
19  else if(firmwareVersion==2007)
20  {
22  // assume no virtex or masks or registers
24  theALCTs.resize(header2007.lctBins*2);
25  }
26  else
27  {
28  edm::LogError("CSCALCTHeader|CSCRawToDigi")
29  <<"Cannot construct ALCT header: ALCT firmware version is bad/not defined!" << firmwareVersion;
30  }
31 
32 }
short unsigned int sizeInWords() const
static unsigned short int firmwareVersion
unsigned short int theOriginalBuffer[116]
CSCALCTHeader2006 header2006
static short unsigned int sizeInWords()
std::vector< CSCALCT > theALCTs
CSCALCTHeader2007 header2007
unsigned short int sizeInWords2007_
size of the 2007 header in words
short unsigned int sizeInWords() const
for packing
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 34 of file CSCALCTHeader.cc.

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

34  {
39  static unsigned short int collisionMaskWordcount[7] = { 8, 8,12,16,16,24,28};
40  static unsigned short int hotChannelMaskWordcount[7] = {18,18,24,36,36,48,60};
41 
43  if (buf[0]==0xDB0A) {
44  firmwareVersion=2007;
45  }
46  else if ( (buf[0]&0xF800)==0x6000 ) {
47  firmwareVersion=2006;
48  }
49  else {
50  edm::LogError("CSCALCTHeader|CSCRawToDigi") << "failed to determine ALCT firmware version!!";
51  }
52 
53  LogTrace("CSCALCTHeader|CSCRawToDigi") << "firmware version - " << firmwareVersion;
54 
56  switch (firmwareVersion) {
57  case 2006:
58  memcpy(&header2006, buf, header2006.sizeInWords()*2);
59  buf +=header2006.sizeInWords();
60  memcpy(&alcts2006, buf, alcts2006.sizeInWords()*2);
61  buf +=alcts2006.sizeInWords();
62  break;
63 
64  case 2007:
65  memcpy(&header2007, buf, header2007.sizeInWords()*2);
66  buf +=header2007.sizeInWords();
69  if (header2007.configPresent==1) {
70  memcpy(&virtexID, buf, virtexID.sizeInWords()*2);
71  buf +=virtexID.sizeInWords();
73  memcpy(&configRegister, buf, configRegister.sizeInWords()*2);
76 
77  collisionMasks.resize(collisionMaskWordcount[header2007.boardType]);
78  for (unsigned int i=0; i<collisionMaskWordcount[header2007.boardType]; ++i){
79  memcpy(&collisionMasks[i], buf, collisionMasks[i].sizeInWords()*2);
80  buf += collisionMasks[i].sizeInWords();
81  sizeInWords2007_ += collisionMasks[i].sizeInWords();
82  }
83 
84  hotChannelMasks.resize(hotChannelMaskWordcount[header2007.boardType]);
85  for (unsigned int i=0; i<hotChannelMaskWordcount[header2007.boardType]; ++i) {
86  memcpy(&hotChannelMasks[i], buf, hotChannelMasks[i].sizeInWords()*2);
87  buf += hotChannelMasks[i].sizeInWords();
88  sizeInWords2007_ += hotChannelMasks[i].sizeInWords();
89  }
90  }
91 
92  theALCTs.resize(header2007.lctBins*2);
93  for (int i=0; i<header2007.lctBins*2; ++i) {
94  memcpy(&theALCTs[i], buf, theALCTs[i].sizeInWords()*2);
95  buf += theALCTs[i].sizeInWords();
96  sizeInWords2007_ += theALCTs[i].sizeInWords();
97  }
98 
99  ALCTDigis();
100  break;
101 
102  default:
103  edm::LogError("CSCALCTHeader|CSCRawToDigi")
104  <<"couldn't construct: ALCT firmware version is bad/not defined!";
105  break;
106  }
107 
109  if ((firmwareVersion==2006)||(firmwareVersion==2007))
110  memcpy(theOriginalBuffer, buf-sizeInWords(), sizeInWords()*2);
111 
112 }
int i
Definition: DBlmapReader.cc:9
std::vector< CSCHotChannelMask > hotChannelMasks
std::vector< CSCCollisionMask > collisionMasks
CSCVirtexID virtexID
short unsigned int sizeInWords() const
short unsigned int sizeInWords() const
short unsigned int sizeInWords() const
static unsigned short int firmwareVersion
CSCConfigurationRegister configRegister
CSCALCTs2006 alcts2006
short unsigned int sizeInWords() const
unsigned short int theOriginalBuffer[116]
CSCALCTHeader2006 header2006
std::vector< CSCALCT > theALCTs
CSCALCTHeader2007 header2007
#define LogTrace(id)
unsigned short int sizeInWords2007_
size of the 2007 header in words
int sizeInWords()
in 16-bit words
Definition: CSCALCTHeader.h:98
std::vector< CSCALCTDigi > ALCTDigis() const
short unsigned int sizeInWords() const
for packing
CSCALCTHeader::CSCALCTHeader ( const CSCALCTStatusDigi digi)

Definition at line 115 of file CSCALCTHeader.cc.

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

115  {
116  CSCALCTHeader(digi.header());
117 }
CSCALCTHeader(int chamberType)
const uint16_t * header() const
Data Accessors.

Member Function Documentation

unsigned short int CSCALCTHeader::ActiveFEBs ( ) const
inline

Definition at line 82 of file CSCALCTHeader.h.

References CSCALCTHeader2006::activeFEBs, and header2006.

82 {return header2006.activeFEBs;}
CSCALCTHeader2006 header2006
unsigned activeFEBs
LCT chips with ADB hits.
void CSCALCTHeader::add ( const std::vector< CSCALCTDigi > &  digis)

Definition at line 169 of file CSCALCTHeader.cc.

References CSCALCTs2006::add(), alcts2006, firmwareVersion, header2007, i, CSCALCTHeader2007::lctBins, q1, q2, theALCTs, and TrackValidation_HighPurity_cff::valid.

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

170 {
171  if(firmwareVersion == 2006) {
172  alcts2006.add(digis);
173  }
174  else if(firmwareVersion == 2007) {
175  if(theALCTs.empty())
176  {
177  theALCTs.resize(header2007.lctBins*2);
178  }
179  for(std::vector<CSCALCTDigi>::const_iterator digi = digis.begin();
180  digi != digis.end(); ++digi)
181  {
182  int bx = digi->getBX();
183  if(bx < (int)header2007.lctBins)
184  {
185  // 2 ALCTs per bx
186  int i = bx*2;
187  int q1 = theALCTs[i].quality;
188  int q2 = theALCTs[i+1].quality;
189  // see if it's non=blank
190  if(!theALCTs[i].valid)
191  {
192  theALCTs[i] = CSCALCT(*digi);
193  }
194  // new best LCT
195  else if(digi->getQuality() > q1)
196  {
197  theALCTs[i+1] = theALCTs[i];
198  theALCTs[i] = CSCALCT(*digi);
199  }
200  // new second best
201  else if(!theALCTs[i+1].valid || (digi->getQuality() > q2))
202  {
203  theALCTs[i+1] = CSCALCT(*digi);
204  }
205  }
206  }
207  }
208 }
int i
Definition: DBlmapReader.cc:9
static unsigned short int firmwareVersion
CSCALCTs2006 alcts2006
double q2[4]
Definition: TauolaWrapper.h:88
std::vector< CSCALCT > theALCTs
CSCALCTHeader2007 header2007
double q1[4]
Definition: TauolaWrapper.h:87
void add(const std::vector< CSCALCTDigi > &digis)
should try to sort, but doesn&#39;t for now
std::vector< CSCALCTDigi > CSCALCTHeader::ALCTDigis ( ) const

loop over all alct words

Definition at line 138 of file CSCALCTHeader.cc.

References CSCALCTs2006::ALCTDigis(), alcts2006, BXNCount(), firmwareVersion, i, listBenchmarks::pattern, query::result, theALCTs, and TrackValidation_HighPurity_cff::valid.

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

139 {
140  std::vector<CSCALCTDigi> result;
141 
142  switch (firmwareVersion) {
143  case 2006:
144  {
145  result = alcts2006.ALCTDigis();
146  break;
147  }
148  case 2007:
149  {
150  result.reserve(theALCTs.size());
151  for (unsigned int i=0; i<theALCTs.size(); ++i) {
152  CSCALCTDigi digi(theALCTs[i].valid, theALCTs[i].quality, theALCTs[i].accel, theALCTs[i].pattern,
153  theALCTs[i].keyWire, (int)i/2, i%2+1);
154  result.push_back(digi);
155  }
156  break;
157  }
158  default:
159  edm::LogError("CSCALCTHeader|CSCRawToDigi")
160  <<"Empty Digis: ALCT firmware version is bad/not defined!" << firmwareVersion;
161  break;
162  }
163  for(unsigned i = 0; i < result.size(); ++i) {result[i].setFullBX(BXNCount());}
164  return result;
165 
166 }
int i
Definition: DBlmapReader.cc:9
static unsigned short int firmwareVersion
CSCALCTs2006 alcts2006
tuple result
Definition: query.py:137
std::vector< CSCALCT > theALCTs
std::vector< CSCALCTDigi > ALCTDigis() const
unsigned short int BXNCount() const
Definition: CSCALCTHeader.h:55
unsigned short int CSCALCTHeader::alctFirmwareVersion ( ) const
inline

Definition at line 86 of file CSCALCTHeader.h.

References firmwareVersion.

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

86 {return firmwareVersion;}
static unsigned short int firmwareVersion
CSCALCTHeader2006 CSCALCTHeader::alctHeader2006 ( ) const
inline

Definition at line 93 of file CSCALCTHeader.h.

References header2006.

93 {return header2006;}
CSCALCTHeader2006 header2006
CSCALCTHeader2007 CSCALCTHeader::alctHeader2007 ( ) const
inline

Definition at line 92 of file CSCALCTHeader.h.

References header2007.

Referenced by CSCAnodeData2007::init().

92 {return header2007;}
CSCALCTHeader2007 header2007
unsigned short int CSCALCTHeader::BoardID ( ) const
inline

Definition at line 52 of file CSCALCTHeader.h.

References CSCALCTHeader2006::boardID, and header2006.

52 {return header2006.boardID;}
CSCALCTHeader2006 header2006
unsigned boardID
ALCT2000 board ID.
unsigned short int CSCALCTHeader::BXNCount ( ) const
inline

Definition at line 55 of file CSCALCTHeader.h.

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

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

55  {
56  switch (firmwareVersion)
57  {
58  case 2006:
59  return header2006.bxnCount;
60  case 2007:
61  return header2007.bxnCount;
62  default:
63  edm::LogError("CSCALCTHeader|CSCRawToDigi")
64  <<"trying to access BXNcount: ALCT firmware version is bad/not defined!";
65  return 0;
66  }
67  }
unsigned bxnCount
full bunch crossing number
static unsigned short int firmwareVersion
CSCALCTHeader2006 header2006
CSCALCTHeader2007 header2007
bool CSCALCTHeader::check ( ) const
inline

Definition at line 112 of file CSCALCTHeader.h.

References firmwareVersion, CSCALCTHeader2007::flag1, CSCALCTHeader2006::flag_0, header2006, and header2007.

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

112  {
113  switch (firmwareVersion)
114  {
115  case 2006:
116  return header2006.flag_0 == 0xC;
117  case 2007:
118  return header2007.flag1 == 0xDB0A;
119  default:
120  edm::LogError("CSCALCTHeader|CSCRawToDigi")
121  <<"check(): ALCT firmware version is bad/not defined!";
122  return 0;
123  }
124  }
static unsigned short int firmwareVersion
CSCALCTHeader2006 header2006
CSCALCTHeader2007 header2007
unsigned flag_0
should be &#39;01100&#39;, so it&#39;ll be a 6xxx in the ASCII dump
unsigned short int CSCALCTHeader::CSCID ( ) const
inline

Definition at line 54 of file CSCALCTHeader.h.

References CSCALCTHeader2006::cscID, and header2006.

Referenced by operator<<().

54 {return header2006.cscID;}
CSCALCTHeader2006 header2006
unsigned cscID
chamber ID number
unsigned short int* CSCALCTHeader::data ( )
inline

Definition at line 95 of file CSCALCTHeader.h.

References theOriginalBuffer.

Referenced by CSCEventData::unpack_data().

95 {return theOriginalBuffer;}
unsigned short int theOriginalBuffer[116]
unsigned short int CSCALCTHeader::ExtTrig ( ) const
inline

Definition at line 53 of file CSCALCTHeader.h.

References CSCALCTHeader2006::extTrig, and header2006.

53 {return header2006.extTrig;}
unsigned extTrig
trigger source was external
CSCALCTHeader2006 header2006
unsigned short int CSCALCTHeader::FIFOMode ( ) const
inline

Definition at line 38 of file CSCALCTHeader.h.

References CSCALCTHeader2006::fifoMode, and header2006.

38 {return header2006.fifoMode;}
unsigned fifoMode
see the FIFO_MODE enum
CSCALCTHeader2006 header2006
unsigned short int CSCALCTHeader::L1Acc ( ) const
inline

Definition at line 68 of file CSCALCTHeader.h.

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

Referenced by operator<<(), and cscdqm::EventProcessor::processCSC().

68  {
69  switch (firmwareVersion)
70  {
71  case 2006:
72  return header2006.l1Acc;
73  case 2007:
74  return header2007.l1aCounter;
75  default:
76  edm::LogError("CSCALCTHeader|CSCRawToDigi")
77  <<"trying to access L1Acc: ALCT firmware version is bad/not defined!";
78  return 0;
79  }
80  }
static unsigned short int firmwareVersion
CSCALCTHeader2006 header2006
CSCALCTHeader2007 header2007
unsigned l1Acc
l1 accept counter
unsigned short int CSCALCTHeader::L1AMatch ( ) const
inline

Definition at line 81 of file CSCALCTHeader.h.

References header2006, and CSCALCTHeader2006::l1aMatch.

81 {return header2006.l1aMatch;}
CSCALCTHeader2006 header2006
unsigned l1aMatch
exteran L1A arrived in L1A window
unsigned short int CSCALCTHeader::LCTChipRead ( ) const
inline

Definition at line 85 of file CSCALCTHeader.h.

References header2006, and CSCALCTHeader2006::lctChipRead.

85 {return header2006.lctChipRead;}
CSCALCTHeader2006 header2006
unsigned lctChipRead
LCT chips read out in raw hit dump.
unsigned short CSCALCTHeader::nLCTChipRead ( ) const

for packing

header2006 method

Definition at line 124 of file CSCALCTHeader.cc.

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

124  {
125  if(firmwareVersion == 2006) {
126  return header2006.nLCTChipRead();
127  }
128  else {
129  // nLCTChip obsolete in ALCT2007 format (email Andrey K. & Victor B., 20.10.2008)
130  // and we don't think anyone makes uses of this call.
131  // edm::LogError("CSCALCTHeader|CSCRawToDigi")
132  // <<"How is nLCTChipRead() supposed to work for ALCTHeader2007?";
133  }
134  return 0;
135 }
static unsigned short int firmwareVersion
CSCALCTHeader2006 header2006
unsigned short nLCTChipRead() const
unsigned short int CSCALCTHeader::NTBins ( ) const
inline

Definition at line 39 of file CSCALCTHeader.h.

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

Referenced by operator<<().

39  {
40  switch (firmwareVersion)
41  {
42  case 2006:
43  return header2006.nTBins;
44  case 2007:
45  return header2007.rawBins;
46  default:
47  edm::LogError("CSCALCTHeader|CSCRawToDigi")
48  <<"trying to access NTBINs: ALCT firmware version is bad/not defined!";
49  return 0;
50  }
51  }
static unsigned short int firmwareVersion
CSCALCTHeader2006 header2006
CSCALCTHeader2007 header2007
unsigned nTBins
of 25 ns time bins in the raw dump
boost::dynamic_bitset CSCALCTHeader::pack ( )

Definition at line 211 of file CSCALCTHeader.cc.

References alcts2006, bitset_utilities::append(), firmwareVersion, errorMatrix2Lands::header, header2006, header2007, i, query::result, CSCALCTHeader2006::sizeInWords(), CSCALCTHeader2007::sizeInWords(), CSCALCTs2006::sizeInWords(), sizeInWords(), theALCTs, and bitset_utilities::ushortToBitset().

Referenced by pyrootRender.interactiveRender::draw(), and CSCEventData::pack().

212 {
213  boost::dynamic_bitset<> result;
214  if(firmwareVersion == 2006)
215  {
216  boost::dynamic_bitset<> header
218  (unsigned short *) &header2006);
219  boost::dynamic_bitset<> alcts
221  (unsigned short *) &alcts2006);
222  result = bitset_utilities::append(header, alcts);
223  }
224 
225  else if(firmwareVersion == 2007)
226  {
228  (unsigned short *) &header2007);
229 
230  for (unsigned i = 0; i < theALCTs.size(); ++i)
231  {
232  boost::dynamic_bitset<> alct
234  (unsigned short *) &theALCTs[i]);
235  result = bitset_utilities::append(result, alct);
236  }
237  }
238  return result;
239 }
int i
Definition: DBlmapReader.cc:9
short unsigned int sizeInWords() const
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 ...
short unsigned int sizeInWords() const
static unsigned short int firmwareVersion
CSCALCTs2006 alcts2006
CSCALCTHeader2006 header2006
tuple result
Definition: query.py:137
std::vector< CSCALCT > theALCTs
CSCALCTHeader2007 header2007
int sizeInWords()
in 16-bit words
Definition: CSCALCTHeader.h:98
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...
short unsigned int sizeInWords() const
for packing
unsigned short int CSCALCTHeader::Promote1 ( ) const
inline

Definition at line 83 of file CSCALCTHeader.h.

References header2006, and CSCALCTHeader2006::promote1.

83 {return header2006.promote1;}
unsigned promote1
promotion bit for 1st LCT pattern
CSCALCTHeader2006 header2006
unsigned short int CSCALCTHeader::Promote2 ( ) const
inline

Definition at line 84 of file CSCALCTHeader.h.

References header2006, and CSCALCTHeader2006::promote2.

84 {return header2006.promote2;}
CSCALCTHeader2006 header2006
unsigned promote2
promotion bit for 2nd LCT pattern
void CSCALCTHeader::selfTest ( int  firmware)
static

tests that we unpack what we packed

Definition at line 243 of file CSCALCTHeader.cc.

References add(), firmwareVersion, CSCDetId::iChamberType(), and relativeConstraints::station.

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

Definition at line 87 of file CSCALCTHeader.h.

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

Referenced by CSCEventData::add().

87  {
88  if(firmwareVersion == 2006) {
89  header2006.setDAV((wireGroup-1)/16);
90  }
91  }
static unsigned short int firmwareVersion
CSCALCTHeader2006 header2006
void setDAV(int afebBoard)
for packing
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 27 of file CSCALCTHeader.h.

References debug, and relativeConstraints::value.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

27 {debug = value;};
static bool debug
void CSCALCTHeader::setEventInformation ( const CSCDMBHeader dmb)

Definition at line 119 of file CSCALCTHeader.cc.

References header2006, and CSCALCTHeader2006::setEventInformation().

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

119  {
121 }
void setEventInformation(const CSCDMBHeader &)
CSCALCTHeader2006 header2006
int CSCALCTHeader::sizeInWords ( )
inline

in 16-bit words

Definition at line 98 of file CSCALCTHeader.h.

References firmwareVersion, and sizeInWords2007_.

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

98  {
99  switch (firmwareVersion)
100  {
101  case 2006:
102  return 8;
103  case 2007:
104  return sizeInWords2007_;
105  default:
106  edm::LogError("CSCALCTHeader|CSCRawToDigi")
107  <<"SizeInWords(): ALCT firmware version is bad/not defined!";
108  return 0;
109  }
110  }
static unsigned short int firmwareVersion
unsigned short int sizeInWords2007_
size of the 2007 header in words

Member Data Documentation

CSCALCTs2006 CSCALCTHeader::alcts2006
private

Definition at line 137 of file CSCALCTHeader.h.

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

unsigned short int CSCALCTHeader::bxn0
private

Definition at line 151 of file CSCALCTHeader.h.

unsigned short int CSCALCTHeader::bxn1
private

Definition at line 151 of file CSCALCTHeader.h.

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

Definition at line 140 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

CSCConfigurationRegister CSCALCTHeader::configRegister
private

Definition at line 139 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

bool CSCALCTHeader::debug =false
staticprivate

Definition at line 147 of file CSCALCTHeader.h.

Referenced by setDebug().

short unsigned int CSCALCTHeader::firmwareVersion =2007
staticprivate
CSCALCTHeader2006 CSCALCTHeader::header2006
private
CSCALCTHeader2007 CSCALCTHeader::header2007
private

Definition at line 135 of file CSCALCTHeader.h.

Referenced by add(), alctHeader2007(), BXNCount(), check(), CSCALCTHeader(), L1Acc(), NTBins(), and pack().

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

Definition at line 141 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().

unsigned short int CSCALCTHeader::sizeInWords2007_
private

size of the 2007 header in words

Definition at line 151 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader(), and sizeInWords().

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

Definition at line 136 of file CSCALCTHeader.h.

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

unsigned short int CSCALCTHeader::theOriginalBuffer[116]
private

Definition at line 145 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader(), and data().

CSCVirtexID CSCALCTHeader::virtexID
private

Definition at line 138 of file CSCALCTHeader.h.

Referenced by CSCALCTHeader().