#include <CSCTMBData.h>
Public Member Functions | |
std::bitset< 22 > | calCRC22 (const std::vector< std::bitset< 16 > > &datain) |
bool | checkSize () const |
sees if the size adds up to the word count More... | |
CSCComparatorData * | comparatorData () |
CSCTMBData () | |
CSCTMBData (int firmwareVersion, int firmwareRevision, int ncfebs=5) | |
CSCTMBData (const uint16_t *buf) | |
CSCTMBData (const CSCTMBData &data) | |
short unsigned int | CWordCnt () const |
CSCGEMData * | gemData () |
int | getCRC () const |
bool | hasGEM () const |
bool | hasRPC () const |
check this before using RPC More... | |
bool | hasTMBBlockedCFEB () const |
check this before TMB Block CFEB More... | |
bool | hasTMBMiniScope () const |
check this before using TMB mini scope More... | |
bool | hasTMBScope () const |
check this before using TMB Scope More... | |
std::bitset< 22 > | nextCRC22_D16 (const std::bitset< 16 > &D, const std::bitset< 22 > &C) |
boost::dynamic_bitset | pack () |
not const because it sets size int TMBTrailer More... | |
CSCRPCData * | rpcData () |
const unsigned short | size () const |
CSCTMBBlockedCFEB & | tmbBlockedCFEB () const |
int | TMBCRCcalc () |
CSCTMBHeader * | tmbHeader () |
CSCTMBMiniScope & | tmbMiniScope () const |
CSCTMBScope & | tmbScope () const |
CSCTMBTrailer * | tmbTrailer () |
int | UnpackTMB (const uint16_t *buf) |
~CSCTMBData () | |
Static Public Member Functions | |
static void | selfTest () |
tests packing More... | |
static void | setDebug (const bool value) |
Private Attributes | |
unsigned short | cWordCnt |
unsigned short | size_ |
unsigned | theB0CLine |
bool | theBlockedCFEBIsPresent |
CSCComparatorData | theComparatorData |
unsigned | theE0FLine |
CSCGEMData | theGEMData |
bool | theGEMDataIsPresent |
const uint16_t * | theOriginalBuffer |
CSCRPCData | theRPCData |
bool | theRPCDataIsPresent |
CSCTMBBlockedCFEB * | theTMBBlockedCFEB |
CSCTMBHeader | theTMBHeader |
CSCTMBMiniScope * | theTMBMiniScope |
bool | theTMBMiniScopeIsPresent |
CSCTMBScope * | theTMBScope |
bool | theTMBScopeIsPresent |
The TMB scope is not present in most of data hence its dynamic. More... | |
CSCTMBTrailer | theTMBTrailer |
Static Private Attributes | |
static std::atomic< bool > | debug {false} |
Definition at line 25 of file CSCTMBData.h.
CSCTMBData::CSCTMBData | ( | ) |
Definition at line 21 of file CSCTMBData.cc.
CSCTMBData::CSCTMBData | ( | int | firmwareVersion, |
int | firmwareRevision, | ||
int | ncfebs = 5 |
||
) |
check if this is OTMB GEM fw and adjust expected TMB data word count
Definition at line 40 of file CSCTMBData.cc.
References simCaloStage2Layer1Digis_cfi::firmwareVersion, CSCTMBHeader::setNCFEBs(), CSCGEMData::sizeInWords(), CSCComparatorData::sizeInWords(), CSCTMBHeader::sizeInWords(), theComparatorData, theGEMData, theGEMDataIsPresent, theTMBHeader, and theTMBTrailer.
CSCTMBData::~CSCTMBData | ( | ) |
Definition at line 122 of file CSCTMBData.cc.
References theBlockedCFEBIsPresent, theTMBBlockedCFEB, theTMBMiniScope, theTMBMiniScopeIsPresent, theTMBScope, and theTMBScopeIsPresent.
CSCTMBData::CSCTMBData | ( | const uint16_t * | buf | ) |
Definition at line 69 of file CSCTMBData.cc.
References visDQMUpload::buf, size_, and UnpackTMB().
CSCTMBData::CSCTMBData | ( | const CSCTMBData & | data | ) |
Definition at line 87 of file CSCTMBData.cc.
References data, theBlockedCFEBIsPresent, theTMBBlockedCFEB, theTMBMiniScope, theTMBMiniScopeIsPresent, theTMBScope, and theTMBScopeIsPresent.
std::bitset< 22 > CSCTMBData::calCRC22 | ( | const std::vector< std::bitset< 16 > > & | datain | ) |
Definition at line 388 of file CSCTMBData.cc.
References RawDataTask_cfi::CRC, mps_fire::i, and nextCRC22_D16().
Referenced by pack(), and TMBCRCcalc().
bool CSCTMBData::checkSize | ( | ) | const |
sees if the size adds up to the word count
Definition at line 383 of file CSCTMBData.cc.
Referenced by UnpackTMB().
|
inline |
Definition at line 41 of file CSCTMBData.h.
References theComparatorData.
Referenced by CSCEventData::add(), CSCEventData::comparatorData(), and pack().
|
inline |
CSCGEMData * CSCTMBData::gemData | ( | ) |
Definition at line 409 of file CSCTMBData.cc.
References theGEMData, and theGEMDataIsPresent.
Referenced by CSCEventData::add(), pack(), and cscdqm::EventProcessor::processCSC().
|
inline |
|
inline |
Definition at line 55 of file CSCTMBData.h.
References theGEMDataIsPresent.
Referenced by CSCEventData::add(), and cscdqm::EventProcessor::processCSC().
|
inline |
check this before using RPC
Definition at line 53 of file CSCTMBData.h.
References theRPCDataIsPresent.
|
inline |
check this before TMB Block CFEB
Definition at line 49 of file CSCTMBData.h.
References theBlockedCFEBIsPresent.
|
inline |
check this before using TMB mini scope
Definition at line 46 of file CSCTMBData.h.
References theTMBMiniScopeIsPresent.
|
inline |
check this before using TMB Scope
Definition at line 43 of file CSCTMBData.h.
References theTMBScopeIsPresent.
std::bitset< 22 > CSCTMBData::nextCRC22_D16 | ( | const std::bitset< 16 > & | D, |
const std::bitset< 22 > & | C | ||
) |
Definition at line 415 of file CSCTMBData.cc.
References correctionTermsCaloMet_cff::C.
Referenced by calCRC22().
boost::dynamic_bitset CSCTMBData::pack | ( | ) |
not const because it sets size int TMBTrailer
this method is for digi2raw
Add packed GEM data to TMB data block
Definition at line 444 of file CSCTMBData.cc.
References bitset_utilities::append(), calCRC22(), comparatorData(), CSCGEMData::data(), CSCComparatorData::data(), CSCTMBTrailer::data(), CSCTMBHeader::data(), gemData(), mps_fire::i, mps_fire::result, CSCTMBTrailer::setCRC(), CSCGEMData::sizeInWords(), CSCComparatorData::sizeInWords(), CSCTMBTrailer::sizeInWords(), CSCTMBHeader::sizeInWords(), theComparatorData, theGEMData, theGEMDataIsPresent, theTMBHeader, theTMBTrailer, tmbTrailer(), and bitset_utilities::ushortToBitset().
Referenced by CSCEventData::pack().
|
inline |
|
static |
tests packing
Definition at line 481 of file CSCTMBData.cc.
References cscClassPackerCompare().
|
inlinestatic |
Definition at line 35 of file CSCTMBData.h.
References debug, and relativeConstraints::value.
Referenced by CSCDCCUnpacker::CSCDCCUnpacker().
|
inline |
Definition at line 38 of file CSCTMBData.h.
References size_.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), and CSCEventData::unpack_data().
CSCTMBBlockedCFEB& CSCTMBData::tmbBlockedCFEB | ( | ) | const |
int CSCTMBData::TMBCRCcalc | ( | ) |
Definition at line 150 of file CSCTMBData.cc.
References calCRC22(), RawDataTask_cfi::CRC, mps_fire::i, mps_splice::line, LogTrace, theB0CLine, theE0FLine, and theOriginalBuffer.
|
inline |
Definition at line 40 of file CSCTMBData.h.
References theTMBHeader.
Referenced by CSCEventData::add(), CSCEventData::addAnodeShower(), CSCEventData::addCathodeShower(), CSCEventData::addShower(), CSCEventData::checkTMBClasses(), cscdqm::EventProcessor::processCSC(), CSCEventData::setEventInformation(), and CSCEventData::tmbHeader().
CSCTMBMiniScope & CSCTMBData::tmbMiniScope | ( | ) | const |
Definition at line 403 of file CSCTMBData.cc.
References theTMBMiniScope, and theTMBMiniScopeIsPresent.
CSCTMBScope & CSCTMBData::tmbScope | ( | ) | const |
Definition at line 397 of file CSCTMBData.cc.
References theTMBScope, and theTMBScopeIsPresent.
|
inline |
Definition at line 51 of file CSCTMBData.h.
References theTMBTrailer.
Referenced by pack(), and cscdqm::EventProcessor::processCSC().
int CSCTMBData::UnpackTMB | ( | const uint16_t * | buf | ) |
determine 2007 or 2006 version
assumes that buf starts at the tmb data this is not true if something is wrong in the data before TMB - then we skip the whole event
Handling of enabled GEM fibers is not implemented in the firmware
Now Find the miniscope
end for the mini scope
Now Find the blocked CFEB DiStrips List Format
end for the blocked CFEB DiStrips List Format
Definition at line 167 of file CSCTMBData.cc.
References visDQMUpload::buf, CSCComparatorData::check(), CSCTMBHeader::check(), checkSize(), TauDecayModes::dec, findLine(), simCaloStage2Layer1Digis_cfi::firmwareVersion, CSCTMBHeader::FirmwareVersion(), mps_splice::line, LogTrace, CSCTMBHeader::NCFEBs(), CSCTMBHeader::NTBins(), CSCRPCData::sizeInWords(), CSCGEMData::sizeInWords(), CSCComparatorData::sizeInWords(), CSCTMBTrailer::sizeInWords(), CSCTMBHeader::sizeInWords(), theB0CLine, theBlockedCFEBIsPresent, theComparatorData, theE0FLine, theGEMData, theGEMDataIsPresent, theRPCData, theRPCDataIsPresent, theTMBBlockedCFEB, theTMBHeader, theTMBMiniScope, theTMBMiniScopeIsPresent, theTMBScope, theTMBScopeIsPresent, and theTMBTrailer.
Referenced by CSCTMBData().
|
private |
Definition at line 102 of file CSCTMBData.h.
Referenced by CWordCnt().
|
staticprivate |
Definition at line 99 of file CSCTMBData.h.
Referenced by util.rrapi.RRApi::dprint(), rrapi.RRApi::dprint(), pkg.AbstractPkg::generate(), rrapi.RRApi::get(), util.rrapi.RRApi::get(), pkg.AbstractPkg::get_kwds(), runTauIdMVA.TauIDEmbedder::load_againstElectronMVA6(), runTauIdMVA.TauIDEmbedder::loadMVA_WPs_run2_2017(), setDebug(), and pkg.AbstractPkg::write().
|
private |
Definition at line 101 of file CSCTMBData.h.
Referenced by CSCTMBData(), and size().
|
private |
CRC calc needs to know where 0x6B0C and 0x6E0F lines were we want to put off CRC calc until needed
Definition at line 76 of file CSCTMBData.h.
Referenced by TMBCRCcalc(), and UnpackTMB().
|
private |
Definition at line 92 of file CSCTMBData.h.
Referenced by CSCTMBData(), hasTMBBlockedCFEB(), UnpackTMB(), and ~CSCTMBData().
|
private |
Definition at line 80 of file CSCTMBData.h.
Referenced by comparatorData(), CSCTMBData(), pack(), and UnpackTMB().
|
private |
Definition at line 77 of file CSCTMBData.h.
Referenced by TMBCRCcalc(), and UnpackTMB().
|
private |
Definition at line 82 of file CSCTMBData.h.
Referenced by CSCTMBData(), gemData(), pack(), and UnpackTMB().
|
private |
Definition at line 104 of file CSCTMBData.h.
Referenced by CSCTMBData(), gemData(), hasGEM(), pack(), and UnpackTMB().
|
private |
@ not sure what this means for simulation. I keep this around so we can calculate CRCs
Definition at line 73 of file CSCTMBData.h.
Referenced by TMBCRCcalc().
|
private |
Definition at line 81 of file CSCTMBData.h.
Referenced by rpcData(), and UnpackTMB().
|
private |
Definition at line 103 of file CSCTMBData.h.
Referenced by hasRPC(), and UnpackTMB().
|
private |
Definition at line 93 of file CSCTMBData.h.
Referenced by CSCTMBData(), UnpackTMB(), and ~CSCTMBData().
|
private |
Definition at line 79 of file CSCTMBData.h.
Referenced by CSCTMBData(), pack(), tmbHeader(), and UnpackTMB().
|
private |
Definition at line 90 of file CSCTMBData.h.
Referenced by CSCTMBData(), tmbMiniScope(), UnpackTMB(), and ~CSCTMBData().
|
private |
The TMB MiniScope must presen in every event, hovewer make it dynamic as for the main scope
Definition at line 89 of file CSCTMBData.h.
Referenced by CSCTMBData(), hasTMBMiniScope(), tmbMiniScope(), UnpackTMB(), and ~CSCTMBData().
|
private |
Definition at line 85 of file CSCTMBData.h.
Referenced by CSCTMBData(), tmbScope(), UnpackTMB(), and ~CSCTMBData().
|
private |
The TMB scope is not present in most of data hence its dynamic.
Definition at line 84 of file CSCTMBData.h.
Referenced by CSCTMBData(), hasTMBScope(), tmbScope(), UnpackTMB(), and ~CSCTMBData().
|
private |
Definition at line 95 of file CSCTMBData.h.
Referenced by CSCTMBData(), getCRC(), pack(), tmbTrailer(), and UnpackTMB().