#include <EventFilter/GctRawToDigi/src/GctRawToDigi.cc>
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... | |
virtual 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<> | |
typedef CacheContexts< T...> | CacheTypes |
typedef CacheTypes::GlobalCache | GlobalCache |
typedef AbilityChecker< T...> | HasAbility |
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
typedef LuminosityBlockContextT < LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
typedef CacheTypes::RunCache | RunCache |
typedef RunContextT< RunCache, GlobalCache > | RunContext |
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
Public Types inherited from edm::stream::EDProducerBase | |
typedef EDProducerAdaptorBase | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Static Public Member Functions inherited from edm::stream::EDProducerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
Description: Produce GCT digis from raw data
Implementation: <Notes on="" implementation>="">
Definition at line 44 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_.
GctRawToDigi::~GctRawToDigi | ( | ) |
Definition at line 113 of file GctRawToDigi.cc.
References formatTranslator_.
|
private |
Definition at line 287 of file GctRawToDigi.cc.
References errorCounters_, errors_, fedId_, LogDebug, MAX_ERR_CODE, 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 224 of file GctRawToDigi.cc.
References addError(), formatTranslator_, hltMode_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
Referenced by produce().
|
private |
check block headers for consistency
Definition at line 266 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 273 of file GctRawToDigi.cc.
References formatTranslator_, GctFormatTranslateBase::getBlockDescription(), i, and findQualityFiles::size.
Referenced by produce().
|
privatevirtual |
method called at job end - use to print summary report
Definition at line 323 of file GctRawToDigi.cc.
References errorCounters_, i, MAX_ERR_CODE, pileupDistInMC::total, and verbose_.
|
overrideprivatevirtual |
Implements edm::stream::EDProducerBase.
Definition at line 126 of file GctRawToDigi.cc.
References addError(), autoDetectRequiredFormatTranslator(), blockHeaders_, checkHeaders(), checkHeaders_, FEDRawData::data(), doVerboseOutput(), errors_, fedId_, formatTranslator_, edm::Event::get(), edm::Event::getByLabel(), inputLabel_, LogDebug, FEDRawData::size(), unpack(), and verbose_.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
|
private |
Unpacks the raw data.
invalidDataFlag | - if true, then won't attempt unpack but just output empty collecions. |
Definition at line 177 of file GctRawToDigi.cc.
References addError(), blockHeaders_, GctBlockHeader::blockLength(), checkHeaders_, GctFormatTranslateBase::convertBlock(), FEDRawData::data(), data, formatTranslator_, GctFormatTranslateBase::generateBlockHeader(), LogDebug, MAX_BLOCKS, GctBlockHeader::nSamples(), GctFormatTranslateBase::setUnpackCollections(), FEDRawData::size(), and verbose_.
Referenced by produce().
|
private |
Definition at line 98 of file GctRawToDigi.h.
|
private |
If true, check block headers for synchronisation.
Definition at line 91 of file GctRawToDigi.h.
|
private |
Counts number of errors for each code (index)
Definition at line 103 of file GctRawToDigi.h.
Referenced by addError(), and endJob().
|
private |
pointer to error collection
Definition at line 102 of file GctRawToDigi.h.
Referenced by addError(), and produce().
|
private |
GCT FED ID.
Definition at line 84 of file GctRawToDigi.h.
Referenced by addError(), GctRawToDigi(), and produce().
|
private |
pointer to the block-to-digi converter
Definition at line 95 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 90 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 86 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
FED collection label.
Definition at line 83 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 80 of file GctRawToDigi.h.
Referenced by unpack().
|
staticprivate |
Definition at line 101 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 87 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 88 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
To count the total number of GCT unpack failures.
Definition at line 104 of file GctRawToDigi.h.
|
private |
Commissioning option: if true, where applicable the shared RCT calo regions will also be unpacked.
Definition at line 89 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
If true, then debug print out for each event.
Definition at line 92 of file GctRawToDigi.h.
Referenced by addError(), endJob(), produce(), and unpack().