#include <EventFilter/GctRawToDigi/src/GctRawToDigi.cc>
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Static Public Member Functions inherited from edm::stream::EDProducerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (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... | |
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 |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
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 36 of file GctRawToDigi.cc.
References fedId_, formatTranslator_, formatVersion_, hltMode_, inputLabel_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
GctRawToDigi::~GctRawToDigi | ( | ) |
Definition at line 115 of file GctRawToDigi.cc.
References formatTranslator_.
|
private |
Definition at line 310 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 247 of file GctRawToDigi.cc.
References addError(), edmIntegrityCheck::d, TauDecayModes::dec, formatTranslator_, hltMode_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
Referenced by produce().
|
private |
check block headers for consistency
Definition at line 289 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 296 of file GctRawToDigi.cc.
References formatTranslator_, GctFormatTranslateBase::getBlockDescription(), mps_fire::i, and findQualityFiles::size.
Referenced by produce().
|
privatevirtual |
method called at job end - use to print summary report
Definition at line 346 of file GctRawToDigi.cc.
References DEFINE_FWK_MODULE, errorCounters_, mps_fire::i, MAX_ERR_CODE, pileupDistInMC::total, and verbose_.
|
static |
Definition at line 122 of file GctRawToDigi.cc.
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and kComment.
|
overrideprivatevirtual |
Definition at line 149 of file GctRawToDigi.cc.
References addError(), autoDetectRequiredFormatTranslator(), blockHeaders_, checkHeaders(), checkHeaders_, FEDRawData::data(), TauDecayModes::dec, doVerboseOutput(), errors_, FEDRawDataCollection::FEDData(), fedId_, formatTranslator_, edm::Event::get(), edm::Event::getByLabel(), inputLabel_, edm::HandleBase::isValid(), 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 200 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 99 of file GctRawToDigi.h.
|
private |
If true, check block headers for synchronisation.
Definition at line 92 of file GctRawToDigi.h.
|
private |
Counts number of errors for each code (index)
Definition at line 104 of file GctRawToDigi.h.
Referenced by addError(), and endJob().
|
private |
pointer to error collection
Definition at line 103 of file GctRawToDigi.h.
Referenced by addError(), and produce().
|
private |
GCT FED ID.
Definition at line 85 of file GctRawToDigi.h.
Referenced by addError(), GctRawToDigi(), and produce().
|
private |
pointer to the block-to-digi converter
Definition at line 96 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 91 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 87 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
FED collection label.
Definition at line 84 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 81 of file GctRawToDigi.h.
Referenced by unpack().
|
staticprivate |
Definition at line 102 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 88 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 89 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
To count the total number of GCT unpack failures.
Definition at line 105 of file GctRawToDigi.h.
|
private |
Commissioning option: if true, where applicable the shared RCT calo regions will also be unpacked.
Definition at line 90 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
If true, then debug print out for each event.
Definition at line 93 of file GctRawToDigi.h.
Referenced by addError(), endJob(), produce(), and unpack().