#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 13 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, hcal::constants::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 59 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 110 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, fDCFEB, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by operator<<().
unsigned CSCCFEBData::adcOverflow | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 118 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcOverflow, fDCFEB, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
void CSCCFEBData::add | ( | const CSCStripDigi & | digi, |
int | layer | ||
) |
=VB= Set CRC value for simulated data
Definition at line 82 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, cms::cuda::assert(), fDCFEB, CSCStripDigi::getADCCounts(), CSCStripDigi::getStrip(), CSCCFEBTimeSlice::setCRC(), theNumberOfSamples, CSCCFEBTimeSlice::timeSample(), timeSlice(), and relativeConstraints::value.
Referenced by CSCEventData::add(), 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 298 of file CSCCFEBData.cc.
References mps_fire::i, mps_fire::result, theNumberOfSamples, and timeSlice().
Referenced by cscdqm::EventProcessor::processCSC().
unsigned CSCCFEBData::controllerData | ( | unsigned | uglay, |
unsigned | ugchan, | ||
unsigned | timeBin | ||
) | const |
Definition at line 127 of file CSCCFEBData.cc.
References CSCCFEBDataWord::controllerData, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
Referenced by digis().
|
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 202 of file CSCCFEBData.cc.
References CSCCFEBDataWord::adcCounts, CSCCFEBDataWord::adcOverflow, boardNumber_, controllerData(), CSCDetId, CSCDetId::endcap(), CSCCFEBDataWord::errorstat, fDCFEB, CSCDetId::layer(), phase1PixelTopology::layer, LogTrace, nTimeSamples(), CSCConstants::NUM_STRIPS_ME1A_GANGED, CSCConstants::NUM_STRIPS_ME1A_UNGANGED, CSCConstants::NUM_STRIPS_ME1B, muon::overlap(), CSCCFEBDataWord::overlappedSampleFlag, CSCDetId::ring(), CSCDetId::station(), digitizers_cfi::strip, theFormatVersion, CSCCFEBTimeSlice::timeSample(), timeSlice(), and SurfaceOrientation::zplus.
Referenced by digis(), stripDigis(), and CSCEventData::stripDigis().
std::vector< CSCStripDigi > CSCCFEBData::digis | ( | unsigned | idlayer | ) | const |
Definition at line 291 of file CSCCFEBData.cc.
References digis(), phase1PixelTopology::layer, and mps_fire::result.
unsigned CSCCFEBData::errorstat | ( | unsigned | layer, |
unsigned | channel, | ||
unsigned | timeBin | ||
) | const |
Definition at line 150 of file CSCCFEBData.cc.
References CSCCFEBDataWord::errorstat, fDCFEB, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
|
inline |
|
inline |
Definition at line 20 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 142 of file CSCCFEBData.cc.
References fDCFEB, CSCCFEBDataWord::overlappedSampleFlag, mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
|
static |
|
inline |
void CSCCFEBData::setL1A | ( | unsigned | l1a | ) |
Definition at line 159 of file CSCCFEBData.cc.
References mps_fire::i, and theNumberOfSamples.
Referenced by CSCEventData::setEventInformation().
void CSCCFEBData::setL1A | ( | unsigned | sample, |
unsigned | l1a | ||
) |
Definition at line 164 of file CSCCFEBData.cc.
References cms::cuda::assert(), mps_fire::i, command_line::start, theData, theNumberOfSamples, and theSliceStarts.
|
inline |
Definition at line 46 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 173 of file CSCCFEBData.cc.
References boardNumber_, bWords, CSCCFEBDataWord::controllerData, CSCCFEBTimeSlice::get_crc(), mps_fire::i, phase1PixelTopology::layer, LogTrace, nTimeSamples(), mps_fire::result, CSCCFEBTimeSlice::timeSample(), and timeSlice().
std::vector< std::vector< CSCStripDigi > > CSCCFEBData::stripDigis | ( | ) |
deprecated. Use the above method.
Definition at line 323 of file CSCCFEBData.cc.
References digis(), phase1PixelTopology::layer, CSCDetId::maxLayerId(), CSCDetId::minLayerId(), and mps_fire::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 cms::cuda::assert(), mps_fire::i, command_line::start, theData, theNumberOfSamples, and theSliceStarts.
Referenced by adcCounts(), adcOverflow(), add(), check(), controllerData(), digis(), errorstat(), overlappedSampleFlag(), and statusDigi().
|
private |
Definition at line 103 of file CSCCFEBData.cc.
References cms::cuda::assert(), mps_fire::i, command_line::start, theData, theNumberOfSamples, and theSliceStarts.
|
friend |
Definition at line 308 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().