#include <CSCCFEBData.h>
Public Member Functions | |
unsigned | adcCounts (unsigned layer, unsigned channel, unsigned timeBin) const |
unsigned | adcOverflow (unsigned layer, unsigned channel, unsigned timeBin) const |
void | add (const CSCStripDigi &, int layer) |
unsigned | boardNumber () const |
bool | check () const |
makes sure each time slice has a trailer More... | |
unsigned | controllerData (unsigned uglay, unsigned ugchan, unsigned timeBin) const |
CSCCFEBData (unsigned boardNumber, unsigned short *buf) | |
read from an existing data stream. More... | |
CSCCFEBData (unsigned boardNumber, bool sixteenSamples) | |
create, More... | |
unsigned short * | data () |
void | digis (uint32_t idlayer, std::vector< CSCStripDigi > &result) |
faster way to get to digis More... | |
std::vector< CSCStripDigi > | digis (unsigned idlayer) |
unsigned | errorstat (unsigned layer, unsigned channel, unsigned timeBin) const |
unsigned | nTimeSamples () const |
unsigned | overlappedSampleFlag (unsigned layer, unsigned channel, unsigned timeBin) const |
void | setBoardNumber (int cfeb) |
unsigned | sizeInWords () const |
CSCCFEBStatusDigi | statusDigi () const |
returns one status digi per cfeb More... | |
std::vector< std::vector < CSCStripDigi > > | stripDigis () |
deprecated. Use the above method. More... | |
const CSCCFEBTimeSlice * | timeSlice (unsigned i) const |
count from 0. User should check if it's a bad slice More... | |
Static Public Member Functions | |
static void | selfTest () |
Private Attributes | |
unsigned | boardNumber_ |
std::vector< uint16_t > | bWords |
unsigned short | theData [1600] |
unsigned | theNumberOfSamples |
int | theSize |
in words More... | |
std::vector< std::pair< int, bool > > | theSliceStarts |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CSCCFEBData &) |
Definition at line 14 of file CSCCFEBData.h.
CSCCFEBData::CSCCFEBData | ( | unsigned | boardNumber, |
unsigned short * | buf | ||
) |
read from an existing data stream.
Definition at line 11 of file CSCCFEBData.cc.
References bWords, CSCBadCFEBTimeSlice::check(), CSCCFEBTimeSlice::check(), CSCBadCFEBWord::data(), LogTrace, pos, CSCCFEBTimeSlice::sixteenSamples(), CSCBadCFEBTimeSlice::sizeInWords(), CSCCFEBTimeSlice::sizeInWords(), theData, theNumberOfSamples, theSize, theSliceStarts, and CSCBadCFEBTimeSlice::word().
CSCCFEBData::CSCCFEBData | ( | unsigned | boardNumber, |
bool | sixteenSamples | ||
) |
create,
Definition at line 58 of file CSCCFEBData.cc.
References i, pos, CSCCFEBTimeSlice::setControllerWord(), theData, theNumberOfSamples, theSize, theSliceStarts, and CSCCFEBSCAControllerWord::ts_flag.
unsigned CSCCFEBData::adcCounts | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 114 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by operator<<().
unsigned CSCCFEBData::adcOverflow | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 122 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcOverflow, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
void CSCCFEBData::add | ( | const CSCStripDigi & | digi, |
int | layer | ||
) |
=VB= Set CRC value for simulated data
Definition at line 80 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, CSCStripDigi::getADCCounts(), CSCStripDigi::getStrip(), theNumberOfSamples, CSCCFEBTimeSlice::timeSample(), timeSlice(), and relativeConstraints::value.
Referenced by CSCEventData::add().
|
inline |
bool CSCCFEBData::check | ( | ) | const |
makes sure each time slice has a trailer
Definition at line 290 of file CSCCFEBData.cc.
References i, query::result, theNumberOfSamples, and timeSlice().
Referenced by cscdqm::EventProcessor::processCSC().
unsigned CSCCFEBData::controllerData | ( | unsigned | uglay, |
unsigned | ugchan, | ||
unsigned | timeBin | ||
) | const |
Definition at line 131 of file CSCCFEBData.cc.
References CSCCFEBDataWord::controllerData, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by digis().
|
inline |
void CSCCFEBData::digis | ( | uint32_t | idlayer, |
std::vector< CSCStripDigi > & | result | ||
) |
faster way to get to digis
Fill strip digis for layer with raw detid = idlayer WARNING: these digis have no comparator information.
for bad or missing data word will be zero
Definition at line 202 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, CSCCFEBDataWord::adcOverflow, boardNumber_, controllerData(), CSCDetId, CSCDetId::endcap(), CSCCFEBDataWord::errorstat, CSCDetId::layer(), LogTrace, nTimeSamples(), muon::overlap(), CSCCFEBDataWord::overlappedSampleFlag, CSCDetId::ring(), CSCDetId::station(), strip(), CSCCFEBTimeSlice::timeSample(), timeSlice(), and SurfaceOrientation::zplus.
Referenced by digis(), stripDigis(), and CSCEventData::stripDigis().
std::vector< CSCStripDigi > CSCCFEBData::digis | ( | unsigned | idlayer | ) |
Definition at line 279 of file CSCCFEBData.cc.
References digis(), and query::result.
unsigned CSCCFEBData::errorstat | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 155 of file CSCCFEBData.cc.
References CSCCFEBDataWord::errorstat, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
|
inline |
Definition at line 21 of file CSCCFEBData.h.
References theNumberOfSamples.
Referenced by digis(), operator<<(), and statusDigi().
unsigned CSCCFEBData::overlappedSampleFlag | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 147 of file CSCCFEBData.cc.
References CSCCFEBDataWord::overlappedSampleFlag, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
|
static |
|
inline |
|
inline |
Definition at line 47 of file CSCCFEBData.h.
References theSize.
Referenced by CSCEventData::unpack_data().
CSCCFEBStatusDigi CSCCFEBData::statusDigi | ( | ) | const |
returns one status digi per cfeb
returns one status digi per cfeb contains bWord if slice is bad also contains crc word and controller word
here layer=1 bec this word repeats 6 times for each layer
Definition at line 165 of file CSCCFEBData.cc.
References boardNumber_, bWords, CSCCFEBDataWord::controllerData, CSCCFEBTimeSlice::get_crc(), i, LogTrace, nTimeSamples(), query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
std::vector< std::vector< CSCStripDigi > > CSCCFEBData::stripDigis | ( | ) |
deprecated. Use the above method.
Definition at line 320 of file CSCCFEBData.cc.
References digis(), and query::result.
const CSCCFEBTimeSlice * CSCCFEBData::timeSlice | ( | unsigned | i | ) | const |
count from 0. User should check if it's a bad slice
Definition at line 96 of file CSCCFEBData.cc.
References i, query::result, errorMatrix2Lands_multiChannel::start, theData, theNumberOfSamples, and theSliceStarts.
Referenced by adcCounts(), adcOverflow(), add(), check(), controllerData(), digis(), errorstat(), overlappedSampleFlag(), and statusDigi().
|
friend |
Definition at line 301 of file CSCCFEBData.cc.
|
private |
Definition at line 64 of file CSCCFEBData.h.
Referenced by boardNumber(), digis(), operator<<(), setBoardNumber(), and statusDigi().
|
private |
Definition at line 66 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), and statusDigi().
|
private |
Definition at line 58 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), data(), and timeSlice().
|
private |
Definition at line 65 of file CSCCFEBData.h.
Referenced by add(), check(), CSCCFEBData(), nTimeSamples(), and timeSlice().
|
private |
in words
Definition at line 63 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), and sizeInWords().
|
private |
Shows where in theData the words start. A bad slice will be tagged with a false
Definition at line 61 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), and timeSlice().