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 Member Functions | Private Types | Private Member Functions | Static Private Attributes
GctFormatTranslateV35 Class Reference

Unpacks/packs the V35 raw format. More...

#include <GctFormatTranslateV35.h>

Inheritance diagram for GctFormatTranslateV35:
GctFormatTranslateBase

Public Member Functions

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

virtual const BlockLengthMapblockLengthMap () const overridefinal
 get the static block ID to block-length map. More...
 
virtual const BlockNameMapblockNameMap () const overridefinal
 get the static block ID to blockname map. More...
 
virtual 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...
 
virtual const
BlockIdToEmCandIsoBoundMap
internEmIsoBounds () const overridefinal
 get the static intern EM cand isolated boundary map. More...
 
virtual const BlkToRctCrateMaprctEmCrateMap () const overridefinal
 get static the block ID to RCT crate map for electrons. More...
 
virtual const BlkToRctCrateMaprctJetCrateMap () const overridefinal
 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 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 Types

typedef std::map< unsigned int,
PtrToUnpackFn
BlockIdToUnpackFnMap
 Typedef for a block ID to unpack function map. More...
 
typedef void(GctFormatTranslateV35::* 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 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...
 

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

Detailed Description

Unpacks/packs the V35 raw format.

Author
Robert Frazier

Definition at line 17 of file GctFormatTranslateV35.h.

Member Typedef Documentation

typedef std::map<unsigned int, PtrToUnpackFn> GctFormatTranslateV35::BlockIdToUnpackFnMap
private

Typedef for a block ID to unpack function map.

Definition at line 75 of file GctFormatTranslateV35.h.

typedef void(GctFormatTranslateV35::* GctFormatTranslateV35::PtrToUnpackFn)(const unsigned char *, const GctBlockHeader &)
private

Function pointer typdef to a block unpack function.

Definition at line 73 of file GctFormatTranslateV35.h.

Constructor & Destructor Documentation

GctFormatTranslateV35::GctFormatTranslateV35 ( 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 540 of file GctFormatTranslateV35.cc.

GctFormatTranslateV35::~GctFormatTranslateV35 ( )
virtual

Destructor.

Definition at line 545 of file GctFormatTranslateV35.cc.

Member Function Documentation

virtual const BlockLengthMap& GctFormatTranslateV35::blockLengthMap ( ) const
inlinefinaloverrideprotectedvirtual

get the static block ID to block-length map.

Implements GctFormatTranslateBase.

Definition at line 49 of file GctFormatTranslateV35.h.

virtual const BlockNameMap& GctFormatTranslateV35::blockNameMap ( ) const
inlinefinaloverrideprotectedvirtual

get the static block ID to blockname map.

Implements GctFormatTranslateBase.

Definition at line 51 of file GctFormatTranslateV35.h.

void GctFormatTranslateV35::blockToFibres ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack Fibres

Definition at line 879 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToFibresAndToRctEmCand ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack Fibres and RCT EM Candidates

Definition at line 899 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctEmCandsAndEnergySums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT EM Candidates and energy sums.

Definition at line 617 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctInternEmCand ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal EM Candidates

Definition at line 728 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctInternEtSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal Et sums

Definition at line 905 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal output of leaf jet finder

Definition at line 927 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctInternRingSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal HF ring sums

Definition at line 1022 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctJetCandsAndCounts ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

Unpack GCT Jet Candidates and jet counts.

Definition at line 670 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctJetClusterMinimal ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal input to wheel jet sort

Definition at line 976 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctJetPreCluster ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal shared jet finder info

Definition at line 999 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctTrigObjects ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal wheel and conc jets

Definition at line 953 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal input to wheel

Definition at line 1047 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal output of wheel

Definition at line 1076 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToRctCaloRegions ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

Unpack RCT Calo Regions.

Definition at line 826 of file GctFormatTranslateV35.cc.

void GctFormatTranslateV35::blockToRctEmCand ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack RCT EM Candidates

Definition at line 770 of file GctFormatTranslateV35.cc.

bool GctFormatTranslateV35::convertBlock ( const unsigned char *  d,
const GctBlockHeader hdr 
)
overridevirtual

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

Implements GctFormatTranslateBase.

Definition at line 577 of file GctFormatTranslateV35.cc.

GctBlockHeader GctFormatTranslateV35::generateBlockHeader ( const unsigned char *  data) const
overridevirtual

Generate a block header from four 8-bit values.

Implements GctFormatTranslateBase.

Definition at line 549 of file GctFormatTranslateV35.cc.

uint32_t GctFormatTranslateV35::generateRawHeader ( const uint32_t  blockId,
const uint32_t  nSamples,
const uint32_t  bxId,
const uint32_t  eventId 
) const
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 595 of file GctFormatTranslateV35.cc.

virtual const BlockIdToEmCandIsoBoundMap& GctFormatTranslateV35::internEmIsoBounds ( ) const
inlinefinaloverrideprotectedvirtual

get the static intern EM cand isolated boundary map.

Implements GctFormatTranslateBase.

Definition at line 57 of file GctFormatTranslateV35.h.

virtual const BlkToRctCrateMap& GctFormatTranslateV35::rctEmCrateMap ( ) const
inlinefinaloverrideprotectedvirtual

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

Implements GctFormatTranslateBase.

Definition at line 53 of file GctFormatTranslateV35.h.

virtual const BlkToRctCrateMap& GctFormatTranslateV35::rctJetCrateMap ( ) const
inlinefinaloverrideprotectedvirtual

get the static block ID to RCT crate map for jets

Implements GctFormatTranslateBase.

Definition at line 55 of file GctFormatTranslateV35.h.

Member Data Documentation

const GctFormatTranslateV35::BlockLengthMap GctFormatTranslateV35::m_blockLength
staticprivate

Map to translate block number to fundamental size of a block (i.e. for 1 time-sample).

Definition at line 81 of file GctFormatTranslateV35.h.

const GctFormatTranslateV35::BlockNameMap GctFormatTranslateV35::m_blockName
staticprivate

Map to hold a description for each block number.

Definition at line 84 of file GctFormatTranslateV35.h.

const GctFormatTranslateV35::BlockIdToUnpackFnMap GctFormatTranslateV35::m_blockUnpackFn
staticprivate

Block ID to unpack function map.

Definition at line 97 of file GctFormatTranslateV35.h.

const GctFormatTranslateV35::BlockIdToEmCandIsoBoundMap GctFormatTranslateV35::m_internEmIsoBounds
staticprivate
Initial value:
= {
{0x680 , IsoBoundaryPair(8,15)},
{0x800 , IsoBoundaryPair(0, 9)},
{0x803 , IsoBoundaryPair(0, 1)},
{0x880 , IsoBoundaryPair(0, 7)},
{0x883 , IsoBoundaryPair(0, 1)},
{0xc00 , IsoBoundaryPair(0, 9)},
{0xc03 , IsoBoundaryPair(0, 1)},
{0xc80 , IsoBoundaryPair(0, 7)},
{0xc83 , IsoBoundaryPair(0, 1)}
}

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 94 of file GctFormatTranslateV35.h.

const GctFormatTranslateV35::BlkToRctCrateMap GctFormatTranslateV35::m_rctEmCrate
staticprivate
Initial value:
= {
{0x804,13},
{0x884,9},
{0xc04,4},
{0xc84,0}
}

Map to relate capture block ID to the RCT crate the data originated from (for electrons).

Definition at line 87 of file GctFormatTranslateV35.h.

const GctFormatTranslateV35::BlkToRctCrateMap GctFormatTranslateV35::m_rctJetCrate
staticprivate
Initial value:
= {
{0x900,9},
{0x908,10},
{0x988,17},
{0xa00,12},
{0xa08,13},
{0xa88,11},
{0xb00,15},
{0xb08,16},
{0xb88,14},
{0xd00,0},
{0xd08,1},
{0xd88,8},
{0xe00,3},
{0xe08,4},
{0xe88,2},
{0xf00,6},
{0xf08,7},
{0xf88,5}
}

Map to relate capture block ID to the RCT crate the data originated from (for jets).

Definition at line 90 of file GctFormatTranslateV35.h.