27 for (
int i = 1;
i < 257; ++
i) {
29 int rpc = (
i - 1) / 14;
33 int tbin = ((
i - 1) % 14) / 2;
47 LogTrace(
"CSCRPCData|CSCRawToDigi") <<
"CSCRPCData.Print";
52 for (
int linePair = 0; linePair < ((
size_ - 2) / 2); ++linePair) {
54 int pos = linePair * 2 + 1;
58 int bxnnew = ((
theData[pos + 1] >> 8) & 0x7);
61 int tbin = (
theData[pos] >> 8) & 0xf;
64 LogTrace(
"CSCRPCData|CSCRawToDigi") <<
" RPC=" << rpc <<
" Tbin=" << tbin <<
" BXN=" << bxn;
70 for (
int linePair = 0; linePair < ((
size_ - 2) / 2); ++linePair) {
72 int pos = linePair * 2 + 1;
76 int bxnnew = ((
theData[pos + 1] >> 8) & 0x7);
82 result.push_back(bxnnew);
83 result.push_back(rpc);
89 std::vector<CSCRPCDigi>
result;
93 for (
int linePair = 0; linePair < ((
size_ - 2) / 2); ++linePair) {
95 int pos = linePair * 2 + 1;
99 LogTrace(
"CSCRPCData|CSCRawToDigi") <<
"+++ CSCRPCData " << std::hex <<
theData[pos] <<
" " <<
theData[pos + 1];
101 int pad = (theData[pos] & 0xff) + ((theData[pos + 1] & 0xff) << 8);
104 bxnnew = ((theData[pos + 1] >> 8) & 0x7);
109 if (bxnnew - bxnold > 1)
111 <<
"+++ CSCRPCData warning: RPC BXN is incrementing by more than 1 clock cycle";
117 <<
"+++ CSCRPCData Found a PAD =" << std::hex << pad <<
" " << theData[pos] <<
" + " << theData[pos + 1];
118 int rpc = (theData[pos] >> 12) & 0x7;
119 int tbin = (theData[pos] >> 8) & 0xf;
122 for (
int i = 0;
i < 16; ++
i) {
124 if ((pad >>
i) & 1) {
std::vector< CSCRPCDigi > digis() const
static std::atomic< bool > debug
std::vector< int > BXN() const
CSCRPCData(int ntbins=7)
default constructor
unsigned short theData[2 *4 *32+2]