#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, uint16_t theFormatVersion=2005, bool fDCFEB=false) | |
read from an existing data stream. More... | |
CSCCFEBData (unsigned boardNumber, bool sixteenSamples, uint16_t theFormatVersion=2005, bool fDCFEB=false) | |
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 |
bool | isDCFEB () const |
unsigned | nTimeSamples () const |
unsigned | overlappedSampleFlag (unsigned layer, unsigned channel, unsigned timeBin) const |
void | setBoardNumber (int cfeb) |
void | setL1A (unsigned l1a) |
void | setL1A (unsigned sample, unsigned l1a) |
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 |
bool | fDCFEB |
unsigned short | theData [1600] |
uint16_t | theFormatVersion |
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, | ||
uint16_t | theFormatVersion = 2005 , |
||
bool | fDCFEB = false |
||
) |
read from an existing data stream.
Definition at line 11 of file CSCCFEBData.cc.
References bWords, CSCBadCFEBTimeSlice::check(), CSCCFEBTimeSlice::check(), CSCBadCFEBWord::data(), LogTrace, HcalConst::maxSamples, CSCCFEBTimeSlice::sixteenSamples(), CSCBadCFEBTimeSlice::sizeInWords(), CSCCFEBTimeSlice::sizeInWords(), theData, theNumberOfSamples, theSize, theSliceStarts, and CSCBadCFEBTimeSlice::word().
CSCCFEBData::CSCCFEBData | ( | unsigned | boardNumber, |
bool | sixteenSamples, | ||
uint16_t | theFormatVersion = 2005 , |
||
bool | fDCFEB = false |
||
) |
create,
Definition at line 58 of file CSCCFEBData.cc.
References i, 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, fDCFEB, 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, fDCFEB, 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, assert(), fDCFEB, CSCStripDigi::getADCCounts(), CSCStripDigi::getStrip(), theNumberOfSamples, CSCCFEBTimeSlice::timeSample(), timeSlice(), and relativeConstraints::value.
Referenced by CSCEventData::add(), and counter.Counter::register().
|
inline |
bool CSCCFEBData::check | ( | ) | const |
makes sure each time slice has a trailer
Definition at line 316 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 |
Definition at line 46 of file CSCCFEBData.h.
References theData.
Referenced by cuy.FindIssue::__init__().
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
Handle 2013 Format
Definition at line 218 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, CSCCFEBDataWord::adcOverflow, boardNumber_, controllerData(), CSCDetId, CSCDetId::endcap(), CSCCFEBDataWord::errorstat, fDCFEB, CSCDetId::layer(), LogTrace, nTimeSamples(), muon::overlap(), CSCCFEBDataWord::overlappedSampleFlag, CSCDetId::ring(), CSCDetId::station(), theFormatVersion, CSCCFEBTimeSlice::timeSample(), timeSlice(), and SurfaceOrientation::zplus.
Referenced by digis(), stripDigis(), and CSCEventData::stripDigis().
std::vector< CSCStripDigi > CSCCFEBData::digis | ( | unsigned | idlayer | ) |
Definition at line 305 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, fDCFEB, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
|
inline |
|
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 fDCFEB, CSCCFEBDataWord::overlappedSampleFlag, query::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
|
static |
|
inline |
void CSCCFEBData::setL1A | ( | unsigned | l1a | ) |
Definition at line 165 of file CSCCFEBData.cc.
References i, and theNumberOfSamples.
Referenced by CSCEventData::setEventInformation().
void CSCCFEBData::setL1A | ( | unsigned | sample, |
unsigned | l1a | ||
) |
Definition at line 170 of file CSCCFEBData.cc.
References assert(), i, dqm_diff::start, theData, theNumberOfSamples, and theSliceStarts.
|
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 181 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 346 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 assert(), i, query::result, dqm_diff::start, theData, theNumberOfSamples, and theSliceStarts.
Referenced by adcCounts(), adcOverflow(), add(), check(), controllerData(), digis(), errorstat(), overlappedSampleFlag(), and statusDigi().
|
friend |
Definition at line 327 of file CSCCFEBData.cc.
|
private |
Definition at line 69 of file CSCCFEBData.h.
Referenced by boardNumber(), digis(), operator<<(), setBoardNumber(), and statusDigi().
|
private |
Definition at line 71 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), and statusDigi().
|
private |
Definition at line 73 of file CSCCFEBData.h.
Referenced by adcCounts(), adcOverflow(), add(), digis(), errorstat(), isDCFEB(), and overlappedSampleFlag().
|
private |
Definition at line 63 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), data(), setL1A(), and timeSlice().
|
private |
Definition at line 72 of file CSCCFEBData.h.
Referenced by digis().
|
private |
Definition at line 70 of file CSCCFEBData.h.
Referenced by add(), check(), CSCCFEBData(), nTimeSamples(), setL1A(), and timeSlice().
|
private |
in words
Definition at line 68 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 66 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), setL1A(), and timeSlice().