Unpacks/packs the V38 raw format. More...
#include <GctFormatTranslateV38.h>
Public Member Functions | |
bool | convertBlock (const unsigned char *d, const GctBlockHeader &hdr) override |
Get digis from the block - will return true if it succeeds, false otherwise. More... | |
GctFormatTranslateV38 (bool hltMode=false, bool unpackSharedRegions=false, unsigned numberOfGctSamplesToUnpack=1, unsigned numberOfRctSamplesToUnpack=1) | |
Constructor. More... | |
GctBlockHeader | generateBlockHeader (const unsigned char *data) const override |
Generate a block header from four 8-bit values. More... | |
~GctFormatTranslateV38 () override | |
Destructor. More... | |
Public Member Functions inherited from GctFormatTranslateBase | |
GctFormatTranslateBase (bool hltMode=false, bool unpackSharedRegions=false) | |
Constructor. More... | |
const std::string & | getBlockDescription (const GctBlockHeader &header) const |
Get block description. More... | |
void | setPackingBxId (uint32_t bxId) |
void | setPackingEventId (uint32_t eventId) |
void | setUnpackCollections (GctUnpackCollections *const collections) |
Set the pointer to the unpack collections. More... | |
virtual | ~GctFormatTranslateBase () |
Destructor. More... | |
Protected Member Functions | |
const BlockLengthMap & | blockLengthMap () const final |
get the static block ID to block-length map. More... | |
const BlockNameMap & | blockNameMap () const final |
get the static block ID to blockname map. More... | |
uint32_t | generateRawHeader (const uint32_t blockId, const uint32_t nSamples, const uint32_t bxId, const uint32_t eventId) const override |
Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs. More... | |
const BlockIdToEmCandIsoBoundMap & | internEmIsoBounds () const final |
get the static intern EM cand isolated boundary map. More... | |
const BlkToRctCrateMap & | rctEmCrateMap () const final |
get static the block ID to RCT crate map for electrons. More... | |
const BlkToRctCrateMap & | rctJetCrateMap () const final |
get the static block ID to RCT crate map for jets More... | |
Protected Member Functions inherited from GctFormatTranslateBase | |
void | blockDoNothing (const unsigned char *d, const GctBlockHeader &hdr) |
The null unpack function - obviously common to all formats. More... | |
bool | checkBlock (const GctBlockHeader &hdr) const |
Performs checks on the block header to see if the block is possible to unpack or not. More... | |
GctUnpackCollections *const | colls () const |
Protected access to the GCT Unpack Collections. More... | |
L1GctJetCandCollection *const | gctJets (const unsigned cat) const |
Get a specific jet candandiate collection using the JetCandCategory enumeration. More... | |
bool | hltMode () const |
Protected interface to get HLT optimisation mode flag. More... | |
const uint32_t | packingBxId () const |
Get the BxId to be used when packing data. More... | |
const uint32_t | packingEventId () const |
Get the EventId to be used when packing data. More... | |
const SourceCardRouting & | srcCardRouting () const |
Protected interface to the unpackSharedRegions commissioning option. More... | |
bool | unpackSharedRegions () const |
void | writeRawHeader (unsigned char *data, uint32_t blockId, uint32_t nSamples) const |
Writes a raw block header into the raw data array for a given block ID and number of time-samples. More... | |
Private Types | |
typedef std::map< unsigned int, PtrToUnpackFn > | BlockIdToUnpackFnMap |
Typedef for a block ID to unpack function map. More... | |
typedef void(GctFormatTranslateV38::* | PtrToUnpackFn) (const unsigned char *, const GctBlockHeader &) |
Function pointer typdef to a block unpack function. More... | |
Private Member Functions | |
void | blockToFibres (const unsigned char *d, const GctBlockHeader &hdr) |
unpack Fibres More... | |
void | blockToFibresAndToRctEmCand (const unsigned char *d, const GctBlockHeader &hdr) |
unpack Fibres and RCT EM Candidates More... | |
void | blockToGctEmCandsAndEnergySums (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT EM Candidates and energy sums. More... | |
void | blockToGctInternEmCand (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal EM Candidates More... | |
void | blockToGctInternEtSums (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal Et sums More... | |
void | blockToGctInternEtSumsAndJetCluster (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal output of leaf jet finder More... | |
void | blockToGctInternHtMissPostWheel (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal Missing Ht data that is either wheel output or concJet input (i.e. after wheel processing). More... | |
void | blockToGctInternHtMissPreWheel (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal Missing Ht data that is being input to the wheels. More... | |
void | blockToGctInternRingSums (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal HF ring sums More... | |
void | blockToGctJetCandsAndCounts (const unsigned char *d, const GctBlockHeader &hdr) |
Unpack GCT Jet Candidates and jet counts. More... | |
void | blockToGctJetClusterMinimal (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal input to wheel jet sort More... | |
void | blockToGctJetPreCluster (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal shared jet finder info More... | |
void | blockToGctTrigObjects (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal wheel and conc jets More... | |
void | blockToGctWheelInputInternEtAndRingSums (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal input to wheel More... | |
void | blockToGctWheelOutputInternEtAndRingSums (const unsigned char *d, const GctBlockHeader &hdr) |
unpack GCT internal output of wheel More... | |
void | blockToRctCaloRegions (const unsigned char *d, const GctBlockHeader &hdr) |
Unpack RCT Calo Regions. More... | |
void | blockToRctEmCand (const unsigned char *d, const GctBlockHeader &hdr) |
unpack RCT EM Candidates More... | |
Private Attributes | |
const unsigned | m_numberOfGctSamplesToUnpack |
Number of BXs of GCT data to unpack (assuming they are in the raw data) More... | |
const unsigned | m_numberOfRctSamplesToUnpack |
Static Private Attributes | |
static const BlockLengthMap | m_blockLength |
Map to translate block number to fundamental size of a block (i.e. for 1 time-sample). More... | |
static const BlockNameMap | m_blockName |
Map to hold a description for each block number. More... | |
static const BlockIdToUnpackFnMap | m_blockUnpackFn |
Block ID to unpack function map. More... | |
static const BlockIdToEmCandIsoBoundMap | m_internEmIsoBounds |
static const BlkToRctCrateMap | m_rctEmCrate |
Map to relate capture block ID to the RCT crate the data originated from (for electrons). More... | |
static const BlkToRctCrateMap | m_rctJetCrate |
Map to relate capture block ID to the RCT crate the data originated from (for jets). More... | |
Additional Inherited Members | |
Protected Types inherited from GctFormatTranslateBase | |
typedef std::map< unsigned int, unsigned int > | BlkToRctCrateMap |
Typedef for mapping block ID to RCT crate. More... | |
typedef std::map< unsigned int, IsoBoundaryPair > | BlockIdToEmCandIsoBoundMap |
A typdef for mapping Block IDs to IsoBoundaryPairs. More... | |
typedef std::map< unsigned int, unsigned int > | BlockLengthMap |
Block ID to Block Length map. More... | |
typedef std::pair< unsigned int, unsigned int > | BlockLengthPair |
Block ID/length pair. More... | |
typedef std::map< unsigned int, std::string > | BlockNameMap |
Block ID to Block Description map. More... | |
typedef std::pair< unsigned int, std::string > | BlockNamePair |
Block ID/Description pair. More... | |
enum | EmCandCatagory { NON_ISO_EM_CANDS, ISO_EM_CANDS, NUM_EM_CAND_CATEGORIES } |
An enum of the EM candidate types. More... | |
typedef std::pair< unsigned int, unsigned int > | IsoBoundaryPair |
enum | JetCandCategory { TAU_JETS, FORWARD_JETS, CENTRAL_JETS, NUM_JET_CATEGORIES } |
Useful enumeration for jet candidate pack/unpack. More... | |
Unpacks/packs the V38 raw format.
Definition at line 17 of file GctFormatTranslateV38.h.
|
private |
Typedef for a block ID to unpack function map.
Definition at line 78 of file GctFormatTranslateV38.h.
|
private |
Function pointer typdef to a block unpack function.
Definition at line 76 of file GctFormatTranslateV38.h.
|
explicit |
Constructor.
hltMode | - set true to unpack only BX zero and GCT output data (i.e. to run as quick as possible). |
unpackSharedRegions | - this is a commissioning option to unpack the shared RCT calo regions. |
Definition at line 576 of file GctFormatTranslateV38.cc.
|
override |
|
inlinefinalprotectedvirtual |
get the static block ID to block-length map.
Implements GctFormatTranslateBase.
Definition at line 47 of file GctFormatTranslateV38.h.
References m_blockLength.
Referenced by generateBlockHeader().
|
inlinefinalprotectedvirtual |
get the static block ID to blockname map.
Implements GctFormatTranslateBase.
Definition at line 51 of file GctFormatTranslateV38.h.
References m_blockName.
|
private |
unpack Fibres
Definition at line 977 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, GctUnpackCollections::gctFibres(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
Referenced by blockToFibresAndToRctEmCand().
|
private |
unpack Fibres and RCT EM Candidates
Definition at line 999 of file GctFormatTranslateV38.cc.
References blockToFibres(), and blockToRctEmCand().
|
private |
unpack GCT EM Candidates and energy sums.
Definition at line 660 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), nano_mu_digi_cff::bx, reco::ceil(), GctFormatTranslateBase::colls(), ztail::d, castor_dqm_sourceclient-live_cfg::firstSample, GctUnpackCollections::gctEtHad(), GctUnpackCollections::gctEtMiss(), GctUnpackCollections::gctEtTot(), GctUnpackCollections::gctIsoEm(), GctUnpackCollections::gctNonIsoEm(), genparticles_cff::iso, CastorRawToDigi_cfi::lastSample, LogDebug, m_numberOfGctSamplesToUnpack, SiStripPI::min, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and hltrates_dqm_sourceclient-live_cfg::offset.
|
private |
unpack GCT internal EM Candidates
Definition at line 805 of file GctFormatTranslateV38.cc.
References cms::cuda::assert(), GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, mps_fire::end, newFWLiteAna::found, GctUnpackCollections::gctInternEm(), GctFormatTranslateBase::hltMode(), mps_fire::i, internEmIsoBounds(), genparticles_cff::iso, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), hltrates_dqm_sourceclient-live_cfg::offset, and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal Et sums
Definition at line 1004 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternEtSum::fromTotalEtOrHt(), GctUnpackCollections::gctInternEtSums(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal output of leaf jet finder
Definition at line 1028 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternJetData::fromJetCluster(), L1GctInternEtSum::fromJetMissEt(), L1GctInternEtSum::fromJetTotEt(), L1GctInternEtSum::fromJetTotHt(), GctUnpackCollections::gctInternEtSums(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal Missing Ht data that is either wheel output or concJet input (i.e. after wheel processing).
Definition at line 1252 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, GctUnpackCollections::gctInternHtMiss(), GctFormatTranslateBase::hltMode(), LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, L1GctInternHtMiss::unpackerMissHtx(), and L1GctInternHtMiss::unpackerMissHty().
|
private |
unpack GCT internal Missing Ht data that is being input to the wheels.
Definition at line 1229 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, GctUnpackCollections::gctInternHtMiss(), GctFormatTranslateBase::hltMode(), LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, and L1GctInternHtMiss::unpackerMissHtxHty().
|
private |
unpack GCT internal HF ring sums
Definition at line 1139 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternHFData::fromConcBitCounts(), L1GctInternHFData::fromConcRingSums(), GctUnpackCollections::gctInternHFData(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
Unpack GCT Jet Candidates and jet counts.
Definition at line 735 of file GctFormatTranslateV38.cc.
References cms::cuda::assert(), GctBlockHeader::blockId(), nano_mu_digi_cff::bx, reco::ceil(), GctFormatTranslateBase::colls(), ztail::d, castor_dqm_sourceclient-live_cfg::firstSample, GctFormatTranslateBase::FORWARD_JETS, L1GctHFBitCounts::fromConcHFBitCounts(), L1GctHFRingEtSums::fromConcRingSums(), GctUnpackCollections::gctHfBitCounts(), GctUnpackCollections::gctHfRingEtSums(), GctUnpackCollections::gctHtMiss(), GctFormatTranslateBase::gctJets(), PDWG_EXODelayedJetMET_cff::jets, CastorRawToDigi_cfi::lastSample, LogDebug, m_numberOfGctSamplesToUnpack, SiStripPI::min, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), GctFormatTranslateBase::NUM_JET_CATEGORIES, and GctFormatTranslateBase::TAU_JETS.
|
private |
unpack GCT internal input to wheel jet sort
Definition at line 1085 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternJetData::fromJetClusterMinimal(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal shared jet finder info
Definition at line 1112 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternJetData::fromJetPreCluster(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal wheel and conc jets
Definition at line 1058 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternJetData::fromGctTrigObject(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal input to wheel
Definition at line 1166 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternEtSum::fromMissEtxOrEty(), L1GctInternEtSum::fromTotalEtOrHt(), L1GctInternHFData::fromWheelBitCounts(), L1GctInternHFData::fromWheelRingSums(), GctUnpackCollections::gctInternEtSums(), GctUnpackCollections::gctInternHFData(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
unpack GCT internal output of wheel
Definition at line 1197 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), ztail::d, L1GctInternEtSum::fromMissEtxOrEty(), L1GctInternEtSum::fromTotalEtOrHt(), L1GctInternHFData::fromWheelBitCounts(), L1GctInternHFData::fromWheelRingSums(), GctUnpackCollections::gctInternEtSums(), GctUnpackCollections::gctInternHFData(), GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.
|
private |
Unpack RCT Calo Regions.
Definition at line 904 of file GctFormatTranslateV38.cc.
References cms::cuda::assert(), GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), FCDTask_cfi::crate, ztail::d, mps_fire::end, newFWLiteAna::found, GctFormatTranslateBase::hltMode(), mps_fire::i, hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, LogDebug, L1CaloRegion::makeRegionFromUnpacker(), PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, GctUnpackCollections::rctCalo(), rctJetCrateMap(), and GctFormatTranslateBase::unpackSharedRegions().
|
private |
unpack RCT EM Candidates
Definition at line 845 of file GctFormatTranslateV38.cc.
References cms::cuda::assert(), GctBlockHeader::blockId(), GctBlockHeader::blockLength(), nano_mu_digi_cff::bx, GctFormatTranslateBase::colls(), FCDTask_cfi::crate, ztail::d, mps_fire::end, newFWLiteAna::found, GctFormatTranslateBase::hltMode(), mps_fire::i, LogDebug, PresampleTask_cfi::nSamples, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, GctUnpackCollections::rctEm(), rctEmCrateMap(), edm::second(), SourceCardRouting::SFPtoEMU(), and GctFormatTranslateBase::srcCardRouting().
Referenced by blockToFibresAndToRctEmCand().
|
overridevirtual |
Get digis from the block - will return true if it succeeds, false otherwise.
Implements GctFormatTranslateBase.
Definition at line 615 of file GctFormatTranslateV38.cc.
References GctBlockHeader::blockId(), GctFormatTranslateBase::checkBlock(), data, m_blockUnpackFn, GctBlockHeader::nSamples(), and edm::second().
|
overridevirtual |
Generate a block header from four 8-bit values.
Implements GctFormatTranslateBase.
Definition at line 586 of file GctFormatTranslateV38.cc.
References blockLengthMap(), data, PresampleTask_cfi::nSamples, and validateGeometry_cfg::valid.
|
overrideprotectedvirtual |
Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs.
Implements GctFormatTranslateBase.
Definition at line 636 of file GctFormatTranslateV38.cc.
References PresampleTask_cfi::nSamples.
|
inlinefinalprotectedvirtual |
get the static intern EM cand isolated boundary map.
Implements GctFormatTranslateBase.
Definition at line 61 of file GctFormatTranslateV38.h.
References m_internEmIsoBounds.
Referenced by blockToGctInternEmCand().
|
inlinefinalprotectedvirtual |
get static the block ID to RCT crate map for electrons.
Implements GctFormatTranslateBase.
Definition at line 53 of file GctFormatTranslateV38.h.
References m_rctEmCrate.
Referenced by blockToRctEmCand().
|
inlinefinalprotectedvirtual |
get the static block ID to RCT crate map for jets
Implements GctFormatTranslateBase.
Definition at line 57 of file GctFormatTranslateV38.h.
References m_rctJetCrate.
Referenced by blockToRctCaloRegions().
|
staticprivate |
Map to translate block number to fundamental size of a block (i.e. for 1 time-sample).
Definition at line 83 of file GctFormatTranslateV38.h.
Referenced by blockLengthMap().
|
staticprivate |
Map to hold a description for each block number.
Definition at line 86 of file GctFormatTranslateV38.h.
Referenced by blockNameMap().
|
staticprivate |
Block ID to unpack function map.
Definition at line 99 of file GctFormatTranslateV38.h.
Referenced by convertBlock().
|
staticprivate |
A map of Block IDs to IsoBoundaryPairs for storing the location of the isolated Internal EM cands in the pipeline, as this differs with Block ID.
Definition at line 96 of file GctFormatTranslateV38.h.
Referenced by internEmIsoBounds().
|
private |
Number of BXs of GCT data to unpack (assuming they are in the raw data)
Number of BXs of RCT data to unpack (assuming they are in the raw data)
Definition at line 102 of file GctFormatTranslateV38.h.
Referenced by blockToGctEmCandsAndEnergySums(), and blockToGctJetCandsAndCounts().
|
private |
Definition at line 105 of file GctFormatTranslateV38.h.
|
staticprivate |
Map to relate capture block ID to the RCT crate the data originated from (for electrons).
Definition at line 89 of file GctFormatTranslateV38.h.
Referenced by rctEmCrateMap().
|
staticprivate |
Map to relate capture block ID to the RCT crate the data originated from (for jets).
Definition at line 92 of file GctFormatTranslateV38.h.
Referenced by rctJetCrateMap().