12 : theSize(0), boardNumber_(
number), theNumberOfSamples(0), theFormatVersion(format_version), fDCFEB(f_dcfeb) {
22 if (badSlice->
check()) {
31 if (goodSlice->
check()) {
61 theNumberOfSamples(sixteenSamples ? 16 : 8),
62 theFormatVersion(format_version),
68 scaWord.
ts_flag = sixteenSamples;
72 slice.setControllerWord(scaWord);
85 unsigned channel = (digi.
getStrip() - 1) % 16 + 1;
86 unsigned value = scaCounts[itime] & 0xFFF;
100 return start.second ? reinterpret_cast<const CSCCFEBTimeSlice *>(
theData +
start.first) :
nullptr;
107 return start.second ? reinterpret_cast<CSCCFEBTimeSlice *>(
theData +
start.first) :
nullptr;
138 result =
slice->timeSample((ugchan - 1) * 6 + uglay - 1)->controllerData;
169 (reinterpret_cast<CSCCFEBTimeSlice *>(
theData +
start.first))->set_L1Anumber(l1a);
182 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
"nTimeSamples is zero - CFEB data corrupt?";
184 for (
unsigned itime = 0; itime <
nTimeSamples(); ++itime) {
188 crcWords[itime] =
slice->get_crc();
191 for (
unsigned i = 0;
i < 16; ++
i) {
192 contrWords[itime] |=
slice->timeSample(
i * 6 + layer - 1)->controllerData <<
i;
205 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
"nTimeSamples in CSCCFEBData::digis = " <<
nTimeSamples();
207 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
"nTimeSamples is zero - CFEB data corrupt?";
225 for (
unsigned itime = 0; itime <
nTimeSamples(); ++itime) {
227 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
CSCDetId(idlayer) <<
" time sample " << itime + 1
229 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
CSCDetId(idlayer) <<
" time sample " << itime + 1
231 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
CSCDetId(idlayer) <<
" time sample " << itime + 1
235 for (
unsigned ichannel = 1; ichannel <= 16; ++ichannel) {
243 for (
unsigned itime = 0; itime <
nTimeSamples(); ++itime) {
249 sca[itime] =
word->adcCounts;
250 overflow[itime] =
word->adcOverflow;
252 errorfl[itime] =
word->errorstat;
257 overlap[itime] = ((l1a_phase[itime] & 0x1) << 8) | (
word->overlappedSampleFlag & 0x1);
262 LogTrace(
"CSCCFEBData|CSCRawToDigi") <<
"ADC counts empty - CFEB data corrupt?";
274 if (me1b && !
zplus) {
285 if (me1b && !
zplus) {
295 std::vector<CSCStripDigi>
result;
296 uint32_t layer = idlayer;
312 os <<
"printing CFEB data sample by sample " << std::endl;
313 for (
unsigned ilayer = 1; ilayer <= 6; ++ilayer) {
314 for (
unsigned channel = 1; channel <= 16; ++channel) {
315 unsigned strip = channel +
data.boardNumber_ * 16;
316 os <<
"Strip " <<
strip <<
" ";
317 for (
unsigned timeBin = 0; timeBin <
data.nTimeSamples(); ++timeBin) {
318 os <<
data.adcCounts(ilayer, channel, timeBin) <<
" ";
327 std::vector<std::vector<CSCStripDigi> >
result;
328 for (
int layer = 1; layer <= 6; ++layer) {