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();
234 theALCTs[
i + 1].reserved = hmt_bits & 0x3;
241 boost::dynamic_bitset<>
result;
243 boost::dynamic_bitset<>
header =
245 boost::dynamic_bitset<> alcts =
256 boost::dynamic_bitset<> alct =
275 std::vector<CSCALCTDigi> oldAlcts;
276 oldAlcts.push_back(alct0);
277 oldAlcts.push_back(alct1);
280 alctHeader.
add(oldAlcts);
282 std::vector<CSCALCTDigi> alcts = alctHeader.ALCTDigis();
284 std::vector<CSCALCTDigi> validALCTs;
285 for (std::vector<CSCALCTDigi>::const_iterator alctItr = alcts.begin(); alctItr != alcts.end(); ++alctItr) {
286 if (alctItr->isValid()) {
287 validALCTs.push_back(*alctItr);
290 assert(validALCTs[0] == alct0);
291 assert(validALCTs[1] == alct1);
297 os <<
"ALCT HEADER CSCID " <<
header.CSCID() <<
" L1ACC " <<
header.L1Acc() << std::endl;
298 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
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.