#include <EventFilter/GctRawToDigi/src/GctRawToDigi.cc>
Public Member Functions | |
GctRawToDigi (const edm::ParameterSet &) | |
~GctRawToDigi () | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
boost::function< void(const BranchDescription &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
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... | |
virtual void | beginJob () |
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 &) |
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::EDProducer | |
typedef EDProducer | ModuleType |
typedef WorkerT< EDProducer > | WorkerType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Static Public Member Functions inherited from edm::EDProducer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDProducer | |
CurrentProcessingContext const * | currentContext () const |
Protected Member Functions inherited from edm::ProducerBase | |
template<class TProducer , class TMethod > | |
void | callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod) |
Description: Produce GCT digis from raw data
Implementation: <Notes on="" implementation>="">
Definition at line 45 of file GctRawToDigi.h.
|
explicit |
Register Products
Definition at line 34 of file GctRawToDigi.cc.
References fedId_, formatTranslator_, formatVersion_, hltMode_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
GctRawToDigi::~GctRawToDigi | ( | ) |
Definition at line 112 of file GctRawToDigi.cc.
References formatTranslator_.
|
private |
Definition at line 292 of file GctRawToDigi.cc.
References errorCounters_, errors_, fedId_, and MAX_ERR_CODE.
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 229 of file GctRawToDigi.cc.
References addError(), formatTranslator_, hltMode_, LogDebug, numberOfGctSamplesToUnpack_, numberOfRctSamplesToUnpack_, and unpackSharedRegions_.
Referenced by produce().
|
privatevirtual |
|
private |
check block headers for consistency
Definition at line 271 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 278 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
Reimplemented from edm::EDProducer.
Definition at line 324 of file GctRawToDigi.cc.
References errorCounters_, i, MAX_ERR_CODE, and pileupDistInMC::total.
|
privatevirtual |
Implements edm::EDProducer.
Definition at line 131 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 python.JSONExport.JsonExport::export(), and python.HTMLExport.HTMLExport::export().
|
private |
Unpacks the raw data.
invalidDataFlag | - if true, then won't attempt unpack but just output empty collecions. |
Definition at line 182 of file GctRawToDigi.cc.
References addError(), blockHeaders_, GctBlockHeader::blockLength(), checkHeaders_, GctFormatTranslateBase::convertBlock(), FEDRawData::data(), runTheMatrix::data, formatTranslator_, GctFormatTranslateBase::generateBlockHeader(), LogDebug, MAX_BLOCKS, GctBlockHeader::nSamples(), GctFormatTranslateBase::setUnpackCollections(), FEDRawData::size(), and verbose_.
Referenced by produce().
|
private |
Definition at line 100 of file GctRawToDigi.h.
|
private |
If true, check block headers for synchronisation.
Definition at line 93 of file GctRawToDigi.h.
|
private |
Counts number of errors for each code (index)
Definition at line 105 of file GctRawToDigi.h.
Referenced by addError(), and endJob().
|
private |
pointer to error collection
Definition at line 104 of file GctRawToDigi.h.
Referenced by addError(), and produce().
|
private |
GCT FED ID.
Definition at line 86 of file GctRawToDigi.h.
Referenced by addError(), GctRawToDigi(), and produce().
|
private |
pointer to the block-to-digi converter
Definition at line 97 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 92 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 88 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
|
staticprivate |
The maximum number of blocks we will try to unpack before thinking something is wrong.
Definition at line 82 of file GctRawToDigi.h.
Referenced by unpack().
|
staticprivate |
Definition at line 103 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 89 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 90 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
To count the total number of GCT unpack failures.
Definition at line 106 of file GctRawToDigi.h.
|
private |
Commissioning option: if true, where applicable the shared RCT calo regions will also be unpacked.
Definition at line 91 of file GctRawToDigi.h.
Referenced by autoDetectRequiredFormatTranslator(), and GctRawToDigi().
|
private |
If true, then debug print out for each event.
Definition at line 94 of file GctRawToDigi.h.