#include <EventFilter/GctRawToDigi/src/GctRawToDigi.cc>
Public Member Functions | |
GctRawToDigi (const edm::ParameterSet &) | |
~GctRawToDigi () override | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
EDProducer (const EDProducer &)=delete | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndProcessBlocks () const final |
bool | hasAbilityToProduceInEndRuns () const final |
const EDProducer & | operator= (const EDProducer &)=delete |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Member Functions | |
void | addError (const unsigned code) |
bool | autoDetectRequiredFormatTranslator (const unsigned char *data) |
Looks at the firmware version header in the S-Link packet and instantiates relevant format translator. More... | |
void | checkHeaders () |
check block headers for consistency More... | |
void | doVerboseOutput (const GctBlockHeaderCollection &bHdrs, const GctUnpackCollections *const colls) const |
Prints out a list of blocks and the various numbers of trigger objects that have been unpacked from them. More... | |
virtual void | endJob () |
method called at job end - use to print summary report More... | |
void | produce (edm::Event &, const edm::EventSetup &) override |
void | unpack (const FEDRawData &d, edm::Event &e, GctUnpackCollections *const colls) |
Unpacks the raw data. More... | |
Private Attributes | |
GctBlockHeaderCollection | blockHeaders_ |
const bool | checkHeaders_ |
If true, check block headers for synchronisation. More... | |
std::vector< unsigned > | errorCounters_ |
Counts number of errors for each code (index) More... | |
L1TriggerErrorCollection * | errors_ |
pointer to error collection More... | |
int | fedId_ |
GCT FED ID. More... | |
GctFormatTranslateBase * | formatTranslator_ |
pointer to the block-to-digi converter More... | |
const unsigned | formatVersion_ |
Defines unpacker verison to be used (e.g.: "Auto-detect", "MCLegacy", "V35", etc). More... | |
const bool | hltMode_ |
If true, only outputs the GCT data sent to the GT (number of BXs defined by numberOfGctSamplesToUnpack_) More... | |
edm::InputTag | inputLabel_ |
FED collection label. More... | |
const unsigned | numberOfGctSamplesToUnpack_ |
Number of BXs of GCT data to unpack (assuming they are in the raw data) More... | |
const unsigned | numberOfRctSamplesToUnpack_ |
Number of BXs of RCT data to unpack (assuming they are in the raw data) More... | |
unsigned | unpackFailures_ |
To count the total number of GCT unpack failures. More... | |
const bool | unpackSharedRegions_ |
Commissioning option: if true, where applicable the shared RCT calo regions will also be unpacked. More... | |
const bool | verbose_ |
If true, then debug print out for each event. More... | |
Static Private Attributes | |
static const unsigned | MAX_BLOCKS = 256 |
The maximum number of blocks we will try to unpack before thinking something is wrong. More... | |
static const unsigned | MAX_ERR_CODE = 6 |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
using | CacheTypes = CacheContexts< T... > |
using | GlobalCache = typename CacheTypes::GlobalCache |
using | HasAbility = AbilityChecker< T... > |
using | InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache |
using | LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache |
using | LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > |
using | LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache |
using | RunCache = typename CacheTypes::RunCache |
using | RunContext = RunContextT< RunCache, GlobalCache > |
using | RunSummaryCache = typename CacheTypes::RunSummaryCache |
Description: Produce GCT digis from raw data
Implementation: <Notes on="" implementation>="">
Definition at line 43 of file GctRawToDigi.h.
|
explicit |
Register Products
Definition at line 34 of file GctRawToDigi.cc.
References fedId_, formatTranslator_, formatVersion_, hltMode_, inputLabel_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
|
override |
Definition at line 112 of file GctRawToDigi.cc.
References formatTranslator_.
|
private |
Definition at line 291 of file GctRawToDigi.cc.
References errorCounters_, errors_, fedId_, LogDebug, MAX_ERR_CODE, l1tGTMenu_BTagSeeds_cff::os, and verbose_.
Referenced by autoDetectRequiredFormatTranslator(), produce(), and unpack().
|
private |
Looks at the firmware version header in the S-Link packet and instantiates relevant format translator.
Returns false if it fails to instantiate a Format Translator
Definition at line 238 of file GctRawToDigi.cc.
References addError(), ztail::d, TauDecayModes::dec, formatTranslator_, hltMode_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
Referenced by produce().
|
private |
check block headers for consistency
Definition at line 276 of file GctRawToDigi.cc.
Referenced by produce().
|
private |
Prints out a list of blocks and the various numbers of trigger objects that have been unpacked from them.
Definition at line 280 of file GctRawToDigi.cc.
References formatTranslator_, GctFormatTranslateBase::getBlockDescription(), mps_fire::i, l1tGTMenu_BTagSeeds_cff::os, and findQualityFiles::size.
Referenced by produce().
|
privatevirtual |
method called at job end - use to print summary report
Definition at line 340 of file GctRawToDigi.cc.
References errorCounters_, mps_fire::i, MAX_ERR_CODE, l1tGTMenu_BTagSeeds_cff::os, dqmMemoryStats::total, and verbose_.
|
static |
Definition at line 118 of file GctRawToDigi.cc.
References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and kComment.
|
overrideprivate |
Definition at line 144 of file GctRawToDigi.cc.
References addError(), autoDetectRequiredFormatTranslator(), blockHeaders_, checkHeaders(), checkHeaders_, FEDRawData::data(), TauDecayModes::dec, doVerboseOutput(), errors_, fedId_, l1tstage2emulator_dqm_sourceclient-live_cfg::feds, formatTranslator_, iEvent, inputLabel_, LogDebug, FEDRawData::size(), unpack(), and verbose_.
|
private |
Unpacks the raw data.
invalidDataFlag | - if true, then won't attempt unpack but just output empty collecions. |
Definition at line 194 of file GctRawToDigi.cc.
References addError(), blockHeaders_, GctBlockHeader::blockLength(), checkHeaders_, GctFormatTranslateBase::convertBlock(), ztail::d, data, formatTranslator_, GctFormatTranslateBase::generateBlockHeader(), LogDebug, MAX_BLOCKS, GctBlockHeader::nSamples(), GctFormatTranslateBase::setUnpackCollections(), and verbose_.
Referenced by produce().
|
private |
Definition at line 97 of file GctRawToDigi.h.
|
private |
If true, check block headers for synchronisation.
Definition at line 90 of file GctRawToDigi.h.
|
private |
Counts number of errors for each code (index)
Definition at line 102 of file GctRawToDigi.h.
Referenced by addError(), and endJob().
|
private |
pointer to error collection
Definition at line 101 of file GctRawToDigi.h.
Referenced by addError(), and produce().
|
private |
GCT FED ID.
Definition at line 79 of file GctRawToDigi.h.
Referenced by addError(), GctRawToDigi(), and produce().
|
private |
pointer to the block-to-digi converter
Definition at line 94 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), doVerboseOutput(), GctRawToDigi(), produce(), unpack(), and ~GctRawToDigi().
|
private |
Defines unpacker verison to be used (e.g.: "Auto-detect", "MCLegacy", "V35", etc).
Definition at line 89 of file GctRawToDigi.h.
Referenced by GctRawToDigi().
|
private |
If true, only outputs the GCT data sent to the GT (number of BXs defined by numberOfGctSamplesToUnpack_)
Definition at line 82 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
FED collection label.
Definition at line 78 of file GctRawToDigi.h.
Referenced by GctRawToDigi(), and produce().
|
staticprivate |
The maximum number of blocks we will try to unpack before thinking something is wrong.
Definition at line 75 of file GctRawToDigi.h.
Referenced by unpack().
|
staticprivate |
Definition at line 100 of file GctRawToDigi.h.
Referenced by addError(), and endJob().
|
private |
Number of BXs of GCT data to unpack (assuming they are in the raw data)
Definition at line 84 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
Number of BXs of RCT data to unpack (assuming they are in the raw data)
Definition at line 86 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
To count the total number of GCT unpack failures.
Definition at line 103 of file GctRawToDigi.h.
|
private |
Commissioning option: if true, where applicable the shared RCT calo regions will also be unpacked.
Definition at line 88 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
If true, then debug print out for each event.
Definition at line 91 of file GctRawToDigi.h.
Referenced by addError(), endJob(), produce(), and unpack().