13 : header2006(chamberType),
14 header2007(chamberType)
30 <<
"Cannot construct ALCT header: ALCT firmware version is bad/not defined!" <<
firmwareVersion;
40 constexpr unsigned short int collisionMaskWordcount[7] = { 8, 8,12,16,16,24,28};
41 constexpr unsigned short int hotChannelMaskWordcount[7] = {18,18,24,36,36,48,60};
47 else if ( (buf[0]&0xF800)==0x6000 ) {
51 edm::LogError(
"CSCALCTHeader|CSCRawToDigi") <<
"failed to determine ALCT firmware version!!";
105 <<
"couldn't construct: ALCT firmware version is bad/not defined!";
141 std::vector<CSCALCTDigi>
result;
155 result.push_back(digi);
161 <<
"Empty Digis: ALCT firmware version is bad/not defined!" <<
firmwareVersion;
164 for(
unsigned i = 0;
i < result.size(); ++
i) {result[
i].setFullBX(
BXNCount());}
180 for(std::vector<CSCALCTDigi>::const_iterator digi = digis.begin();
181 digi != digis.end(); ++digi)
183 int bx = digi->getBX();
196 else if(digi->getQuality() >
q1)
202 else if(!
theALCTs[i+1].valid || (digi->getQuality() >
q2))
214 boost::dynamic_bitset<>
result;
217 boost::dynamic_bitset<> header
220 boost::dynamic_bitset<> alcts
233 boost::dynamic_bitset<> alct
255 std::vector<CSCALCTDigi> oldAlcts;
256 oldAlcts.push_back(alct0);
257 oldAlcts.push_back(alct1);
260 alctHeader.
add(oldAlcts);
262 std::vector<CSCALCTDigi> alcts = alctHeader.ALCTDigis();
264 std::vector<CSCALCTDigi> validALCTs;
265 for(std::vector<CSCALCTDigi>::const_iterator alctItr = alcts.begin();
266 alctItr != alcts.end(); ++ alctItr)
268 if(alctItr->isValid())
270 validALCTs.push_back(*alctItr);
273 assert(validALCTs[0] == alct0);
274 assert(validALCTs[1] == alct1);
281 os <<
"ALCT HEADER CSCID " << header.
CSCID()
282 <<
" L1ACC " << header.
L1Acc() << std::endl;
283 os <<
" time samples " << header.
NTBins() << std::endl;
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
std::ostream & operator<<(std::ostream &out, const ALILine &li)
short unsigned int sizeInWords() const
static short unsigned int sizeInWords()
unsigned short iChamberType()
std::vector< CSCALCTDigi > ALCTDigis() const
void add(const std::vector< CSCALCTDigi > &digis)
should try to sort, but doesn't for now
const uint16_t * header() const
Data Accessors.
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...