CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes | Static Private Attributes
GctFormatTranslateBase Class Referenceabstract

Abstract interface for RawToDigi/DigiToRaw conversions of GCT data. More...

#include <GctFormatTranslateBase.h>

Inheritance diagram for GctFormatTranslateBase:
GctFormatTranslateMCLegacy GctFormatTranslateV35 GctFormatTranslateV38

Public Member Functions

virtual bool convertBlock (const unsigned char *d, const GctBlockHeader &hdr)=0
 Get digis from the block - will return true if it succeeds, false otherwise. More...
 
 GctFormatTranslateBase (bool hltMode=false, bool unpackSharedRegions=false)
 Constructor. More...
 
virtual GctBlockHeader generateBlockHeader (const unsigned char *data) const =0
 Generate a block header from four 8-bit values. 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 Types

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...
 

Protected Member Functions

void blockDoNothing (const unsigned char *d, const GctBlockHeader &hdr)
 The null unpack function - obviously common to all formats. More...
 
virtual BlockLengthMapblockLengthMap ()=0
 get the static block ID to block-length map. More...
 
virtual const BlockLengthMapblockLengthMap () const =0
 get the static block ID to block-length map. More...
 
virtual BlockNameMapblockNameMap ()=0
 get the static block ID to block-name map. More...
 
virtual const BlockNameMapblockNameMap () const =0
 get the static block ID to blockname map. 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...
 
virtual uint32_t generateRawHeader (const uint32_t blockId, const uint32_t nSamples, const uint32_t bxId, const uint32_t eventId) const =0
 Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs. More...
 
bool hltMode () const
 Protected interface to get HLT optimisation mode flag. More...
 
virtual
BlockIdToEmCandIsoBoundMap
internEmIsoBounds ()=0
 get the static intern EM cand isolated boundary map. More...
 
virtual const
BlockIdToEmCandIsoBoundMap
internEmIsoBounds () const =0
 get the static intern EM cand isolated boundary map. 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...
 
virtual BlkToRctCrateMaprctEmCrateMap ()=0
 get the static block ID to RCT crate map for electrons. More...
 
virtual const BlkToRctCrateMaprctEmCrateMap () const =0
 get static the block ID to RCT crate map for electrons. More...
 
virtual BlkToRctCrateMaprctJetCrateMap ()=0
 get the static block ID to RCT crate map for jets More...
 
virtual const BlkToRctCrateMaprctJetCrateMap () const =0
 get the static block ID to RCT crate map for jets More...
 
const SourceCardRoutingsrcCardRouting () 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 Attributes

GctUnpackCollectionsm_collections
 Pointer to the output collections object. More...
 
bool m_hltMode
 If true, unpack only BX zero and GCT output data (i.e. to run as quickly as possible) More...
 
uint32_t m_packingBxId
 The bunch-crossing ID to be used by the data packing methods. More...
 
uint32_t m_packingEventId
 The event ID to be used by the data packing methods. More...
 
SourceCardRouting m_srcCardRouting
 Source card mapping info. More...
 
bool m_unpackSharedRegions
 If true, the shared RCT Calo regions will be unpacked also. More...
 

Static Private Attributes

static const std::string INVALID_BLOCK_HEADER_STR = "UNKNOWN/INVALID BLOCK HEADER"
 

Detailed Description

Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.

This class provides the common interface/functionality for the various concrete classes that can translate to/from specific RAW formats.

Author
Robert Frazier

Definition at line 27 of file GctFormatTranslateBase.h.

Member Typedef Documentation

typedef std::map<unsigned int, unsigned int> GctFormatTranslateBase::BlkToRctCrateMap
protected

Typedef for mapping block ID to RCT crate.

Definition at line 74 of file GctFormatTranslateBase.h.

typedef std::map<unsigned int, IsoBoundaryPair> GctFormatTranslateBase::BlockIdToEmCandIsoBoundMap
protected

A typdef for mapping Block IDs to IsoBoundaryPairs.

Definition at line 84 of file GctFormatTranslateBase.h.

typedef std::map<unsigned int, unsigned int> GctFormatTranslateBase::BlockLengthMap
protected

Block ID to Block Length map.

Definition at line 68 of file GctFormatTranslateBase.h.

typedef std::pair<unsigned int, unsigned int> GctFormatTranslateBase::BlockLengthPair
protected

Block ID/length pair.

Definition at line 69 of file GctFormatTranslateBase.h.

typedef std::map<unsigned int, std::string> GctFormatTranslateBase::BlockNameMap
protected

Block ID to Block Description map.

Definition at line 70 of file GctFormatTranslateBase.h.

typedef std::pair<unsigned int, std::string> GctFormatTranslateBase::BlockNamePair
protected

Block ID/Description pair.

Definition at line 71 of file GctFormatTranslateBase.h.

typedef std::pair<unsigned int, unsigned int> GctFormatTranslateBase::IsoBoundaryPair
protected

A typedef that holds the inclusive lower and upper bounds of pipeline gct trigger object pair number for isolated EM candidates. I.e. if the first and second trig object pair in the pipeline payload are isolated cands (4 iso in total), then the IsoBoundaryPair would be (0,1).

Definition at line 81 of file GctFormatTranslateBase.h.

Member Enumeration Documentation

An enum of the EM candidate types.

Note that the order here mimicks the order in the RAW data format.

Enumerator
NON_ISO_EM_CANDS 
ISO_EM_CANDS 
NUM_EM_CAND_CATEGORIES 

Definition at line 62 of file GctFormatTranslateBase.h.

Useful enumeration for jet candidate pack/unpack.

Note that the order here mimicks the order in the RAW data format.

Enumerator
TAU_JETS 
FORWARD_JETS 
CENTRAL_JETS 
NUM_JET_CATEGORIES 

Definition at line 66 of file GctFormatTranslateBase.h.

Constructor & Destructor Documentation

GctFormatTranslateBase::GctFormatTranslateBase ( bool  hltMode = false,
bool  unpackSharedRegions = false 
)
explicit

Constructor.

Parameters
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 12 of file GctFormatTranslateBase.cc.

12  :
13  m_collections(0),
17  m_packingBxId(0),
19 {
20 }
bool m_hltMode
If true, unpack only BX zero and GCT output data (i.e. to run as quickly as possible) ...
GctUnpackCollections * m_collections
Pointer to the output collections object.
uint32_t m_packingBxId
The bunch-crossing ID to be used by the data packing methods.
uint32_t m_packingEventId
The event ID to be used by the data packing methods.
SourceCardRouting m_srcCardRouting
Source card mapping info.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
bool m_unpackSharedRegions
If true, the shared RCT Calo regions will be unpacked also.
GctFormatTranslateBase::~GctFormatTranslateBase ( )
virtual

Destructor.

Definition at line 22 of file GctFormatTranslateBase.cc.

22 { }

Member Function Documentation

void GctFormatTranslateBase::blockDoNothing ( const unsigned char *  d,
const GctBlockHeader hdr 
)
inlineprotected

The null unpack function - obviously common to all formats.

Definition at line 133 of file GctFormatTranslateBase.h.

Referenced by GctFormatTranslateMCLegacy::GctFormatTranslateMCLegacy(), GctFormatTranslateV35::GctFormatTranslateV35(), and GctFormatTranslateV38::GctFormatTranslateV38().

133 {}
virtual BlockLengthMap& GctFormatTranslateBase::blockLengthMap ( )
protectedpure virtual

get the static block ID to block-length map.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

virtual const BlockLengthMap& GctFormatTranslateBase::blockLengthMap ( ) const
protectedpure virtual

get the static block ID to block-length map.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

virtual BlockNameMap& GctFormatTranslateBase::blockNameMap ( )
protectedpure virtual

get the static block ID to block-name map.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

Referenced by getBlockDescription().

virtual const BlockNameMap& GctFormatTranslateBase::blockNameMap ( ) const
protectedpure virtual

get the static block ID to blockname map.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

bool GctFormatTranslateBase::checkBlock ( const GctBlockHeader hdr) const
protected

Performs checks on the block header to see if the block is possible to unpack or not.

Definition at line 50 of file GctFormatTranslateBase.cc.

References LogDebug, GctBlockHeader::nSamples(), and GctBlockHeader::valid().

Referenced by GctFormatTranslateV35::convertBlock(), GctFormatTranslateV38::convertBlock(), and GctFormatTranslateMCLegacy::convertBlock().

51 {
52  // check block is valid
53  if ( !hdr.valid() )
54  {
55  LogDebug("GCT") << "Block unpack error: cannot unpack the following unknown/invalid block:\n" << hdr;
56  return false;
57  }
58 
59  // check block doesn't have too many time samples
60  if ( hdr.nSamples() >= 0xf ) {
61  LogDebug("GCT") << "Block unpack error: cannot unpack a block with 15 or more time samples:\n" << hdr;
62  return false;
63  }
64  return true;
65 }
#define LogDebug(id)
bool valid() const
Returns true if it&#39;s valid block header - i.e. if the header is known and can be unpacked.
uint32_t nSamples() const
Get the number of time samples.
GctUnpackCollections* const GctFormatTranslateBase::colls ( ) const
inlineprotected

Protected access to the GCT Unpack Collections.

Definition at line 107 of file GctFormatTranslateBase.h.

References m_collections.

Referenced by GctFormatTranslateMCLegacy::blockToAllRctCaloRegions(), GctFormatTranslateV35::blockToFibres(), GctFormatTranslateV38::blockToFibres(), GctFormatTranslateMCLegacy::blockToFibres(), GctFormatTranslateV35::blockToGctEmCandsAndEnergySums(), GctFormatTranslateV38::blockToGctEmCandsAndEnergySums(), GctFormatTranslateMCLegacy::blockToGctEmCandsAndEnergySums(), GctFormatTranslateV35::blockToGctInternEmCand(), GctFormatTranslateV38::blockToGctInternEmCand(), GctFormatTranslateV35::blockToGctInternEtSums(), GctFormatTranslateV38::blockToGctInternEtSums(), GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster(), GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster(), GctFormatTranslateV38::blockToGctInternHtMissPostWheel(), GctFormatTranslateV38::blockToGctInternHtMissPreWheel(), GctFormatTranslateV35::blockToGctInternRingSums(), GctFormatTranslateV38::blockToGctInternRingSums(), GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts(), GctFormatTranslateV35::blockToGctJetClusterMinimal(), GctFormatTranslateV38::blockToGctJetClusterMinimal(), GctFormatTranslateV35::blockToGctJetPreCluster(), GctFormatTranslateV38::blockToGctJetPreCluster(), GctFormatTranslateV35::blockToGctTrigObjects(), GctFormatTranslateV38::blockToGctTrigObjects(), GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums(), GctFormatTranslateV35::blockToRctCaloRegions(), GctFormatTranslateV38::blockToRctCaloRegions(), GctFormatTranslateV35::blockToRctEmCand(), GctFormatTranslateV38::blockToRctEmCand(), GctFormatTranslateMCLegacy::blockToRctEmCand(), and gctJets().

virtual bool GctFormatTranslateBase::convertBlock ( const unsigned char *  d,
const GctBlockHeader hdr 
)
pure virtual

Get digis from the block - will return true if it succeeds, false otherwise.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

Referenced by GctRawToDigi::unpack().

L1GctJetCandCollection *const GctFormatTranslateBase::gctJets ( const unsigned  cat) const
protected

Get a specific jet candandiate collection using the JetCandCategory enumeration.

Definition at line 33 of file GctFormatTranslateBase.cc.

References colls(), FORWARD_JETS, GctUnpackCollections::gctCenJets(), GctUnpackCollections::gctForJets(), GctUnpackCollections::gctTauJets(), and TAU_JETS.

Referenced by GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), and GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts().

34 {
35  switch(cat)
36  {
37  case TAU_JETS: return colls()->gctTauJets();
38  case FORWARD_JETS: return colls()->gctForJets();
39  default: return colls()->gctCenJets();
40  }
41 }
L1GctJetCandCollection *const gctTauJets() const
GCT output: Tau Jets collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
L1GctJetCandCollection *const gctCenJets() const
GCT output: Central Jets collection.
L1GctJetCandCollection *const gctForJets() const
GCT output: Forward Jets collection.
virtual GctBlockHeader GctFormatTranslateBase::generateBlockHeader ( const unsigned char *  data) const
pure virtual

Generate a block header from four 8-bit values.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

Referenced by GctRawToDigi::unpack().

virtual uint32_t GctFormatTranslateBase::generateRawHeader ( const uint32_t  blockId,
const uint32_t  nSamples,
const uint32_t  bxId,
const uint32_t  eventId 
) const
protectedpure virtual

Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

Referenced by writeRawHeader().

const std::string & GctFormatTranslateBase::getBlockDescription ( const GctBlockHeader header) const

Get block description.

Definition at line 24 of file GctFormatTranslateBase.cc.

References GctBlockHeader::blockId(), blockNameMap(), INVALID_BLOCK_HEADER_STR, edm::second(), and GctBlockHeader::valid().

Referenced by GctRawToDigi::doVerboseOutput().

25 {
26  if(!header.valid()) { return INVALID_BLOCK_HEADER_STR; }
27  return blockNameMap().find(header.blockId())->second;
28 }
bool valid() const
Returns true if it&#39;s valid block header - i.e. if the header is known and can be unpacked.
virtual BlockNameMap & blockNameMap()=0
get the static block ID to block-name map.
static const std::string INVALID_BLOCK_HEADER_STR
U second(std::pair< T, U > const &p)
uint32_t blockId() const
Get the block ID.
bool GctFormatTranslateBase::hltMode ( ) const
inlineprotected

Protected interface to get HLT optimisation mode flag.

Definition at line 108 of file GctFormatTranslateBase.h.

References m_hltMode.

Referenced by GctFormatTranslateMCLegacy::blockToAllRctCaloRegions(), GctFormatTranslateV35::blockToFibres(), GctFormatTranslateV38::blockToFibres(), GctFormatTranslateMCLegacy::blockToFibres(), GctFormatTranslateV35::blockToGctEmCandsAndEnergySums(), GctFormatTranslateMCLegacy::blockToGctEmCandsAndEnergySums(), GctFormatTranslateV35::blockToGctInternEmCand(), GctFormatTranslateV38::blockToGctInternEmCand(), GctFormatTranslateV35::blockToGctInternEtSums(), GctFormatTranslateV38::blockToGctInternEtSums(), GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster(), GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster(), GctFormatTranslateV38::blockToGctInternHtMissPostWheel(), GctFormatTranslateV38::blockToGctInternHtMissPreWheel(), GctFormatTranslateV35::blockToGctInternRingSums(), GctFormatTranslateV38::blockToGctInternRingSums(), GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts(), GctFormatTranslateV35::blockToGctJetClusterMinimal(), GctFormatTranslateV38::blockToGctJetClusterMinimal(), GctFormatTranslateV35::blockToGctJetPreCluster(), GctFormatTranslateV38::blockToGctJetPreCluster(), GctFormatTranslateV35::blockToGctTrigObjects(), GctFormatTranslateV38::blockToGctTrigObjects(), GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums(), GctFormatTranslateV35::blockToRctCaloRegions(), GctFormatTranslateV38::blockToRctCaloRegions(), GctFormatTranslateV35::blockToRctEmCand(), GctFormatTranslateV38::blockToRctEmCand(), and GctFormatTranslateMCLegacy::blockToRctEmCand().

virtual BlockIdToEmCandIsoBoundMap& GctFormatTranslateBase::internEmIsoBounds ( )
protectedpure virtual

get the static intern EM cand isolated boundary map.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

virtual const BlockIdToEmCandIsoBoundMap& GctFormatTranslateBase::internEmIsoBounds ( ) const
protectedpure virtual

get the static intern EM cand isolated boundary map.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

const uint32_t GctFormatTranslateBase::packingBxId ( ) const
inlineprotected

Get the BxId to be used when packing data.

Definition at line 111 of file GctFormatTranslateBase.h.

References m_packingBxId.

Referenced by writeRawHeader().

const uint32_t GctFormatTranslateBase::packingEventId ( ) const
inlineprotected

Get the EventId to be used when packing data.

Definition at line 112 of file GctFormatTranslateBase.h.

References m_packingEventId.

Referenced by writeRawHeader().

virtual BlkToRctCrateMap& GctFormatTranslateBase::rctEmCrateMap ( )
protectedpure virtual

get the static block ID to RCT crate map for electrons.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

virtual const BlkToRctCrateMap& GctFormatTranslateBase::rctEmCrateMap ( ) const
protectedpure virtual

get static the block ID to RCT crate map for electrons.

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

virtual BlkToRctCrateMap& GctFormatTranslateBase::rctJetCrateMap ( )
protectedpure virtual

get the static block ID to RCT crate map for jets

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

virtual const BlkToRctCrateMap& GctFormatTranslateBase::rctJetCrateMap ( ) const
protectedpure virtual

get the static block ID to RCT crate map for jets

Implemented in GctFormatTranslateMCLegacy, GctFormatTranslateV38, and GctFormatTranslateV35.

void GctFormatTranslateBase::setPackingBxId ( uint32_t  bxId)
inline

Definition at line 42 of file GctFormatTranslateBase.h.

References m_packingBxId.

Referenced by GctDigiToRaw::produce().

42 { m_packingBxId = bxId; }
uint32_t m_packingBxId
The bunch-crossing ID to be used by the data packing methods.
void GctFormatTranslateBase::setPackingEventId ( uint32_t  eventId)
inline

Definition at line 45 of file GctFormatTranslateBase.h.

References m_packingEventId.

Referenced by GctDigiToRaw::produce().

45 { m_packingEventId = eventId; }
uint32_t m_packingEventId
The event ID to be used by the data packing methods.
void GctFormatTranslateBase::setUnpackCollections ( GctUnpackCollections *const  collections)
inline

Set the pointer to the unpack collections.

Definition at line 39 of file GctFormatTranslateBase.h.

References m_collections.

Referenced by GctRawToDigi::unpack().

39 { m_collections = collections; }
GctUnpackCollections * m_collections
Pointer to the output collections object.
const SourceCardRouting& GctFormatTranslateBase::srcCardRouting ( ) const
inlineprotected

Protected interface to the unpackSharedRegions commissioning option.

Protected access to SourceCardRouting.

Definition at line 110 of file GctFormatTranslateBase.h.

References m_srcCardRouting.

Referenced by GctFormatTranslateV35::blockToRctEmCand(), GctFormatTranslateV38::blockToRctEmCand(), GctFormatTranslateMCLegacy::blockToRctEmCand(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

bool GctFormatTranslateBase::unpackSharedRegions ( ) const
inlineprotected

Definition at line 109 of file GctFormatTranslateBase.h.

References m_unpackSharedRegions.

Referenced by GctFormatTranslateV38::blockToRctCaloRegions().

109 { return m_unpackSharedRegions; }
bool m_unpackSharedRegions
If true, the shared RCT Calo regions will be unpacked also.
void GctFormatTranslateBase::writeRawHeader ( unsigned char *  data,
uint32_t  blockId,
uint32_t  nSamples 
) const
protected

Writes a raw block header into the raw data array for a given block ID and number of time-samples.

BxId and EventId values for the raw header are set via the setPackingBxId() and setPackingEventId() methods.

Definition at line 43 of file GctFormatTranslateBase.cc.

References data, generateRawHeader(), AlCaHLTBitMon_ParallelJobs::p, packingBxId(), and packingEventId().

Referenced by GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock(), GctFormatTranslateMCLegacy::writeGctOutEmAndEnergyBlock(), GctFormatTranslateMCLegacy::writeGctOutJetBlock(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

44 {
45  uint32_t hdr = generateRawHeader(blockId, nSamples, packingBxId(), packingEventId());
46  uint32_t * p = reinterpret_cast<uint32_t*>(const_cast<unsigned char *>(data));
47  *p = hdr;
48 }
const uint32_t packingEventId() const
Get the EventId to be used when packing data.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual uint32_t generateRawHeader(const uint32_t blockId, const uint32_t nSamples, const uint32_t bxId, const uint32_t eventId) const =0
Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs.
const uint32_t packingBxId() const
Get the BxId to be used when packing data.

Member Data Documentation

const std::string GctFormatTranslateBase::INVALID_BLOCK_HEADER_STR = "UNKNOWN/INVALID BLOCK HEADER"
staticprivate

Definition at line 139 of file GctFormatTranslateBase.h.

Referenced by getBlockDescription().

GctUnpackCollections* GctFormatTranslateBase::m_collections
private

Pointer to the output collections object.

Definition at line 144 of file GctFormatTranslateBase.h.

Referenced by colls(), and setUnpackCollections().

bool GctFormatTranslateBase::m_hltMode
private

If true, unpack only BX zero and GCT output data (i.e. to run as quickly as possible)

Definition at line 147 of file GctFormatTranslateBase.h.

Referenced by hltMode().

uint32_t GctFormatTranslateBase::m_packingBxId
private

The bunch-crossing ID to be used by the data packing methods.

Definition at line 157 of file GctFormatTranslateBase.h.

Referenced by packingBxId(), and setPackingBxId().

uint32_t GctFormatTranslateBase::m_packingEventId
private

The event ID to be used by the data packing methods.

Definition at line 160 of file GctFormatTranslateBase.h.

Referenced by packingEventId(), and setPackingEventId().

SourceCardRouting GctFormatTranslateBase::m_srcCardRouting
private

Source card mapping info.

Definition at line 154 of file GctFormatTranslateBase.h.

Referenced by srcCardRouting().

bool GctFormatTranslateBase::m_unpackSharedRegions
private

If true, the shared RCT Calo regions will be unpacked also.

This is a commissioning option only - may not be relevant to all concrete implementations!

Definition at line 151 of file GctFormatTranslateBase.h.

Referenced by unpackSharedRegions().