23 : header2006(chamberType), header2007(chamberType) {
33 <<
"Cannot construct ALCT header: ALCT firmware version is bad/not defined!" <<
firmwareVersion;
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};
46 if (
buf[0] == 0xDB0A) {
48 }
else if ((
buf[0] & 0xF800) == 0x6000) {
51 edm::LogError(
"CSCALCTHeader|CSCRawToDigi") <<
"failed to determine ALCT firmware version!!";
108 edm::LogError(
"CSCALCTHeader|CSCRawToDigi") <<
"couldn't construct: ALCT firmware version is bad/not defined!";
135 <<
"setEventInformation: ALCT firmware version is bad/not defined!" <<
firmwareVersion;
153 std::vector<CSCALCTDigi>
result;
166 for (
unsigned int i = 0;
i <
theALCTs.size(); ++
i) {
180 <<
"Empty Digis: ALCT firmware version is bad/not defined!" <<
firmwareVersion;
183 for (
unsigned i = 0;
i <
result.size(); ++
i) {
196 for (std::vector<CSCALCTDigi>::const_iterator digi = digis.begin(); digi != digis.end(); ++digi) {
197 int bx = digi->getBX();
208 else if (digi->getQuality() > q1) {
227 for (std::vector<CSCShowerDigi>::const_iterator digi = digis.begin(); digi != digis.end(); ++digi) {
228 int bx = digi - digis.begin();
240 boost::dynamic_bitset<>
result;
242 boost::dynamic_bitset<>
header =
244 boost::dynamic_bitset<> alcts =
255 boost::dynamic_bitset<> alct =
274 std::vector<CSCALCTDigi> oldAlcts;
275 oldAlcts.push_back(alct0);
276 oldAlcts.push_back(alct1);
279 alctHeader.
add(oldAlcts);
281 std::vector<CSCALCTDigi> alcts = alctHeader.ALCTDigis();
283 std::vector<CSCALCTDigi> validALCTs;
284 for (std::vector<CSCALCTDigi>::const_iterator alctItr = alcts.begin(); alctItr != alcts.end(); ++alctItr) {
285 if (alctItr->isValid()) {
286 validALCTs.push_back(*alctItr);
289 assert(validALCTs[0] == alct0);
290 assert(validALCTs[1] == alct1);
296 os <<
"ALCT HEADER CSCID " <<
header.CSCID() <<
" L1ACC " <<
header.L1Acc() << std::endl;
297 os <<
" time samples " <<
header.NTBins() << std::endl;
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 ...
Log< level::Error, false > LogError
unsigned short iChamberType() const
void setFromBuffer(unsigned short const *buf)
void setFromBuffer(unsigned short const *buf)
static short unsigned int sizeInWords()
short unsigned int sizeInWords() const
std::vector< CSCALCTDigi > ALCTDigis() const
void setFromBuffer(unsigned short const *buf)
void bitsetToChar(const boost::dynamic_bitset<> &bs, unsigned char *result)
this method takes bitset obj and returns char * array
void add(const std::vector< CSCALCTDigi > &digis)
should try to sort, but doesn't for now
uint16_t bitsInTime() const
short unsigned int sizeInWords() const
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
const uint16_t * header() const
Data Accessors.