#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, const uint16_t *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... | |
uint16_t * | data () |
void | digis (uint32_t idlayer, std::vector< CSCStripDigi > &result) const |
faster way to get to digis More... | |
std::vector< CSCStripDigi > | digis (unsigned idlayer) const |
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 Member Functions | |
CSCCFEBTimeSlice * | timeSlice (unsigned i) |
Private Attributes | |
unsigned | boardNumber_ |
std::vector< uint16_t > | bWords |
bool | fDCFEB |
uint16_t | 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, |
const uint16_t * | 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 63 of file CSCCFEBData.cc.
References mps_fire::i, CSCCFEBTimeSlice::setControllerWord(), theData, theNumberOfSamples, theSize, theSliceStarts, and CSCCFEBSCAControllerWord::ts_flag.
unsigned CSCCFEBData::adcCounts | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 117 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, fDCFEB, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by nTimeSamples(), and operator<<().
unsigned CSCCFEBData::adcOverflow | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 125 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcOverflow, fDCFEB, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by nTimeSamples().
void CSCCFEBData::add | ( | const CSCStripDigi & | digi, |
int | layer | ||
) |
=VB= Set CRC value for simulated data
Definition at line 85 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, fDCFEB, CSCStripDigi::getADCCounts(), CSCStripDigi::getStrip(), CSCCFEBTimeSlice::setCRC(), theNumberOfSamples, CSCCFEBTimeSlice::timeSample(), timeSlice(), and relativeConstraints::value.
Referenced by CSCEventData::add(), nTimeSamples(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().
|
inline |
bool CSCCFEBData::check | ( | ) | const |
makes sure each time slice has a trailer
Definition at line 319 of file CSCCFEBData.cc.
References mps_fire::i, mps_fire::result, theNumberOfSamples, and timeSlice().
Referenced by cscdqm::EventProcessor::processCSC(), and setBoardNumber().
unsigned CSCCFEBData::controllerData | ( | unsigned | uglay, |
unsigned | ugchan, | ||
unsigned | timeBin | ||
) | const |
Definition at line 134 of file CSCCFEBData.cc.
References CSCCFEBDataWord::controllerData, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by digis(), and nTimeSamples().
|
inline |
void CSCCFEBData::digis | ( | uint32_t | idlayer, |
std::vector< CSCStripDigi > & | result | ||
) | const |
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 221 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, CSCCFEBDataWord::adcOverflow, boardNumber_, controllerData(), CSCDetId::endcap(), CSCCFEBDataWord::errorstat, fDCFEB, CSCDetId::layer(), LogTrace, nTimeSamples(), muon::overlap(), CSCCFEBDataWord::overlappedSampleFlag, CSCDetId::ring(), CSCDetId::station(), digitizers_cfi::strip, theFormatVersion, CSCCFEBTimeSlice::timeSample(), timeSlice(), and SurfaceOrientation::zplus.
Referenced by digis(), nTimeSamples(), stripDigis(), and CSCEventData::stripDigis().
std::vector< CSCStripDigi > CSCCFEBData::digis | ( | unsigned | idlayer | ) | const |
Definition at line 308 of file CSCCFEBData.cc.
References digis(), and mps_fire::result.
unsigned CSCCFEBData::errorstat | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 158 of file CSCCFEBData.cc.
References CSCCFEBDataWord::errorstat, fDCFEB, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by nTimeSamples().
|
inline |
|
inline |
Definition at line 21 of file CSCCFEBData.h.
References adcCounts(), adcOverflow(), add(), controllerData(), digis(), errorstat(), mps_fire::i, overlappedSampleFlag(), mps_fire::result, statusDigi(), stripDigis(), theNumberOfSamples, and timeSlice().
Referenced by digis(), operator<<(), and statusDigi().
unsigned CSCCFEBData::overlappedSampleFlag | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 150 of file CSCCFEBData.cc.
References fDCFEB, CSCCFEBDataWord::overlappedSampleFlag, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by nTimeSamples().
|
static |
Referenced by setBoardNumber().
|
inline |
Definition at line 49 of file CSCCFEBData.h.
References boardNumber_, check(), operator<<, simplePhotonAnalyzer_cfi::sample, selfTest(), and setL1A().
void CSCCFEBData::setL1A | ( | unsigned | l1a | ) |
Definition at line 168 of file CSCCFEBData.cc.
References mps_fire::i, and theNumberOfSamples.
Referenced by setBoardNumber(), and CSCEventData::setEventInformation().
void CSCCFEBData::setL1A | ( | unsigned | sample, |
unsigned | l1a | ||
) |
Definition at line 173 of file CSCCFEBData.cc.
References mps_fire::i, 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 184 of file CSCCFEBData.cc.
References boardNumber_, bWords, CSCCFEBDataWord::controllerData, CSCCFEBTimeSlice::get_crc(), mps_fire::i, LogTrace, nTimeSamples(), mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by nTimeSamples().
std::vector< std::vector< CSCStripDigi > > CSCCFEBData::stripDigis | ( | ) |
deprecated. Use the above method.
Definition at line 349 of file CSCCFEBData.cc.
References digis(), and mps_fire::result.
Referenced by nTimeSamples().
const CSCCFEBTimeSlice * CSCCFEBData::timeSlice | ( | unsigned | i | ) | const |
count from 0. User should check if it's a bad slice
Definition at line 101 of file CSCCFEBData.cc.
References mps_fire::i, theData, theNumberOfSamples, and theSliceStarts.
Referenced by adcCounts(), adcOverflow(), add(), check(), controllerData(), digis(), errorstat(), isDCFEB(), nTimeSamples(), overlappedSampleFlag(), and statusDigi().
|
private |
Definition at line 109 of file CSCCFEBData.cc.
References mps_fire::i, theData, theNumberOfSamples, and theSliceStarts.
|
friend |
Definition at line 330 of file CSCCFEBData.cc.
Referenced by setBoardNumber().
|
private |
Definition at line 71 of file CSCCFEBData.h.
Referenced by boardNumber(), digis(), operator<<(), setBoardNumber(), and statusDigi().
|
private |
Definition at line 73 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), and statusDigi().
|
private |
Definition at line 75 of file CSCCFEBData.h.
Referenced by adcCounts(), adcOverflow(), add(), digis(), errorstat(), isDCFEB(), and overlappedSampleFlag().
|
private |
Definition at line 65 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), data(), setL1A(), and timeSlice().
|
private |
Definition at line 74 of file CSCCFEBData.h.
Referenced by digis().
|
private |
Definition at line 72 of file CSCCFEBData.h.
Referenced by add(), check(), CSCCFEBData(), nTimeSamples(), setL1A(), and timeSlice().
|
private |
in words
Definition at line 70 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 68 of file CSCCFEBData.h.
Referenced by CSCCFEBData(), setL1A(), and timeSlice().