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 | Private Attributes | Static Private Attributes
GctFormatTranslateV38 Class Reference

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

#include <GctFormatTranslateV38.h>

Inheritance diagram for GctFormatTranslateV38:
GctFormatTranslateBase

Public Member Functions

virtual bool convertBlock (const unsigned char *d, const GctBlockHeader &hdr)
 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...
 
virtual GctBlockHeader generateBlockHeader (const unsigned char *data) const
 Generate a block header from four 8-bit values. More...
 
virtual ~GctFormatTranslateV38 ()
 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 BlockLengthMapblockLengthMap ()
 get the static block ID to block-length map. More...
 
virtual const BlockLengthMapblockLengthMap () const
 get the static block ID to block-length map. More...
 
virtual BlockNameMapblockNameMap ()
 get the static block ID to block-name map. More...
 
virtual const BlockNameMapblockNameMap () const
 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
 Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs. More...
 
virtual
BlockIdToEmCandIsoBoundMap
internEmIsoBounds ()
 get the static intern EM cand isolated boundary map. More...
 
virtual const
BlockIdToEmCandIsoBoundMap
internEmIsoBounds () const
 get the static intern EM cand isolated boundary map. More...
 
virtual BlkToRctCrateMaprctEmCrateMap ()
 get the static block ID to RCT crate map for electrons. More...
 
virtual const BlkToRctCrateMaprctEmCrateMap () const
 get static the block ID to RCT crate map for electrons. More...
 
virtual BlkToRctCrateMaprctJetCrateMap ()
 get the static block ID to RCT crate map for jets More...
 
virtual const BlkToRctCrateMaprctJetCrateMap () const
 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(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 BlockLengthMap m_blockLength = GctFormatTranslateV38::BlockLengthMap()
 Map to translate block number to fundamental size of a block (i.e. for 1 time-sample). More...
 
static BlockNameMap m_blockName = GctFormatTranslateV38::BlockNameMap()
 Map to hold a description for each block number. More...
 
static BlockIdToUnpackFnMap m_blockUnpackFn = GctFormatTranslateV38::BlockIdToUnpackFnMap()
 Block ID to unpack function map. More...
 
static BlockIdToEmCandIsoBoundMap m_internEmIsoBounds = GctFormatTranslateV38::BlockIdToEmCandIsoBoundMap()
 
static BlkToRctCrateMap m_rctEmCrate = GctFormatTranslateV38::BlkToRctCrateMap()
 Map to relate capture block ID to the RCT crate the data originated from (for electrons). More...
 
static BlkToRctCrateMap m_rctJetCrate = GctFormatTranslateV38::BlkToRctCrateMap()
 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 V38 raw format.

Author
Robert Frazier
Revision:
1.4
Date:
2009/11/16 20:57:13

Definition at line 19 of file GctFormatTranslateV38.h.

Member Typedef Documentation

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

Typedef for a block ID to unpack function map.

Definition at line 85 of file GctFormatTranslateV38.h.

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

Function pointer typdef to a block unpack function.

Definition at line 83 of file GctFormatTranslateV38.h.

Constructor & Destructor Documentation

GctFormatTranslateV38::GctFormatTranslateV38 ( bool  hltMode = false,
bool  unpackSharedRegions = false,
unsigned  numberOfGctSamplesToUnpack = 1,
unsigned  numberOfRctSamplesToUnpack = 1 
)
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 29 of file GctFormatTranslateV38.cc.

References GctFormatTranslateBase::blockDoNothing(), blockToFibres(), blockToFibresAndToRctEmCand(), blockToGctEmCandsAndEnergySums(), blockToGctInternEmCand(), blockToGctInternEtSums(), blockToGctInternEtSumsAndJetCluster(), blockToGctInternHtMissPostWheel(), blockToGctInternHtMissPreWheel(), blockToGctInternRingSums(), blockToGctJetCandsAndCounts(), blockToGctJetClusterMinimal(), blockToGctJetPreCluster(), blockToGctTrigObjects(), blockToGctWheelInputInternEtAndRingSums(), blockToGctWheelOutputInternEtAndRingSums(), blockToRctCaloRegions(), m_blockLength, m_blockName, m_blockUnpackFn, m_internEmIsoBounds, m_rctEmCrate, and m_rctJetCrate.

31  :
33  m_numberOfGctSamplesToUnpack(numberOfGctSamplesToUnpack),
34  m_numberOfRctSamplesToUnpack(numberOfRctSamplesToUnpack)
35 {
36  static bool initClass = true;
37 
38  if(initClass)
39  {
40  initClass = false;
41 
42  /*** Setup BlockID to BlockLength Map ***/
43  // Miscellaneous Blocks
44  m_blockLength.insert(make_pair(0x000,0)); // NULL
45  // ConcJet FPGA
46  m_blockLength.insert(make_pair(0x580,12)); // ConcJet: Input TrigPathA (Jet Cands)
47  m_blockLength.insert(make_pair(0x581,2)); // ConcJet: Input TrigPathB (HF Rings)
48  m_blockLength.insert(make_pair(0x582,4)); // ConcJet: Input TrigPathC (MissHt)
49  m_blockLength.insert(make_pair(0x583,8)); // ConcJet: Jet Cands and Counts Output to GT
50  m_blockLength.insert(make_pair(0x587,4)); // ConcJet: BX & Orbit Info
51  // ConcElec FPGA
52  m_blockLength.insert(make_pair(0x680,16)); // ConcElec: Input TrigPathA (EM Cands)
53  m_blockLength.insert(make_pair(0x681,6)); // ConcElec: Input TrigPathB (Et Sums)
54  m_blockLength.insert(make_pair(0x682,2)); // ConcElec: Input TrigPathC (Ht Sums)
55  m_blockLength.insert(make_pair(0x683,6)); // ConcElec: EM Cands and Energy Sums Output to GT
56  m_blockLength.insert(make_pair(0x686,2)); // ConcElec: Test (GT Serdes Loopback)
57  m_blockLength.insert(make_pair(0x687,4)); // ConcElec: BX & Orbit Info
58  // Electron Leaf FPGAs
59  m_blockLength.insert(make_pair(0x800,20)); // Leaf0ElecPosEtaU1: Sort Input
60  m_blockLength.insert(make_pair(0x803,4)); // Leaf0ElecPosEtaU1: Sort Output
61  m_blockLength.insert(make_pair(0x804,15)); // Leaf0ElecPosEtaU1: Raw Input
62  m_blockLength.insert(make_pair(0x880,16)); // Leaf0ElecPosEtaU2: Sort Input
63  m_blockLength.insert(make_pair(0x883,4)); // Leaf0ElecPosEtaU2: Sort Output
64  m_blockLength.insert(make_pair(0x884,12)); // Leaf0ElecPosEtaU2: Raw Input
65  m_blockLength.insert(make_pair(0xc00,20)); // Leaf0ElecNegEtaU1: Sort Input
66  m_blockLength.insert(make_pair(0xc03,4)); // Leaf0ElecNegEtaU1: Sort Output
67  m_blockLength.insert(make_pair(0xc04,15)); // Leaf0ElecNegEtaU1: Raw Input
68  m_blockLength.insert(make_pair(0xc80,16)); // Leaf0ElecNegEtaU2: Sort Input
69  m_blockLength.insert(make_pair(0xc83,4)); // Leaf0ElecNegEtaU2: Sort Output
70  m_blockLength.insert(make_pair(0xc84,12)); // Leaf0ElecNegEtaU2: Raw Input
71  // Wheel Pos-eta Jet FPGA
72  m_blockLength.insert(make_pair(0x300,27)); // WheelPosEtaJet: Input TrigPathA (Jet Sort)
73  m_blockLength.insert(make_pair(0x301,3)); // WheelPosEtaJet: Input TrigPathB (MissHt)
74  m_blockLength.insert(make_pair(0x303,6)); // WheelPosEtaJet: Output TrigPathA (Jet Sort)
75  m_blockLength.insert(make_pair(0x305,2)); // WheelPosEtaJet: Output TrigPathB (MissHt)
76  m_blockLength.insert(make_pair(0x306,32)); // WheelPosEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
77  m_blockLength.insert(make_pair(0x307,4)); // WheelPosEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
78  // Wheel Pos-eta Energy FPGA
79  m_blockLength.insert(make_pair(0x380,21)); // WheelPosEtaEnergy: Input TrigPathA (Et)
80  m_blockLength.insert(make_pair(0x381,6)); // WheelPosEtaEnergy: Input TrigPathB (Ht)
81  m_blockLength.insert(make_pair(0x383,7)); // WheelPosEtaEnergy: Output TrigPathA (Et)
82  m_blockLength.insert(make_pair(0x385,2)); // WheelPosEtaEnergy: Output TrigPathB (Ht)
83  m_blockLength.insert(make_pair(0x386,32)); // WheelPosEtaEnergy: Test
84  m_blockLength.insert(make_pair(0x387,6)); // WheelPosEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
85  // Wheel Neg-eta Jet FPGA
86  m_blockLength.insert(make_pair(0x700,27)); // WheelNegEtaJet: Input TrigPathA (Jet Sort)
87  m_blockLength.insert(make_pair(0x701,3)); // WheelNegEtaJet: Input TrigPathB (MissHt)
88  m_blockLength.insert(make_pair(0x703,6)); // WheelNegEtaJet: Output TrigPathA (Jet Sort)
89  m_blockLength.insert(make_pair(0x705,2)); // WheelNegEtaJet: Output TrigPathB (MissHt)
90  m_blockLength.insert(make_pair(0x706,32)); // WheelNegEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
91  m_blockLength.insert(make_pair(0x707,4)); // WheelNegEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
92  // Wheel Neg-eta Energy FPGA
93  m_blockLength.insert(make_pair(0x780,21)); // WheelNegEtaEnergy: Input TrigPathA (Et)
94  m_blockLength.insert(make_pair(0x781,6)); // WheelNegEtaEnergy: Input TrigPathB (Ht)
95  m_blockLength.insert(make_pair(0x783,7)); // WheelNegEtaEnergy: Output TrigPathA (Et)
96  m_blockLength.insert(make_pair(0x785,2)); // WheelNegEtaEnergy: Output TrigPathB (Ht)
97  m_blockLength.insert(make_pair(0x786,32)); // WheelNegEtaEnergy: Test
98  m_blockLength.insert(make_pair(0x787,6)); // WheelNegEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
99  // Jet Leaf FPGAs - Positive Eta
100  m_blockLength.insert(make_pair(0x900,13)); // Leaf1JetPosEtaU1: JF2 Input
101  m_blockLength.insert(make_pair(0x901,3)); // Leaf1JetPosEtaU1: JF2 Shared Received
102  m_blockLength.insert(make_pair(0x902,3)); // Leaf1JetPosEtaU1: JF2 Shared Sent
103  m_blockLength.insert(make_pair(0x903,10)); // Leaf1JetPosEtaU1: JF2 Output
104  m_blockLength.insert(make_pair(0x904,8)); // Leaf1JetPosEtaU1: JF2 Raw Input
105  m_blockLength.insert(make_pair(0x908,13)); // Leaf1JetPosEtaU1: JF3 Input
106  m_blockLength.insert(make_pair(0x909,3)); // Leaf1JetPosEtaU1: JF3 Shared Received
107  m_blockLength.insert(make_pair(0x90a,3)); // Leaf1JetPosEtaU1: JF3 Shared Sent
108  m_blockLength.insert(make_pair(0x90b,10)); // Leaf1JetPosEtaU1: JF3 Output
109  m_blockLength.insert(make_pair(0x90c,8)); // Leaf1JetPosEtaU1: JF3 Raw Input
110  m_blockLength.insert(make_pair(0x980,6)); // Leaf1JetPosEtaU2: Eta0 Input
111  m_blockLength.insert(make_pair(0x984,6)); // Leaf1JetPosEtaU2: Eta0 Raw Input
112  m_blockLength.insert(make_pair(0x988,13)); // Leaf1JetPosEtaU2: JF1 Input
113  m_blockLength.insert(make_pair(0x989,3)); // Leaf1JetPosEtaU2: JF1 Shared Received
114  m_blockLength.insert(make_pair(0x98a,3)); // Leaf1JetPosEtaU2: JF1 Shared Sent
115  m_blockLength.insert(make_pair(0x98b,10)); // Leaf1JetPosEtaU2: JF1 Output
116  m_blockLength.insert(make_pair(0x98c,8)); // Leaf1JetPosEtaU2: JF1 Raw Input
117  m_blockLength.insert(make_pair(0xa00,13)); // Leaf2JetPosEtaU1: JF2 Input
118  m_blockLength.insert(make_pair(0xa01,3)); // Leaf2JetPosEtaU1: JF2 Shared Received
119  m_blockLength.insert(make_pair(0xa02,3)); // Leaf2JetPosEtaU1: JF2 Shared Sent
120  m_blockLength.insert(make_pair(0xa03,10)); // Leaf2JetPosEtaU1: JF2 Output
121  m_blockLength.insert(make_pair(0xa04,8)); // Leaf2JetPosEtaU1: JF2 Raw Input
122  m_blockLength.insert(make_pair(0xa08,13)); // Leaf2JetPosEtaU1: JF3 Input
123  m_blockLength.insert(make_pair(0xa09,3)); // Leaf2JetPosEtaU1: JF3 Shared Received
124  m_blockLength.insert(make_pair(0xa0a,3)); // Leaf2JetPosEtaU1: JF3 Shared Sent
125  m_blockLength.insert(make_pair(0xa0b,10)); // Leaf2JetPosEtaU1: JF3 Output
126  m_blockLength.insert(make_pair(0xa0c,8)); // Leaf2JetPosEtaU1: JF3 Raw Input
127  m_blockLength.insert(make_pair(0xa80,6)); // Leaf2JetPosEtaU2: Eta0 Input
128  m_blockLength.insert(make_pair(0xa84,6)); // Leaf2JetPosEtaU2: Eta0 Raw Input
129  m_blockLength.insert(make_pair(0xa88,13)); // Leaf2JetPosEtaU2: JF1 Input
130  m_blockLength.insert(make_pair(0xa89,3)); // Leaf2JetPosEtaU2: JF1 Shared Received
131  m_blockLength.insert(make_pair(0xa8a,3)); // Leaf2JetPosEtaU2: JF1 Shared Sent
132  m_blockLength.insert(make_pair(0xa8b,10)); // Leaf2JetPosEtaU2: JF1 Output
133  m_blockLength.insert(make_pair(0xa8c,8)); // Leaf2JetPosEtaU2: JF1 Raw Input
134  m_blockLength.insert(make_pair(0xb00,13)); // Leaf3JetPosEtaU1: JF2 Input
135  m_blockLength.insert(make_pair(0xb01,3)); // Leaf3JetPosEtaU1: JF2 Shared Received
136  m_blockLength.insert(make_pair(0xb02,3)); // Leaf3JetPosEtaU1: JF2 Shared Sent
137  m_blockLength.insert(make_pair(0xb03,10)); // Leaf3JetPosEtaU1: JF2 Output
138  m_blockLength.insert(make_pair(0xb04,8)); // Leaf3JetPosEtaU1: JF2 Raw Input
139  m_blockLength.insert(make_pair(0xb08,13)); // Leaf3JetPosEtaU1: JF3 Input
140  m_blockLength.insert(make_pair(0xb09,3)); // Leaf3JetPosEtaU1: JF3 Shared Received
141  m_blockLength.insert(make_pair(0xb0a,3)); // Leaf3JetPosEtaU1: JF3 Shared Sent
142  m_blockLength.insert(make_pair(0xb0b,10)); // Leaf3JetPosEtaU1: JF3 Output
143  m_blockLength.insert(make_pair(0xb0c,8)); // Leaf3JetPosEtaU1: JF3 Raw Input
144  m_blockLength.insert(make_pair(0xb80,6)); // Leaf3JetPosEtaU2: Eta0 Input
145  m_blockLength.insert(make_pair(0xb84,6)); // Leaf3JetPosEtaU2: Eta0 Raw Input
146  m_blockLength.insert(make_pair(0xb88,13)); // Leaf3JetPosEtaU2: JF1 Input
147  m_blockLength.insert(make_pair(0xb89,3)); // Leaf3JetPosEtaU2: JF1 Shared Received
148  m_blockLength.insert(make_pair(0xb8a,3)); // Leaf3JetPosEtaU2: JF1 Shared Sent
149  m_blockLength.insert(make_pair(0xb8b,10)); // Leaf3JetPosEtaU2: JF1 Output
150  m_blockLength.insert(make_pair(0xb8c,8)); // Leaf3JetPosEtaU2: JF1 Raw Input
151  // Jet Leaf FPGAs - Negative Eta
152  m_blockLength.insert(make_pair(0xd00,13)); // Leaf1JetNegEtaU1: JF2 Input
153  m_blockLength.insert(make_pair(0xd01,3)); // Leaf1JetNegEtaU1: JF2 Shared Received
154  m_blockLength.insert(make_pair(0xd02,3)); // Leaf1JetNegEtaU1: JF2 Shared Sent
155  m_blockLength.insert(make_pair(0xd03,10)); // Leaf1JetNegEtaU1: JF2 Output
156  m_blockLength.insert(make_pair(0xd04,8)); // Leaf1JetNegEtaU1: JF2 Raw Input
157  m_blockLength.insert(make_pair(0xd08,13)); // Leaf1JetNegEtaU1: JF3 Input
158  m_blockLength.insert(make_pair(0xd09,3)); // Leaf1JetNegEtaU1: JF3 Shared Received
159  m_blockLength.insert(make_pair(0xd0a,3)); // Leaf1JetNegEtaU1: JF3 Shared Sent
160  m_blockLength.insert(make_pair(0xd0b,10)); // Leaf1JetNegEtaU1: JF3 Output
161  m_blockLength.insert(make_pair(0xd0c,8)); // Leaf1JetNegEtaU1: JF3 Raw Input
162  m_blockLength.insert(make_pair(0xd80,6)); // Leaf1JetNegEtaU2: Eta0 Input
163  m_blockLength.insert(make_pair(0xd84,6)); // Leaf1JetNegEtaU2: Eta0 Raw Input
164  m_blockLength.insert(make_pair(0xd88,13)); // Leaf1JetNegEtaU2: JF1 Input
165  m_blockLength.insert(make_pair(0xd89,3)); // Leaf1JetNegEtaU2: JF1 Shared Received
166  m_blockLength.insert(make_pair(0xd8a,3)); // Leaf1JetNegEtaU2: JF1 Shared Sent
167  m_blockLength.insert(make_pair(0xd8b,10)); // Leaf1JetNegEtaU2: JF1 Output
168  m_blockLength.insert(make_pair(0xd8c,8)); // Leaf1JetNegEtaU2: JF1 Raw Input
169  m_blockLength.insert(make_pair(0xe00,13)); // Leaf2JetNegEtaU1: JF2 Input
170  m_blockLength.insert(make_pair(0xe01,3)); // Leaf2JetNegEtaU1: JF2 Shared Received
171  m_blockLength.insert(make_pair(0xe02,3)); // Leaf2JetNegEtaU1: JF2 Shared Sent
172  m_blockLength.insert(make_pair(0xe03,10)); // Leaf2JetNegEtaU1: JF2 Output
173  m_blockLength.insert(make_pair(0xe04,8)); // Leaf2JetNegEtaU1: JF2 Raw Input
174  m_blockLength.insert(make_pair(0xe08,13)); // Leaf2JetNegEtaU1: JF3 Input
175  m_blockLength.insert(make_pair(0xe09,3)); // Leaf2JetNegEtaU1: JF3 Shared Received
176  m_blockLength.insert(make_pair(0xe0a,3)); // Leaf2JetNegEtaU1: JF3 Shared Sent
177  m_blockLength.insert(make_pair(0xe0b,10)); // Leaf2JetNegEtaU1: JF3 Output
178  m_blockLength.insert(make_pair(0xe0c,8)); // Leaf2JetNegEtaU1: JF3 Raw Input
179  m_blockLength.insert(make_pair(0xe80,6)); // Leaf2JetNegEtaU2: Eta0 Input
180  m_blockLength.insert(make_pair(0xe84,6)); // Leaf2JetNegEtaU2: Eta0 Raw Input
181  m_blockLength.insert(make_pair(0xe88,13)); // Leaf2JetNegEtaU2: JF1 Input
182  m_blockLength.insert(make_pair(0xe89,3)); // Leaf2JetNegEtaU2: JF1 Shared Received
183  m_blockLength.insert(make_pair(0xe8a,3)); // Leaf2JetNegEtaU2: JF1 Shared Sent
184  m_blockLength.insert(make_pair(0xe8b,10)); // Leaf2JetNegEtaU2: JF1 Output
185  m_blockLength.insert(make_pair(0xe8c,8)); // Leaf2JetNegEtaU2: JF1 Raw Input
186  m_blockLength.insert(make_pair(0xf00,13)); // Leaf3JetNegEtaU1: JF2 Input
187  m_blockLength.insert(make_pair(0xf01,3)); // Leaf3JetNegEtaU1: JF2 Shared Received
188  m_blockLength.insert(make_pair(0xf02,3)); // Leaf3JetNegEtaU1: JF2 Shared Sent
189  m_blockLength.insert(make_pair(0xf03,10)); // Leaf3JetNegEtaU1: JF2 Output
190  m_blockLength.insert(make_pair(0xf04,8)); // Leaf3JetNegEtaU1: JF2 Raw Input
191  m_blockLength.insert(make_pair(0xf08,13)); // Leaf3JetNegEtaU1: JF3 Input
192  m_blockLength.insert(make_pair(0xf09,3)); // Leaf3JetNegEtaU1: JF3 Shared Received
193  m_blockLength.insert(make_pair(0xf0a,3)); // Leaf3JetNegEtaU1: JF3 Shared Sent
194  m_blockLength.insert(make_pair(0xf0b,10)); // Leaf3JetNegEtaU1: JF3 Output
195  m_blockLength.insert(make_pair(0xf0c,8)); // Leaf3JetNegEtaU1: JF3 Raw Input
196  m_blockLength.insert(make_pair(0xf80,6)); // Leaf3JetNegEtaU2: Eta0 Input
197  m_blockLength.insert(make_pair(0xf84,6)); // Leaf3JetNegEtaU2: Eta0 Raw Input
198  m_blockLength.insert(make_pair(0xf88,13)); // Leaf3JetNegEtaU2: JF1 Input
199  m_blockLength.insert(make_pair(0xf89,3)); // Leaf3JetNegEtaU2: JF1 Shared Received
200  m_blockLength.insert(make_pair(0xf8a,3)); // Leaf3JetNegEtaU2: JF1 Shared Sent
201  m_blockLength.insert(make_pair(0xf8b,10)); // Leaf3JetNegEtaU2: JF1 Output
202  m_blockLength.insert(make_pair(0xf8c,8)); // Leaf3JetNegEtaU2: JF1 Raw Input
203 
204 
205  /*** Setup BlockID to BlockName Map ***/
206  // Miscellaneous Blocks
207  m_blockName.insert(make_pair(0x000,"NULL"));
208  // ConcJet FPGA
209  m_blockName.insert(make_pair(0x580,"ConcJet: Input TrigPathA (Jet Cands)"));
210  m_blockName.insert(make_pair(0x581,"ConcJet: Input TrigPathB (HF Rings)"));
211  m_blockName.insert(make_pair(0x582,"ConcJet: Input TrigPathC (MissHt)"));
212  m_blockName.insert(make_pair(0x583,"ConcJet: Jet Cands and Counts Output to GT"));
213  m_blockName.insert(make_pair(0x587,"ConcJet: BX & Orbit Info"));
214  // ConcElec FPGA
215  m_blockName.insert(make_pair(0x680,"ConcElec: Input TrigPathA (EM Cands)"));
216  m_blockName.insert(make_pair(0x681,"ConcElec: Input TrigPathB (Et Sums)"));
217  m_blockName.insert(make_pair(0x682,"ConcElec: Input TrigPathC (Ht Sums)"));
218  m_blockName.insert(make_pair(0x683,"ConcElec: EM Cands and Energy Sums Output to GT"));
219  m_blockName.insert(make_pair(0x686,"ConcElec: Test (GT Serdes Loopback)"));
220  m_blockName.insert(make_pair(0x687,"ConcElec: BX & Orbit Info"));
221  // Electron Leaf FPGAs
222  m_blockName.insert(make_pair(0x800,"Leaf0ElecPosEtaU1: Sort Input"));
223  m_blockName.insert(make_pair(0x803,"Leaf0ElecPosEtaU1: Sort Output"));
224  m_blockName.insert(make_pair(0x804,"Leaf0ElecPosEtaU1: Raw Input"));
225  m_blockName.insert(make_pair(0x880,"Leaf0ElecPosEtaU2: Sort Input"));
226  m_blockName.insert(make_pair(0x883,"Leaf0ElecPosEtaU2: Sort Output"));
227  m_blockName.insert(make_pair(0x884,"Leaf0ElecPosEtaU2: Raw Input"));
228  m_blockName.insert(make_pair(0xc00,"Leaf0ElecNegEtaU1: Sort Input"));
229  m_blockName.insert(make_pair(0xc03,"Leaf0ElecNegEtaU1: Sort Output"));
230  m_blockName.insert(make_pair(0xc04,"Leaf0ElecNegEtaU1: Raw Input"));
231  m_blockName.insert(make_pair(0xc80,"Leaf0ElecNegEtaU2: Sort Input"));
232  m_blockName.insert(make_pair(0xc83,"Leaf0ElecNegEtaU2: Sort Output"));
233  m_blockName.insert(make_pair(0xc84,"Leaf0ElecNegEtaU2: Raw Input"));
234  // Wheel Pos-eta Jet FPGA
235  m_blockName.insert(make_pair(0x300,"WheelPosEtaJet: Input TrigPathA (Jet Sort)"));
236  m_blockName.insert(make_pair(0x301,"WheelPosEtaJet: Input TrigPathB (MissHt)"));
237  m_blockName.insert(make_pair(0x303,"WheelPosEtaJet: Output TrigPathA (Jet Sort)"));
238  m_blockName.insert(make_pair(0x305,"WheelPosEtaJet: Output TrigPathB (MissHt)"));
239  m_blockName.insert(make_pair(0x306,"WheelPosEtaJet: Test (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
240  m_blockName.insert(make_pair(0x307,"WheelPosEtaJet: Info (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
241  // Wheel Pos-eta Energy FPGA
242  m_blockName.insert(make_pair(0x380,"WheelPosEtaEnergy: Input TrigPathA (Et)"));
243  m_blockName.insert(make_pair(0x381,"WheelPosEtaEnergy: Input TrigPathB (Ht)"));
244  m_blockName.insert(make_pair(0x383,"WheelPosEtaEnergy: Output TrigPathA (Et)"));
245  m_blockName.insert(make_pair(0x385,"WheelPosEtaEnergy: Output TrigPathB (Ht)"));
246  m_blockName.insert(make_pair(0x386,"WheelPosEtaEnergy: Test"));
247  m_blockName.insert(make_pair(0x387,"WheelPosEtaEnergy: BX & Orbit Info"));
248  // Wheel Neg-eta Jet FPGA
249  m_blockName.insert(make_pair(0x700,"WheelNegEtaJet: Input TrigPathA (Jet Sort)"));
250  m_blockName.insert(make_pair(0x701,"WheelNegEtaJet: Input TrigPathB (MissHt)"));
251  m_blockName.insert(make_pair(0x703,"WheelNegEtaJet: Output TrigPathA (Jet Sort)"));
252  m_blockName.insert(make_pair(0x705,"WheelNegEtaJet: Output TrigPathB (MissHt)"));
253  m_blockName.insert(make_pair(0x706,"WheelNegEtaJet: Test (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
254  m_blockName.insert(make_pair(0x707,"WheelNegEtaJet: Info (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
255  // Wheel Neg-eta Energy FPGA
256  m_blockName.insert(make_pair(0x780,"WheelNegEtaEnergy: Input TrigPathA (Et)"));
257  m_blockName.insert(make_pair(0x781,"WheelNegEtaEnergy: Input TrigPathB (Ht)"));
258  m_blockName.insert(make_pair(0x783,"WheelNegEtaEnergy: Output TrigPathA (Et)"));
259  m_blockName.insert(make_pair(0x785,"WheelNegEtaEnergy: Output TrigPathB (Ht)"));
260  m_blockName.insert(make_pair(0x786,"WheelNegEtaEnergy: Test"));
261  m_blockName.insert(make_pair(0x787,"WheelNegEtaEnergy: BX & Orbit Info"));
262  // Jet Leaf FPGAs - Positive Eta
263  m_blockName.insert(make_pair(0x900,"Leaf1JetPosEtaU1: JF2 Input"));
264  m_blockName.insert(make_pair(0x901,"Leaf1JetPosEtaU1: JF2 Shared Received"));
265  m_blockName.insert(make_pair(0x902,"Leaf1JetPosEtaU1: JF2 Shared Sent"));
266  m_blockName.insert(make_pair(0x903,"Leaf1JetPosEtaU1: JF2 Output"));
267  m_blockName.insert(make_pair(0x904,"Leaf1JetPosEtaU1: JF2 Raw Input"));
268  m_blockName.insert(make_pair(0x908,"Leaf1JetPosEtaU1: JF3 Input"));
269  m_blockName.insert(make_pair(0x909,"Leaf1JetPosEtaU1: JF3 Shared Received"));
270  m_blockName.insert(make_pair(0x90a,"Leaf1JetPosEtaU1: JF3 Shared Sent"));
271  m_blockName.insert(make_pair(0x90b,"Leaf1JetPosEtaU1: JF3 Output"));
272  m_blockName.insert(make_pair(0x90c,"Leaf1JetPosEtaU1: JF3 Raw Input"));
273  m_blockName.insert(make_pair(0x980,"Leaf1JetPosEtaU2: Eta0 Input")); // Next Leaf Start
274  m_blockName.insert(make_pair(0x984,"Leaf1JetPosEtaU2: Eta0 Raw Input"));
275  m_blockName.insert(make_pair(0x988,"Leaf1JetPosEtaU2: JF1 Input"));
276  m_blockName.insert(make_pair(0x989,"Leaf1JetPosEtaU2: JF1 Shared Received"));
277  m_blockName.insert(make_pair(0x98a,"Leaf1JetPosEtaU2: JF1 Shared Sent"));
278  m_blockName.insert(make_pair(0x98b,"Leaf1JetPosEtaU2: JF1 Output"));
279  m_blockName.insert(make_pair(0x98c,"Leaf1JetPosEtaU2: JF1 Raw Input"));
280  m_blockName.insert(make_pair(0xa00,"Leaf2JetPosEtaU1: JF2 Input")); // Next Leaf Start
281  m_blockName.insert(make_pair(0xa01,"Leaf2JetPosEtaU1: JF2 Shared Received"));
282  m_blockName.insert(make_pair(0xa02,"Leaf2JetPosEtaU1: JF2 Shared Sent"));
283  m_blockName.insert(make_pair(0xa03,"Leaf2JetPosEtaU1: JF2 Output"));
284  m_blockName.insert(make_pair(0xa04,"Leaf2JetPosEtaU1: JF2 Raw Input"));
285  m_blockName.insert(make_pair(0xa08,"Leaf2JetPosEtaU1: JF3 Input"));
286  m_blockName.insert(make_pair(0xa09,"Leaf2JetPosEtaU1: JF3 Shared Received"));
287  m_blockName.insert(make_pair(0xa0a,"Leaf2JetPosEtaU1: JF3 Shared Sent"));
288  m_blockName.insert(make_pair(0xa0b,"Leaf2JetPosEtaU1: JF3 Output"));
289  m_blockName.insert(make_pair(0xa0c,"Leaf2JetPosEtaU1: JF3 Raw Input"));
290  m_blockName.insert(make_pair(0xa80,"Leaf2JetPosEtaU2: Eta0 Input")); // Next Leaf Start
291  m_blockName.insert(make_pair(0xa84,"Leaf2JetPosEtaU2: Eta0 Raw Input"));
292  m_blockName.insert(make_pair(0xa88,"Leaf2JetPosEtaU2: JF1 Input"));
293  m_blockName.insert(make_pair(0xa89,"Leaf2JetPosEtaU2: JF1 Shared Received"));
294  m_blockName.insert(make_pair(0xa8a,"Leaf2JetPosEtaU2: JF1 Shared Sent"));
295  m_blockName.insert(make_pair(0xa8b,"Leaf2JetPosEtaU2: JF1 Output"));
296  m_blockName.insert(make_pair(0xa8c,"Leaf2JetPosEtaU2: JF1 Raw Input"));
297  m_blockName.insert(make_pair(0xb00,"Leaf3JetPosEtaU1: JF2 Input")); // Next Leaf Start
298  m_blockName.insert(make_pair(0xb01,"Leaf3JetPosEtaU1: JF2 Shared Received"));
299  m_blockName.insert(make_pair(0xb02,"Leaf3JetPosEtaU1: JF2 Shared Sent"));
300  m_blockName.insert(make_pair(0xb03,"Leaf3JetPosEtaU1: JF2 Output"));
301  m_blockName.insert(make_pair(0xb04,"Leaf3JetPosEtaU1: JF2 Raw Input"));
302  m_blockName.insert(make_pair(0xb08,"Leaf3JetPosEtaU1: JF3 Input"));
303  m_blockName.insert(make_pair(0xb09,"Leaf3JetPosEtaU1: JF3 Shared Received"));
304  m_blockName.insert(make_pair(0xb0a,"Leaf3JetPosEtaU1: JF3 Shared Sent"));
305  m_blockName.insert(make_pair(0xb0b,"Leaf3JetPosEtaU1: JF3 Output"));
306  m_blockName.insert(make_pair(0xb0c,"Leaf3JetPosEtaU1: JF3 Raw Input"));
307  m_blockName.insert(make_pair(0xb80,"Leaf3JetPosEtaU2: Eta0 Input")); // Next Leaf Start
308  m_blockName.insert(make_pair(0xb84,"Leaf3JetPosEtaU2: Eta0 Raw Input"));
309  m_blockName.insert(make_pair(0xb88,"Leaf3JetPosEtaU2: JF1 Input"));
310  m_blockName.insert(make_pair(0xb89,"Leaf3JetPosEtaU2: JF1 Shared Received"));
311  m_blockName.insert(make_pair(0xb8a,"Leaf3JetPosEtaU2: JF1 Shared Sent"));
312  m_blockName.insert(make_pair(0xb8b,"Leaf3JetPosEtaU2: JF1 Output"));
313  m_blockName.insert(make_pair(0xb8c,"Leaf3JetPosEtaU2: JF1 Raw Input"));
314  // Jet Leaf FPGAs - Negative Eta
315  m_blockName.insert(make_pair(0xd00,"Leaf1JetNegEtaU1: JF2 Input")); // START OF NEG ETA JET LEAVES
316  m_blockName.insert(make_pair(0xd01,"Leaf1JetNegEtaU1: JF2 Shared Received"));
317  m_blockName.insert(make_pair(0xd02,"Leaf1JetNegEtaU1: JF2 Shared Sent"));
318  m_blockName.insert(make_pair(0xd03,"Leaf1JetNegEtaU1: JF2 Output"));
319  m_blockName.insert(make_pair(0xd04,"Leaf1JetNegEtaU1: JF2 Raw Input"));
320  m_blockName.insert(make_pair(0xd08,"Leaf1JetNegEtaU1: JF3 Input"));
321  m_blockName.insert(make_pair(0xd09,"Leaf1JetNegEtaU1: JF3 Shared Received"));
322  m_blockName.insert(make_pair(0xd0a,"Leaf1JetNegEtaU1: JF3 Shared Sent"));
323  m_blockName.insert(make_pair(0xd0b,"Leaf1JetNegEtaU1: JF3 Output"));
324  m_blockName.insert(make_pair(0xd0c,"Leaf1JetNegEtaU1: JF3 Raw Input"));
325  m_blockName.insert(make_pair(0xd80,"Leaf1JetNegEtaU2: Eta0 Input")); // Next Leaf Start
326  m_blockName.insert(make_pair(0xd84,"Leaf1JetNegEtaU2: Eta0 Raw Input"));
327  m_blockName.insert(make_pair(0xd88,"Leaf1JetNegEtaU2: JF1 Input"));
328  m_blockName.insert(make_pair(0xd89,"Leaf1JetNegEtaU2: JF1 Shared Received"));
329  m_blockName.insert(make_pair(0xd8a,"Leaf1JetNegEtaU2: JF1 Shared Sent"));
330  m_blockName.insert(make_pair(0xd8b,"Leaf1JetNegEtaU2: JF1 Output"));
331  m_blockName.insert(make_pair(0xd8c,"Leaf1JetNegEtaU2: JF1 Raw Input"));
332  m_blockName.insert(make_pair(0xe00,"Leaf2JetNegEtaU1: JF2 Input")); // Next Leaf Start
333  m_blockName.insert(make_pair(0xe01,"Leaf2JetNegEtaU1: JF2 Shared Received"));
334  m_blockName.insert(make_pair(0xe02,"Leaf2JetNegEtaU1: JF2 Shared Sent"));
335  m_blockName.insert(make_pair(0xe03,"Leaf2JetNegEtaU1: JF2 Output"));
336  m_blockName.insert(make_pair(0xe04,"Leaf2JetNegEtaU1: JF2 Raw Input"));
337  m_blockName.insert(make_pair(0xe08,"Leaf2JetNegEtaU1: JF3 Input"));
338  m_blockName.insert(make_pair(0xe09,"Leaf2JetNegEtaU1: JF3 Shared Received"));
339  m_blockName.insert(make_pair(0xe0a,"Leaf2JetNegEtaU1: JF3 Shared Sent"));
340  m_blockName.insert(make_pair(0xe0b,"Leaf2JetNegEtaU1: JF3 Output"));
341  m_blockName.insert(make_pair(0xe0c,"Leaf2JetNegEtaU1: JF3 Raw Input"));
342  m_blockName.insert(make_pair(0xe80,"Leaf2JetNegEtaU2: Eta0 Input")); // Next Leaf Start
343  m_blockName.insert(make_pair(0xe84,"Leaf2JetNegEtaU2: Eta0 Raw Input"));
344  m_blockName.insert(make_pair(0xe88,"Leaf2JetNegEtaU2: JF1 Input"));
345  m_blockName.insert(make_pair(0xe89,"Leaf2JetNegEtaU2: JF1 Shared Received"));
346  m_blockName.insert(make_pair(0xe8a,"Leaf2JetNegEtaU2: JF1 Shared Sent"));
347  m_blockName.insert(make_pair(0xe8b,"Leaf2JetNegEtaU2: JF1 Output"));
348  m_blockName.insert(make_pair(0xe8c,"Leaf2JetNegEtaU2: JF1 Raw Input"));
349  m_blockName.insert(make_pair(0xf00,"Leaf3JetNegEtaU1: JF2 Input")); // Next Leaf Start
350  m_blockName.insert(make_pair(0xf01,"Leaf3JetNegEtaU1: JF2 Shared Received"));
351  m_blockName.insert(make_pair(0xf02,"Leaf3JetNegEtaU1: JF2 Shared Sent"));
352  m_blockName.insert(make_pair(0xf03,"Leaf3JetNegEtaU1: JF2 Output"));
353  m_blockName.insert(make_pair(0xf04,"Leaf3JetNegEtaU1: JF2 Raw Input"));
354  m_blockName.insert(make_pair(0xf08,"Leaf3JetNegEtaU1: JF3 Input"));
355  m_blockName.insert(make_pair(0xf09,"Leaf3JetNegEtaU1: JF3 Shared Received"));
356  m_blockName.insert(make_pair(0xf0a,"Leaf3JetNegEtaU1: JF3 Shared Sent"));
357  m_blockName.insert(make_pair(0xf0b,"Leaf3JetNegEtaU1: JF3 Output"));
358  m_blockName.insert(make_pair(0xf0c,"Leaf3JetNegEtaU1: JF3 Raw Input"));
359  m_blockName.insert(make_pair(0xf80,"Leaf3JetNegEtaU2: Eta0 Input")); // Next Leaf Start
360  m_blockName.insert(make_pair(0xf84,"Leaf3JetNegEtaU2: Eta0 Raw Input"));
361  m_blockName.insert(make_pair(0xf88,"Leaf3JetNegEtaU2: JF1 Input"));
362  m_blockName.insert(make_pair(0xf89,"Leaf3JetNegEtaU2: JF1 Shared Received"));
363  m_blockName.insert(make_pair(0xf8a,"Leaf3JetNegEtaU2: JF1 Shared Sent"));
364  m_blockName.insert(make_pair(0xf8b,"Leaf3JetNegEtaU2: JF1 Output"));
365  m_blockName.insert(make_pair(0xf8c,"Leaf3JetNegEtaU2: JF1 Raw Input"));
366 
367 
368  /*** Setup BlockID to Unpack-Function Map ***/
369  // Miscellaneous Blocks
371  // ConcJet FPGA
372  m_blockUnpackFn[0x580] = &GctFormatTranslateV38::blockToGctTrigObjects; // ConcJet: Input TrigPathA (Jet Cands)
373  m_blockUnpackFn[0x581] = &GctFormatTranslateV38::blockToGctInternRingSums; // ConcJet: Input TrigPathB (HF Rings)
374  m_blockUnpackFn[0x582] = &GctFormatTranslateV38::blockToGctInternHtMissPostWheel; // ConcJet: Input TrigPathC (MissHt)
375  m_blockUnpackFn[0x583] = &GctFormatTranslateV38::blockToGctJetCandsAndCounts; // ConcJet: Jet Cands and Counts Output to GT
376  m_blockUnpackFn[0x587] = &GctFormatTranslateV38::blockDoNothing; // ConcJet: BX & Orbit Info
377  // ConcElec FPGA
378  m_blockUnpackFn[0x680] = &GctFormatTranslateV38::blockToGctInternEmCand; // ConcElec: Input TrigPathA (EM Cands)
379  m_blockUnpackFn[0x681] = &GctFormatTranslateV38::blockToGctInternEtSums; // ConcElec: Input TrigPathB (Et Sums)
380  m_blockUnpackFn[0x682] = &GctFormatTranslateV38::blockToGctInternEtSums; // ConcElec: Input TrigPathC (Ht Sums)
381  m_blockUnpackFn[0x683] = &GctFormatTranslateV38::blockToGctEmCandsAndEnergySums; // ConcElec: EM Cands and Energy Sums Output to GT
382  m_blockUnpackFn[0x686] = &GctFormatTranslateV38::blockDoNothing; // ConcElec: Test (GT Serdes Loopback)
383  m_blockUnpackFn[0x687] = &GctFormatTranslateV38::blockDoNothing; // ConcElec: BX & Orbit Info
384  // Electron Leaf FPGAs
385  m_blockUnpackFn[0x800] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecPosEtaU1: Sort Input
386  m_blockUnpackFn[0x803] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecPosEtaU1: Sort Output
387  m_blockUnpackFn[0x804] = &GctFormatTranslateV38::blockToFibresAndToRctEmCand; // Leaf0ElecPosEtaU1: Raw Input
388  m_blockUnpackFn[0x880] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecPosEtaU2: Sort Input
389  m_blockUnpackFn[0x883] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecPosEtaU2: Sort Output
390  m_blockUnpackFn[0x884] = &GctFormatTranslateV38::blockToFibresAndToRctEmCand; // Leaf0ElecPosEtaU2: Raw Input
391  m_blockUnpackFn[0xc00] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecNegEtaU1: Sort Input
392  m_blockUnpackFn[0xc03] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecNegEtaU1: Sort Output
393  m_blockUnpackFn[0xc04] = &GctFormatTranslateV38::blockToFibresAndToRctEmCand; // Leaf0ElecNegEtaU1: Raw Input
394  m_blockUnpackFn[0xc80] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecNegEtaU2: Sort Input
395  m_blockUnpackFn[0xc83] = &GctFormatTranslateV38::blockToGctInternEmCand; // Leaf0ElecNegEtaU2: Sort Output
396  m_blockUnpackFn[0xc84] = &GctFormatTranslateV38::blockToFibresAndToRctEmCand; // Leaf0ElecNegEtaU2: Raw Input
397  // Wheel Pos-eta Jet FPGA
398  m_blockUnpackFn[0x300] = &GctFormatTranslateV38::blockToGctJetClusterMinimal; // WheelPosEtaJet: Input TrigPathA (Jet Sort)
399  m_blockUnpackFn[0x301] = &GctFormatTranslateV38::blockToGctInternHtMissPreWheel; // WheelPosEtaJet: Input TrigPathB (MissHt)
400  m_blockUnpackFn[0x303] = &GctFormatTranslateV38::blockToGctTrigObjects; // WheelPosEtaJet: Output TrigPathA (Jet Sort)
401  m_blockUnpackFn[0x305] = &GctFormatTranslateV38::blockToGctInternHtMissPostWheel; // WheelPosEtaJet: Output TrigPathB (MissHt)
402  m_blockUnpackFn[0x306] = &GctFormatTranslateV38::blockDoNothing; // WheelPosEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
403  m_blockUnpackFn[0x307] = &GctFormatTranslateV38::blockDoNothing; // WheelPosEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
404  // Wheel Pos-eta Energy FPGA
405  m_blockUnpackFn[0x380] = &GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums; // WheelPosEtaEnergy: Input TrigPathA (Et)
406  m_blockUnpackFn[0x381] = &GctFormatTranslateV38::blockToGctInternEtSums; // WheelPosEtaEnergy: Input TrigPathB (Ht)
407  m_blockUnpackFn[0x383] = &GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums; // WheelPosEtaEnergy: Output TrigPathA (Et)
408  m_blockUnpackFn[0x385] = &GctFormatTranslateV38::blockToGctInternEtSums; // WheelPosEtaEnergy: Output TrigPathB (Ht)
409  m_blockUnpackFn[0x386] = &GctFormatTranslateV38::blockDoNothing; // WheelPosEtaEnergy: Test
410  m_blockUnpackFn[0x387] = &GctFormatTranslateV38::blockDoNothing; // WheelPosEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
411  // Wheel Neg-eta Jet FPGA
412  m_blockUnpackFn[0x700] = &GctFormatTranslateV38::blockToGctJetClusterMinimal; // WheelNegEtaJet: Input TrigPathA (Jet Sort)
413  m_blockUnpackFn[0x701] = &GctFormatTranslateV38::blockToGctInternHtMissPreWheel; // WheelNegEtaJet: Input TrigPathB (MissHt)
414  m_blockUnpackFn[0x703] = &GctFormatTranslateV38::blockToGctTrigObjects; // WheelNegEtaJet: Output TrigPathA (Jet Sort)
415  m_blockUnpackFn[0x705] = &GctFormatTranslateV38::blockToGctInternHtMissPostWheel; // WheelNegEtaJet: Output TrigPathB (MissHt)
416  m_blockUnpackFn[0x706] = &GctFormatTranslateV38::blockDoNothing; // WheelNegEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
417  m_blockUnpackFn[0x707] = &GctFormatTranslateV38::blockDoNothing; // WheelNegEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
418  // Wheel Neg-eta Energy FPGA
419  m_blockUnpackFn[0x780] = &GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums; // WheelNegEtaEnergy: Input TrigPathA (Et)
420  m_blockUnpackFn[0x781] = &GctFormatTranslateV38::blockToGctInternEtSums; // WheelNegEtaEnergy: Input TrigPathB (Ht)
421  m_blockUnpackFn[0x783] = &GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums; // WheelNegEtaEnergy: Output TrigPathA (Et)
422  m_blockUnpackFn[0x785] = &GctFormatTranslateV38::blockToGctInternEtSums; // WheelNegEtaEnergy: Output TrigPathB (Ht)
423  m_blockUnpackFn[0x786] = &GctFormatTranslateV38::blockDoNothing; // WheelNegEtaEnergy: Test
424  m_blockUnpackFn[0x787] = &GctFormatTranslateV38::blockDoNothing; // WheelNegEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
425  // Jet Leaf FPGAs - Positive Eta
426  m_blockUnpackFn[0x900] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf1JetPosEtaU1: JF2 Input
427  m_blockUnpackFn[0x901] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF2 Shared Received
428  m_blockUnpackFn[0x902] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF2 Shared Sent
429  m_blockUnpackFn[0x903] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf1JetPosEtaU1: JF2 Output
430  m_blockUnpackFn[0x904] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetPosEtaU1: JF2 Raw Input
431  m_blockUnpackFn[0x908] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf1JetPosEtaU1: JF3 Input
432  m_blockUnpackFn[0x909] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF3 Shared Received
433  m_blockUnpackFn[0x90a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF3 Shared Sent
434  m_blockUnpackFn[0x90b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf1JetPosEtaU1: JF3 Output
435  m_blockUnpackFn[0x90c] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetPosEtaU1: JF3 Raw Input
436  m_blockUnpackFn[0x980] = &GctFormatTranslateV38::blockDoNothing; // Leaf1JetPosEtaU2: Eta0 Input
437  m_blockUnpackFn[0x984] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetPosEtaU2: Eta0 Raw Input
438  m_blockUnpackFn[0x988] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf1JetPosEtaU2: JF1 Input
439  m_blockUnpackFn[0x989] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetPosEtaU2: JF1 Shared Received
440  m_blockUnpackFn[0x98a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetPosEtaU2: JF1 Shared Sent
441  m_blockUnpackFn[0x98b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf1JetPosEtaU2: JF1 Output
442  m_blockUnpackFn[0x98c] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetPosEtaU2: JF1 Raw Input
443  m_blockUnpackFn[0xa00] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf2JetPosEtaU1: JF2 Input
444  m_blockUnpackFn[0xa01] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF2 Shared Received
445  m_blockUnpackFn[0xa02] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF2 Shared Sent
446  m_blockUnpackFn[0xa03] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf2JetPosEtaU1: JF2 Output
447  m_blockUnpackFn[0xa04] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetPosEtaU1: JF2 Raw Input
448  m_blockUnpackFn[0xa08] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf2JetPosEtaU1: JF3 Input
449  m_blockUnpackFn[0xa09] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF3 Shared Received
450  m_blockUnpackFn[0xa0a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF3 Shared Sent
451  m_blockUnpackFn[0xa0b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf2JetPosEtaU1: JF3 Output
452  m_blockUnpackFn[0xa0c] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetPosEtaU1: JF3 Raw Input
453  m_blockUnpackFn[0xa80] = &GctFormatTranslateV38::blockDoNothing; // Leaf2JetPosEtaU2: Eta0 Input
454  m_blockUnpackFn[0xa84] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetPosEtaU2: Eta0 Raw Input
455  m_blockUnpackFn[0xa88] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf2JetPosEtaU2: JF1 Input
456  m_blockUnpackFn[0xa89] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetPosEtaU2: JF1 Shared Received
457  m_blockUnpackFn[0xa8a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetPosEtaU2: JF1 Shared Sent
458  m_blockUnpackFn[0xa8b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf2JetPosEtaU2: JF1 Output
459  m_blockUnpackFn[0xa8c] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetPosEtaU2: JF1 Raw Input
460  m_blockUnpackFn[0xb00] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf3JetPosEtaU1: JF2 Input
461  m_blockUnpackFn[0xb01] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF2 Shared Received
462  m_blockUnpackFn[0xb02] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF2 Shared Sent
463  m_blockUnpackFn[0xb03] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf3JetPosEtaU1: JF2 Output
464  m_blockUnpackFn[0xb04] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetPosEtaU1: JF2 Raw Input
465  m_blockUnpackFn[0xb08] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf3JetPosEtaU1: JF3 Input
466  m_blockUnpackFn[0xb09] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF3 Shared Received
467  m_blockUnpackFn[0xb0a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF3 Shared Sent
468  m_blockUnpackFn[0xb0b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf3JetPosEtaU1: JF3 Output
469  m_blockUnpackFn[0xb0c] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetPosEtaU1: JF3 Raw Input
470  m_blockUnpackFn[0xb80] = &GctFormatTranslateV38::blockDoNothing; // Leaf3JetPosEtaU2: Eta0 Input
471  m_blockUnpackFn[0xb84] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetPosEtaU2: Eta0 Raw Input
472  m_blockUnpackFn[0xb88] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf3JetPosEtaU2: JF1 Input
473  m_blockUnpackFn[0xb89] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetPosEtaU2: JF1 Shared Received
474  m_blockUnpackFn[0xb8a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetPosEtaU2: JF1 Shared Sent
475  m_blockUnpackFn[0xb8b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf3JetPosEtaU2: JF1 Output
476  m_blockUnpackFn[0xb8c] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetPosEtaU2: JF1 Raw Input
477  // Jet Leaf FPGAs - Negative Eta
478  m_blockUnpackFn[0xd00] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf1JetNegEtaU1: JF2 Input
479  m_blockUnpackFn[0xd01] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF2 Shared Received
480  m_blockUnpackFn[0xd02] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF2 Shared Sent
481  m_blockUnpackFn[0xd03] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf1JetNegEtaU1: JF2 Output
482  m_blockUnpackFn[0xd04] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetNegEtaU1: JF2 Raw Input
483  m_blockUnpackFn[0xd08] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf1JetNegEtaU1: JF3 Input
484  m_blockUnpackFn[0xd09] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF3 Shared Received
485  m_blockUnpackFn[0xd0a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF3 Shared Sent
486  m_blockUnpackFn[0xd0b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf1JetNegEtaU1: JF3 Output
487  m_blockUnpackFn[0xd0c] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetNegEtaU1: JF3 Raw Input
488  m_blockUnpackFn[0xd80] = &GctFormatTranslateV38::blockDoNothing; // Leaf1JetNegEtaU2: Eta0 Input
489  m_blockUnpackFn[0xd84] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetNegEtaU2: Eta0 Raw Input
490  m_blockUnpackFn[0xd88] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf1JetNegEtaU2: JF1 Input
491  m_blockUnpackFn[0xd89] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetNegEtaU2: JF1 Shared Received
492  m_blockUnpackFn[0xd8a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf1JetNegEtaU2: JF1 Shared Sent
493  m_blockUnpackFn[0xd8b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf1JetNegEtaU2: JF1 Output
494  m_blockUnpackFn[0xd8c] = &GctFormatTranslateV38::blockToFibres; // Leaf1JetNegEtaU2: JF1 Raw Input
495  m_blockUnpackFn[0xe00] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf2JetNegEtaU1: JF2 Input
496  m_blockUnpackFn[0xe01] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF2 Shared Received
497  m_blockUnpackFn[0xe02] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF2 Shared Sent
498  m_blockUnpackFn[0xe03] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf2JetNegEtaU1: JF2 Output
499  m_blockUnpackFn[0xe04] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetNegEtaU1: JF2 Raw Input
500  m_blockUnpackFn[0xe08] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf2JetNegEtaU1: JF3 Input
501  m_blockUnpackFn[0xe09] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF3 Shared Received
502  m_blockUnpackFn[0xe0a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF3 Shared Sent
503  m_blockUnpackFn[0xe0b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf2JetNegEtaU1: JF3 Output
504  m_blockUnpackFn[0xe0c] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetNegEtaU1: JF3 Raw Input
505  m_blockUnpackFn[0xe80] = &GctFormatTranslateV38::blockDoNothing; // Leaf2JetNegEtaU2: Eta0 Input
506  m_blockUnpackFn[0xe84] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetNegEtaU2: Eta0 Raw Input
507  m_blockUnpackFn[0xe88] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf2JetNegEtaU2: JF1 Input
508  m_blockUnpackFn[0xe89] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetNegEtaU2: JF1 Shared Received
509  m_blockUnpackFn[0xe8a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf2JetNegEtaU2: JF1 Shared Sent
510  m_blockUnpackFn[0xe8b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf2JetNegEtaU2: JF1 Output
511  m_blockUnpackFn[0xe8c] = &GctFormatTranslateV38::blockToFibres; // Leaf2JetNegEtaU2: JF1 Raw Input
512  m_blockUnpackFn[0xf00] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf3JetNegEtaU1: JF2 Input
513  m_blockUnpackFn[0xf01] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF2 Shared Received
514  m_blockUnpackFn[0xf02] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF2 Shared Sent
515  m_blockUnpackFn[0xf03] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf3JetNegEtaU1: JF2 Output
516  m_blockUnpackFn[0xf04] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetNegEtaU1: JF2 Raw Input
517  m_blockUnpackFn[0xf08] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf3JetNegEtaU1: JF3 Input
518  m_blockUnpackFn[0xf09] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF3 Shared Received
519  m_blockUnpackFn[0xf0a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF3 Shared Sent
520  m_blockUnpackFn[0xf0b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf3JetNegEtaU1: JF3 Output
521  m_blockUnpackFn[0xf0c] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetNegEtaU1: JF3 Raw Input
522  m_blockUnpackFn[0xf80] = &GctFormatTranslateV38::blockDoNothing; // Leaf3JetNegEtaU2: Eta0 Input
523  m_blockUnpackFn[0xf84] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetNegEtaU2: Eta0 Raw Input
524  m_blockUnpackFn[0xf88] = &GctFormatTranslateV38::blockToRctCaloRegions; // Leaf3JetNegEtaU2: JF1 Input
525  m_blockUnpackFn[0xf89] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetNegEtaU2: JF1 Shared Received
526  m_blockUnpackFn[0xf8a] = &GctFormatTranslateV38::blockToGctJetPreCluster; // Leaf3JetNegEtaU2: JF1 Shared Sent
527  m_blockUnpackFn[0xf8b] = &GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster;// Leaf3JetNegEtaU2: JF1 Output
528  m_blockUnpackFn[0xf8c] = &GctFormatTranslateV38::blockToFibres; // Leaf3JetNegEtaU2: JF1 Raw Input
529 
530 
531  /*** Setup RCT Em Crate Map ***/
532  m_rctEmCrate[0x804] = 13;
533  m_rctEmCrate[0x884] = 9;
534  m_rctEmCrate[0xc04] = 4;
535  m_rctEmCrate[0xc84] = 0;
536 
537 
538  /*** Setup RCT jet crate map. ***/
539  m_rctJetCrate[0x900] = 9; // PosEta Leaf 1 JF2
540  m_rctJetCrate[0x908] = 10; // PosEta Leaf 1 JF3
541  m_rctJetCrate[0x988] = 17; // PosEta Leaf 1 JF1
542  m_rctJetCrate[0xa00] = 12; // PosEta Leaf 2 JF2
543  m_rctJetCrate[0xa08] = 13; // PosEta Leaf 2 JF3
544  m_rctJetCrate[0xa88] = 11; // PosEta Leaf 2 JF1
545  m_rctJetCrate[0xb00] = 15; // PosEta Leaf 3 JF2
546  m_rctJetCrate[0xb08] = 16; // PosEta Leaf 3 JF3
547  m_rctJetCrate[0xb88] = 14; // PosEta Leaf 3 JF1
548  m_rctJetCrate[0xd00] = 0; // NegEta Leaf 1 JF2
549  m_rctJetCrate[0xd08] = 1; // NegEta Leaf 1 JF3
550  m_rctJetCrate[0xd88] = 8; // NegEta Leaf 1 JF1
551  m_rctJetCrate[0xe00] = 3; // NegEta Leaf 2 JF2
552  m_rctJetCrate[0xe08] = 4; // NegEta Leaf 2 JF3
553  m_rctJetCrate[0xe88] = 2; // NegEta Leaf 2 JF1
554  m_rctJetCrate[0xf00] = 6; // NegEta Leaf 3 JF2
555  m_rctJetCrate[0xf08] = 7; // NegEta Leaf 3 JF3
556  m_rctJetCrate[0xf88] = 5; // NegEta Leaf 3 JF1
557 
558 
559  /*** Setup Block ID map for pipeline payload positions of isolated Internal EM Cands. ***/
560  m_internEmIsoBounds[0x680] = IsoBoundaryPair(8,15);
561  m_internEmIsoBounds[0x800] = IsoBoundaryPair(0, 9);
562  m_internEmIsoBounds[0x803] = IsoBoundaryPair(0, 1);
563  m_internEmIsoBounds[0x880] = IsoBoundaryPair(0, 7);
564  m_internEmIsoBounds[0x883] = IsoBoundaryPair(0, 1);
565  m_internEmIsoBounds[0xc00] = IsoBoundaryPair(0, 9);
566  m_internEmIsoBounds[0xc03] = IsoBoundaryPair(0, 1);
567  m_internEmIsoBounds[0xc80] = IsoBoundaryPair(0, 7);
568  m_internEmIsoBounds[0xc83] = IsoBoundaryPair(0, 1);
569  }
570 }
static BlockLengthMap m_blockLength
Map to translate block number to fundamental size of a block (i.e. for 1 time-sample).
std::pair< unsigned int, unsigned int > IsoBoundaryPair
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
static BlkToRctCrateMap m_rctJetCrate
Map to relate capture block ID to the RCT crate the data originated from (for jets).
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
static BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
static BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
GctFormatTranslateBase(bool hltMode=false, bool unpackSharedRegions=false)
Constructor.
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
const unsigned m_numberOfGctSamplesToUnpack
Number of BXs of GCT data to unpack (assuming they are in the raw data)
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
static BlockNameMap m_blockName
Map to hold a description for each block number.
static BlkToRctCrateMap m_rctEmCrate
Map to relate capture block ID to the RCT crate the data originated from (for electrons).
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
void blockDoNothing(const unsigned char *d, const GctBlockHeader &hdr)
The null unpack function - obviously common to all formats.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
void blockToGctInternHtMissPreWheel(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Missing Ht data that is being input to the wheels.
const unsigned m_numberOfRctSamplesToUnpack
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
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).
GctFormatTranslateV38::~GctFormatTranslateV38 ( )
virtual

Destructor.

Definition at line 572 of file GctFormatTranslateV38.cc.

573 {
574 }

Member Function Documentation

virtual BlockLengthMap& GctFormatTranslateV38::blockLengthMap ( )
inlineprotectedvirtual

get the static block ID to block-length map.

Implements GctFormatTranslateBase.

Definition at line 54 of file GctFormatTranslateV38.h.

References m_blockLength.

Referenced by generateBlockHeader().

virtual const BlockLengthMap& GctFormatTranslateV38::blockLengthMap ( ) const
inlineprotectedvirtual

get the static block ID to block-length map.

Implements GctFormatTranslateBase.

Definition at line 55 of file GctFormatTranslateV38.h.

References m_blockLength.

virtual BlockNameMap& GctFormatTranslateV38::blockNameMap ( )
inlineprotectedvirtual

get the static block ID to block-name map.

Implements GctFormatTranslateBase.

Definition at line 57 of file GctFormatTranslateV38.h.

References m_blockName.

virtual const BlockNameMap& GctFormatTranslateV38::blockNameMap ( ) const
inlineprotectedvirtual

get the static block ID to blockname map.

Implements GctFormatTranslateBase.

Definition at line 58 of file GctFormatTranslateV38.h.

References m_blockName.

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

unpack Fibres

Definition at line 946 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), GctUnpackCollections::gctFibres(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by blockToFibresAndToRctEmCand(), and GctFormatTranslateV38().

947 {
948  // Don't want to do this in HLT optimisation mode!
949  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of GCT Fibres"; return; }
950 
951  unsigned int id = hdr.blockId();
952  unsigned int nSamples = hdr.nSamples();
953  unsigned int length = hdr.blockLength();
954 
955  // re-interpret pointer
956  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
957 
958  for (unsigned int i=0; i<length; ++i) {
959  for (unsigned int bx=0; bx<nSamples; ++bx) {
960  colls()->gctFibres()->push_back( L1GctFibreWord(*p, id, i, bx) );
961  ++p;
962  }
963  }
964 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
Global Calorimeter Trigger SC -&gt; CC fibre data word.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
L1GctFibreCollection *const gctFibres() const
Raw fibre input to the GCT.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToFibresAndToRctEmCand ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack Fibres and RCT EM Candidates

Definition at line 966 of file GctFormatTranslateV38.cc.

References blockToFibres(), and blockToRctEmCand().

Referenced by GctFormatTranslateV38().

967 {
968  this->blockToRctEmCand(d, hdr);
969  this->blockToFibres(d, hdr);
970 }
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
void GctFormatTranslateV38::blockToGctEmCandsAndEnergySums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT EM Candidates and energy sums.

Definition at line 648 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctFormatTranslateBase::colls(), castor_dqm_sourceclient_file_cfg::firstSample, GctUnpackCollections::gctEtHad(), GctUnpackCollections::gctEtMiss(), GctUnpackCollections::gctEtTot(), GctUnpackCollections::gctIsoEm(), GctUnpackCollections::gctNonIsoEm(), castor_dqm_sourceclient_file_cfg::lastSample, LogDebug, m_numberOfGctSamplesToUnpack, min, GctBlockHeader::nSamples(), and evf::evtn::offset().

Referenced by GctFormatTranslateV38().

649 {
650  const unsigned int id = hdr.blockId();
651  const unsigned int nSamples = hdr.nSamples();
652 
653  // Re-interpret pointer. p16 will be pointing at the 16 bit word that
654  // contains the rank0 non-isolated electron of the zeroth time-sample.
655  const uint16_t * p16 = reinterpret_cast<const uint16_t *>(d);
656 
657  // UNPACK EM CANDS
658 
659  const unsigned int emCandCategoryOffset = nSamples * 4; // Offset to jump from the non-iso electrons to the isolated ones.
660  const unsigned int timeSampleOffset = nSamples * 2; // Offset to jump to next candidate pair in the same time-sample.
661 
662  unsigned int samplesToUnpack = std::min(nSamples,m_numberOfGctSamplesToUnpack); // Unpack as many as asked for if they are in the raw data
663  unsigned int centralSample = (unsigned)std::ceil((double)nSamples/2.)-1; // think this works when nSamples is even, need to check!!!
664  unsigned int firstSample = centralSample-(unsigned)std::ceil((double)samplesToUnpack/2.)+1;
665  unsigned int lastSample = centralSample+(unsigned)(samplesToUnpack/2);
666 
667  LogDebug("GCT") << "Unpacking output EM. Central sample=" << centralSample << " first=" << firstSample << " last=" << lastSample;
668 
669  for (unsigned int iso=0; iso<2; ++iso) // loop over non-iso/iso candidate pairs
670  {
671  bool isoFlag = (iso==1);
672 
673  // Get the correct collection to put them in.
675  if (isoFlag) { em = colls()->gctIsoEm(); }
676  else { em = colls()->gctNonIsoEm(); }
677 
678  for (unsigned int bx=firstSample; bx<=lastSample; ++bx) // loop over samples to be unpacked
679  {
680  // cand0Offset will give the offset on p16 to get the rank 0 candidate
681  // of the correct category and timesample.
682  const unsigned int cand0Offset = iso*emCandCategoryOffset + bx*2;
683 
684  em->push_back(L1GctEmCand(p16[cand0Offset], isoFlag, id, 0, (int)bx-(int)centralSample)); // rank0 electron
685  em->push_back(L1GctEmCand(p16[cand0Offset + timeSampleOffset], isoFlag, id, 1, (int)bx-(int)centralSample)); // rank1 electron
686  em->push_back(L1GctEmCand(p16[cand0Offset + 1], isoFlag, id, 2, (int)bx-(int)centralSample)); // rank2 electron
687  em->push_back(L1GctEmCand(p16[cand0Offset + timeSampleOffset + 1], isoFlag, id, 3, (int)bx-(int)centralSample)); // rank3 electron
688 
689  LogDebug("GCT") << "Unpacked a bunch of EG. iso=" << iso << " bx=" << bx << std::endl;
690  }
691  }
692 
693  p16 += emCandCategoryOffset * 2; // Move the pointer over the data we've already unpacked.
694 
695  // UNPACK ENERGY SUMS
696 
697  for (unsigned int bx=firstSample; bx<=lastSample; ++bx) // loop over all time samples
698  {
699  const unsigned int offset = bx*2;
700  colls()->gctEtTot()->push_back(L1GctEtTotal(p16[offset],(int)bx-(int)centralSample)); // Et total
701  colls()->gctEtHad()->push_back(L1GctEtHad(p16[offset+1],(int)bx-(int)centralSample)); // Et hadronic
702  }
703 
704  p16 += nSamples * 2;
705 
706  // 32-bit pointer for getting Missing Et.
707  const uint32_t * p32 = reinterpret_cast<const uint32_t *>(p16);
708 
709  for (unsigned int bx=firstSample; bx<=lastSample; ++bx) {
710  colls()->gctEtMiss()->push_back(L1GctEtMiss(p32[bx],(int)bx-(int)centralSample)); // Et Miss
711  LogDebug("GCT") << "Unpacked energy sums bx=" << bx << std::endl;
712  }
713 
714 
715 }
#define LogDebug(id)
L1GctEmCandCollection *const gctNonIsoEm() const
GCT output: Non-isolated EM candidate collection.
Persistable copy of missing Et measured at Level-1.
Definition: L1GctEtMiss.h:18
#define min(a, b)
Definition: mlp_lapack.h:161
Level-1 Trigger EM candidate at output of GCT.
Definition: L1GctEmCand.h:22
const unsigned m_numberOfGctSamplesToUnpack
Number of BXs of GCT data to unpack (assuming they are in the raw data)
L1GctEtTotalCollection *const gctEtTot() const
GCT output: Total Et collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
Persistable copy of total Et measured at Level-1.
Definition: L1GctEtTotal.h:18
L1GctEtMissCollection *const gctEtMiss() const
GCT output: Missing Et collection.
unsigned int offset(bool)
bool first
Definition: L1TdeRCT.cc:94
Persistable copy of total Ht measured at Level-1.
Definition: L1GctEtHad.h:18
L1GctEmCandCollection *const gctIsoEm() const
GCT output: Isolated EM candidate collection.
L1GctEtHadCollection *const gctEtHad() const
GCT output: Hadronic transverse-energy (Ht) collection.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
std::vector< L1GctEmCand > L1GctEmCandCollection
void GctFormatTranslateV38::blockToGctInternEmCand ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal EM Candidates

Definition at line 783 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), end, spr::find(), GctUnpackCollections::gctInternEm(), GctFormatTranslateBase::hltMode(), i, errorMatrix2Lands_multiChannel::id, internEmIsoBounds(), LogDebug, GctBlockHeader::nSamples(), evf::evtn::offset(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

784 {
785  // Don't want to do this in HLT optimisation mode!
786  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal EM Cands"; return; }
787 
788  unsigned int id = hdr.blockId();
789  unsigned int nSamples = hdr.nSamples();
790  unsigned int numCandPairs = hdr.blockLength();
791 
792  // Debug assertion to prevent problems if definitions not up to date.
793  assert(internEmIsoBounds().find(id) != internEmIsoBounds().end());
794 
795  unsigned int lowerIsoPairBound = internEmIsoBounds()[id].first;
796  unsigned int upperIsoPairBound = internEmIsoBounds()[id].second;
797 
798  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
799  uint16_t * p = reinterpret_cast<uint16_t *>(const_cast<unsigned char *>(d));
800 
801  // Loop over timesamples (i.e. bunch crossings)
802  for(unsigned int bx=0; bx < nSamples; ++bx)
803  {
804  // Loop over candidate pairs (i.e. each iteration unpacks a pair of candidates)
805  for(unsigned int candPair = 0 ; candPair < numCandPairs ; ++candPair)
806  {
807  // Is the candidate electron pair an isolated pair or not?
808  bool iso = ((candPair>=lowerIsoPairBound) && (candPair<=upperIsoPairBound));
809 
810  // Loop over the two electron candidates in each pair
811  for(unsigned int i = 0 ; i < 2 ; ++i)
812  {
813  unsigned offset = 2*(bx + candPair*nSamples) + i;
814  uint16_t candRaw = p[offset];
815  colls()->gctInternEm()->push_back( L1GctInternEmCand(candRaw, iso, id, candPair*2 + i, bx) );
816  }
817  }
818  }
819 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
virtual BlockIdToEmCandIsoBoundMap & internEmIsoBounds()
get the static intern EM cand isolated boundary map.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
#define end
Definition: vmac.h:38
unsigned int offset(bool)
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
uint32_t blockId() const
Get the block ID.
L1GctInternEmCandCollection *const gctInternEm() const
Internal EM candidate collection.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctInternEtSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal Et sums

Definition at line 972 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternEtSum::fromTotalEtOrHt(), GctUnpackCollections::gctInternEtSums(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

973 {
974  // Don't want to do this in HLT optimisation mode!
975 
976  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Et Sums"; return; }
977 
978  unsigned int id = hdr.blockId();
979  unsigned int nSamples = hdr.nSamples();
980  unsigned int length = hdr.blockLength();
981 
982  // Re-interpret pointer to 32 bits
983  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
984 
985  for (unsigned int i=0; i<length; ++i) {
986  // Loop over timesamples (i.e. bunch crossings)
987  for (unsigned int bx=0; bx<nSamples; ++bx) {
988  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromTotalEtOrHt(id,i,bx,*p));
989  ++p;
990  }
991  }
992 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
static L1GctInternEtSum fromTotalEtOrHt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
L1GctInternEtSumCollection *const gctInternEtSums() const
Internal Et Sum collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal output of leaf jet finder

Definition at line 994 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternJetData::fromJetCluster(), L1GctInternEtSum::fromJetMissEt(), L1GctInternEtSum::fromJetTotEt(), L1GctInternEtSum::fromJetTotHt(), GctUnpackCollections::gctInternEtSums(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

995 {
996  // Don't want to do this in HLT optimisation mode!
997  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
998 
999  unsigned int id = hdr.blockId();
1000  unsigned int nSamples = hdr.nSamples();
1001  unsigned int length = hdr.blockLength();
1002 
1003  // Re-interpret pointer to 32 bits
1004  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
1005 
1006  for (unsigned int i=0; i<length; ++i) {
1007  // Loop over timesamples (i.e. bunch crossings)
1008  for (unsigned int bx=0; bx<nSamples; ++bx) {
1009  if (i<2) colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromJetMissEt(id,i,bx,*p));
1010  if (i==3){
1011  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromJetTotEt(id,i,bx,*p));
1012  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromJetTotHt(id,i,bx,*p));
1013  }
1014  if (i>4) colls()->gctInternJets()->push_back(L1GctInternJetData::fromJetCluster(L1CaloRegionDetId(0,0),id,i,bx,*p));
1015  ++p;
1016  }
1017  }
1018 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
L1GctInternEtSumCollection *const gctInternEtSums() const
Internal Et Sum collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
static L1GctInternEtSum fromJetMissEt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
static L1GctInternJetData fromJetCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;jet_cluster&quot;
L1GctInternJetDataCollection *const gctInternJets() const
Internal Jet candidate collection.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
static L1GctInternEtSum fromJetTotEt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
static L1GctInternEtSum fromJetTotHt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
void GctFormatTranslateV38::blockToGctInternHtMissPostWheel ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal Missing Ht data that is either wheel output or concJet input (i.e. after wheel processing).

Definition at line 1195 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), GctUnpackCollections::gctInternHtMiss(), GctFormatTranslateBase::hltMode(), LogDebug, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, L1GctInternHtMiss::unpackerMissHtx(), and L1GctInternHtMiss::unpackerMissHty().

Referenced by GctFormatTranslateV38().

1196 {
1197  // Don't want to do this in HLT optimisation mode!
1198  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of post-wheel internal Missing Ht data"; return; }
1199 
1200  unsigned int id = hdr.blockId();
1201  unsigned int nSamples = hdr.nSamples();
1202  unsigned int length = hdr.blockLength();
1203 
1204  // Re-interpret pointer to 32 bits
1205  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
1206 
1207  for (unsigned int iLength=0; iLength < length; ++iLength)
1208  {
1209  // Loop over timesamples (i.e. bunch crossings)
1210  for (unsigned int bx=0; bx<nSamples; ++bx)
1211  {
1212  if(iLength % 2) { colls()->gctInternHtMiss()->push_back(L1GctInternHtMiss::unpackerMissHty(id, iLength, bx, *p)); } // Hty on odd numbers
1213  else { colls()->gctInternHtMiss()->push_back(L1GctInternHtMiss::unpackerMissHtx(id, iLength, bx, *p)); } // Htx on even numbers
1214  ++p;
1215  }
1216  }
1217 }
#define LogDebug(id)
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
static L1GctInternHtMiss unpackerMissHty(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Named ctor for making missing Ht y-component object from unpacker raw data.
L1GctInternHtMissCollection *const gctInternHtMiss() const
Internal missing Ht collection.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
static L1GctInternHtMiss unpackerMissHtx(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Named ctor for making missing Ht x-component object from unpacker raw data.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctInternHtMissPreWheel ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal Missing Ht data that is being input to the wheels.

Definition at line 1172 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), GctUnpackCollections::gctInternHtMiss(), GctFormatTranslateBase::hltMode(), LogDebug, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, and L1GctInternHtMiss::unpackerMissHtxHty().

Referenced by GctFormatTranslateV38().

1173 {
1174  // Don't want to do this in HLT optimisation mode!
1175  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of pre-wheel internal Missing Ht data"; return; }
1176 
1177  unsigned int id = hdr.blockId();
1178  unsigned int nSamples = hdr.nSamples();
1179  unsigned int length = hdr.blockLength();
1180 
1181  // Re-interpret pointer to 32 bits
1182  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
1183 
1184  for (unsigned int iLength=0; iLength < length; ++iLength)
1185  {
1186  // Loop over timesamples (i.e. bunch crossings)
1187  for (unsigned int bx=0; bx<nSamples; ++bx)
1188  {
1189  colls()->gctInternHtMiss()->push_back(L1GctInternHtMiss::unpackerMissHtxHty(id, iLength, bx, *p));
1190  ++p;
1191  }
1192  }
1193 }
#define LogDebug(id)
static L1GctInternHtMiss unpackerMissHtxHty(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Named ctor for making missing Ht x &amp; y components object from unpacker raw data (wheel input)...
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
L1GctInternHtMissCollection *const gctInternHtMiss() const
Internal missing Ht collection.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctInternRingSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal HF ring sums

Definition at line 1089 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternHFData::fromConcBitCounts(), L1GctInternHFData::fromConcRingSums(), GctUnpackCollections::gctInternHFData(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

1090 {
1091  // Don't want to do this in HLT optimisation mode!
1092  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal HF ring data"; return; }
1093 
1094  unsigned int id = hdr.blockId();
1095  unsigned int nSamples = hdr.nSamples();
1096  unsigned int length = hdr.blockLength();
1097 
1098  // Re-interpret pointer to 32 bits
1099  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
1100 
1101  for (unsigned int i=0; i<length/2; ++i) {
1102  // Loop over timesamples (i.e. bunch crossings)
1103  for (unsigned int bx=0; bx<nSamples; ++bx) {
1104  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromConcRingSums(id,i,bx,*p));
1105  ++p;
1106  }
1107  for (unsigned int bx=0; bx<nSamples; ++bx) {
1108  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromConcBitCounts(id,i,bx,*p));
1109  ++p;
1110  }
1111  }
1112 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
static L1GctInternHFData fromConcBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
L1GctInternHFDataCollection *const gctInternHFData() const
Internal Hadronic-Forward bit-counts/ring-sums data collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
static L1GctInternHFData fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctJetCandsAndCounts ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

Unpack GCT Jet Candidates and jet counts.

Definition at line 717 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctFormatTranslateBase::colls(), castor_dqm_sourceclient_file_cfg::firstSample, GctFormatTranslateBase::FORWARD_JETS, L1GctHFBitCounts::fromConcHFBitCounts(), L1GctHFRingEtSums::fromConcRingSums(), GctUnpackCollections::gctHfBitCounts(), GctUnpackCollections::gctHfRingEtSums(), GctUnpackCollections::gctHtMiss(), GctFormatTranslateBase::gctJets(), fwrapper::jets, castor_dqm_sourceclient_file_cfg::lastSample, LogDebug, m_numberOfGctSamplesToUnpack, min, GctBlockHeader::nSamples(), GctFormatTranslateBase::NUM_JET_CATEGORIES, and GctFormatTranslateBase::TAU_JETS.

Referenced by GctFormatTranslateV38().

718 {
719  const unsigned int id = hdr.blockId(); // Capture block ID.
720  const unsigned int nSamples = hdr.nSamples(); // Number of time-samples.
721 
722  // Re-interpret block payload pointer to 16 bits so it sees one candidate at a time.
723  // p16 points to the start of the block payload, at the rank0 tau jet candidate.
724  const uint16_t * p16 = reinterpret_cast<const uint16_t *>(d);
725 
726  // UNPACK JET CANDS
727 
728  const unsigned int jetCandCategoryOffset = nSamples * 4; // Offset to jump from one jet category to the next.
729  const unsigned int timeSampleOffset = nSamples * 2; // Offset to jump to next candidate pair in the same time-sample.
730 
731  unsigned int samplesToUnpack = std::min(nSamples,m_numberOfGctSamplesToUnpack); // Unpack as many as asked for if they are in the raw data
732  unsigned int centralSample = (unsigned)std::ceil((double)nSamples/2.)-1; // think this works when nSamples is even, need to check!!!
733  unsigned int firstSample = centralSample-(unsigned)std::ceil((double)samplesToUnpack/2.)+1;
734  unsigned int lastSample = centralSample+(unsigned)(samplesToUnpack/2);
735 
736  LogDebug("GCT") << "Unpacking output Jets. Samples to unpack=" << samplesToUnpack << " central=" << centralSample << " first=" << firstSample << " last=" << lastSample;
737 
738  // Loop over the different catagories of jets
739  for(unsigned int iCat = 0 ; iCat < NUM_JET_CATEGORIES ; ++iCat)
740  {
741  L1GctJetCandCollection * const jets = gctJets(iCat);
742  assert(jets->empty()); // The supplied vector should be empty.
743 
744  bool tauflag = (iCat == TAU_JETS);
745  bool forwardFlag = (iCat == FORWARD_JETS);
746 
747  // Loop over the different timesamples (bunch crossings).
748  for(unsigned int bx = firstSample ; bx <=lastSample; ++bx)
749  {
750  // cand0Offset will give the offset on p16 to get the rank 0 Jet Cand of the correct category and timesample.
751  const unsigned int cand0Offset = iCat*jetCandCategoryOffset + bx*2;
752 
753  // Rank 0 Jet.
754  jets->push_back(L1GctJetCand(p16[cand0Offset], tauflag, forwardFlag, id, 0, (int)bx-(int)centralSample));
755  // Rank 1 Jet.
756  jets->push_back(L1GctJetCand(p16[cand0Offset + timeSampleOffset], tauflag, forwardFlag, id, 1, (int)bx-(int)centralSample));
757  // Rank 2 Jet.
758  jets->push_back(L1GctJetCand(p16[cand0Offset + 1], tauflag, forwardFlag, id, 2, (int)bx-(int)centralSample));
759  // Rank 3 Jet.
760  jets->push_back(L1GctJetCand(p16[cand0Offset + timeSampleOffset + 1], tauflag, forwardFlag, id, 3, (int)bx-(int)centralSample));
761  }
762  }
763 
764  p16 += NUM_JET_CATEGORIES * jetCandCategoryOffset; // Move the pointer over the data we've already unpacked.
765 
766  // NOW UNPACK: HFBitCounts, HFRingEtSums and Missing Ht
767 
768  // Re-interpret block payload pointer to 32 bits so it sees six jet counts at a time.
769  const uint32_t * p32 = reinterpret_cast<const uint32_t *>(p16);
770 
771  for (unsigned int bx=firstSample; bx<=lastSample; ++bx) // loop over all time samples
772  {
773  // Channel 0 carries both HF counts and sums
774  colls()->gctHfBitCounts()->push_back(L1GctHFBitCounts::fromConcHFBitCounts(id,6,(int)bx-(int)centralSample,p32[bx]));
775  colls()->gctHfRingEtSums()->push_back(L1GctHFRingEtSums::fromConcRingSums(id,6,(int)bx-(int)centralSample,p32[bx]));
776 
777  // Channel 1 carries Missing HT.
778  colls()->gctHtMiss()->push_back(L1GctHtMiss(p32[bx+nSamples], (int)bx-(int)centralSample));
779  }
780 }
#define LogDebug(id)
L1GctHFBitCountsCollection *const gctHfBitCounts() const
GCT output: Hadronic-Forward bit-counts collection.
L1GctHtMissCollection *const gctHtMiss() const
GCT output: Missing Ht collection.
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
#define min(a, b)
Definition: mlp_lapack.h:161
std::vector< L1GctJetCand > L1GctJetCandCollection
const unsigned m_numberOfGctSamplesToUnpack
Number of BXs of GCT data to unpack (assuming they are in the raw data)
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
vector< PseudoJet > jets
tuple Jets
Definition: METSkim_cff.py:17
bool first
Definition: L1TdeRCT.cc:94
static L1GctHFRingEtSums fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
L1GctJetCandCollection *const gctJets(const unsigned cat) const
Get a specific jet candandiate collection using the JetCandCategory enumeration.
L1GctHFRingEtSumsCollection *const gctHfRingEtSums() const
GCT output: Hadronic-Forward ring-sums collection.
Persistable copy of missing Et measured at Level-1.
Definition: L1GctHtMiss.h:16
static L1GctHFBitCounts fromConcHFBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctJetClusterMinimal ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal input to wheel jet sort

Definition at line 1043 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternJetData::fromJetClusterMinimal(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

1044 {
1045  // Don't want to do this in HLT optimisation mode!
1046  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
1047 
1048  unsigned int id = hdr.blockId();
1049  unsigned int nSamples = hdr.nSamples();
1050  unsigned int length = hdr.blockLength();
1051 
1052  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
1053  uint16_t * p = reinterpret_cast<uint16_t *>(const_cast<unsigned char *>(d));
1054 
1055  for (unsigned int i=0; i<length; ++i) {
1056  // Loop over timesamples (i.e. bunch crossings)
1057  for (unsigned int bx=0; bx<nSamples; ++bx) {
1059  ++p;
1061  ++p;
1062  }
1063  }
1064 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
static L1GctInternJetData fromJetClusterMinimal(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;jet_cluster_minimal&quot;
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
L1GctInternJetDataCollection *const gctInternJets() const
Internal Jet candidate collection.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctJetPreCluster ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal shared jet finder info

Definition at line 1066 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternJetData::fromJetPreCluster(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

1067 {
1068  // Don't want to do this in HLT optimisation mode!
1069  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
1070 
1071  unsigned int id = hdr.blockId();
1072  unsigned int nSamples = hdr.nSamples();
1073  unsigned int length = hdr.blockLength();
1074 
1075  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
1076  uint16_t * p = reinterpret_cast<uint16_t *>(const_cast<unsigned char *>(d));
1077 
1078  for (unsigned int i=0; i<length; ++i) {
1079  // Loop over timesamples (i.e. bunch crossings)
1080  for (unsigned int bx=0; bx<nSamples; ++bx) {
1082  ++p;
1084  ++p;
1085  }
1086  }
1087 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
static L1GctInternJetData fromJetPreCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;jet_precluster&quot;
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
L1GctInternJetDataCollection *const gctInternJets() const
Internal Jet candidate collection.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctTrigObjects ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal wheel and conc jets

Definition at line 1020 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternJetData::fromGctTrigObject(), GctUnpackCollections::gctInternJets(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

1021 {
1022  // Don't want to do this in HLT optimisation mode!
1023  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
1024 
1025  unsigned int id = hdr.blockId();
1026  unsigned int nSamples = hdr.nSamples();
1027  unsigned int length = hdr.blockLength();
1028 
1029  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
1030  uint16_t * p = reinterpret_cast<uint16_t *>(const_cast<unsigned char *>(d));
1031 
1032  for (unsigned int i=0; i<length; ++i) {
1033  // Loop over timesamples (i.e. bunch crossings)
1034  for (unsigned int bx=0; bx<nSamples; ++bx) {
1036  ++p;
1038  ++p;
1039  }
1040  }
1041 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
static L1GctInternJetData fromGctTrigObject(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;gct_trig_object&quot;
L1GctInternJetDataCollection *const gctInternJets() const
Internal Jet candidate collection.
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal input to wheel

Definition at line 1114 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternEtSum::fromMissEtxOrEty(), L1GctInternEtSum::fromTotalEtOrHt(), L1GctInternHFData::fromWheelBitCounts(), L1GctInternHFData::fromWheelRingSums(), GctUnpackCollections::gctInternEtSums(), GctUnpackCollections::gctInternHFData(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

1115 {
1116  // Don't want to do this in HLT optimisation mode!
1117  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of wheel input internal Et sums and HF ring data"; return; }
1118 
1119  unsigned int id = hdr.blockId();
1120  unsigned int nSamples = hdr.nSamples();
1121  unsigned int length = hdr.blockLength();
1122 
1123  // Re-interpret pointer to 32 bits
1124  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
1125 
1126  for (unsigned int i=0; i<length; ++i) {
1127  // Loop over timesamples (i.e. bunch crossings)
1128  for (unsigned int bx=0; bx<nSamples; ++bx) {
1129  if (i<3){
1130  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromTotalEtOrHt(id,i,bx,*p));
1131  } else if (i>2 && i<9) {
1132  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromMissEtxOrEty(id,i,bx,*p));
1133  } else if (i>8 && i<15) {
1134  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelRingSums(id,i,bx,*p));
1135  } else if (i>14){
1136  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelBitCounts(id,i,bx,*p));
1137  }
1138  ++p;
1139  }
1140  }
1141 }
#define LogDebug(id)
static L1GctInternEtSum fromMissEtxOrEty(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
int i
Definition: DBlmapReader.cc:9
static L1GctInternEtSum fromTotalEtOrHt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
L1GctInternHFDataCollection *const gctInternHFData() const
Internal Hadronic-Forward bit-counts/ring-sums data collection.
L1GctInternEtSumCollection *const gctInternEtSums() const
Internal Et Sum collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack GCT internal output of wheel

Definition at line 1143 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), L1GctInternEtSum::fromMissEtxOrEty(), L1GctInternEtSum::fromTotalEtOrHt(), L1GctInternHFData::fromWheelBitCounts(), L1GctInternHFData::fromWheelRingSums(), GctUnpackCollections::gctInternEtSums(), GctUnpackCollections::gctInternHFData(), GctFormatTranslateBase::hltMode(), i, LogDebug, GctBlockHeader::nSamples(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by GctFormatTranslateV38().

1144 {
1145  // Don't want to do this in HLT optimisation mode!
1146  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of wheel output internal Et sums and HF ring data"; return; }
1147 
1148  unsigned int id = hdr.blockId();
1149  unsigned int nSamples = hdr.nSamples();
1150  unsigned int length = hdr.blockLength();
1151 
1152  // Re-interpret pointer to 32 bits
1153  uint32_t * p = reinterpret_cast<uint32_t *>(const_cast<unsigned char *>(d));
1154 
1155  for (unsigned int i=0; i<length; ++i) {
1156  // Loop over timesamples (i.e. bunch crossings)
1157  for (unsigned int bx=0; bx<nSamples; ++bx) {
1158  if (i<1){
1159  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromTotalEtOrHt(id,i,bx,*p));
1160  } else if (i>0 && i<3) {
1161  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromMissEtxOrEty(id,i,bx,*p));
1162  } else if (i>2 && i<5) {
1163  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelRingSums(id,i,bx,*p));
1164  } else if (i>4){
1165  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelBitCounts(id,i,bx,*p));
1166  }
1167  ++p;
1168  }
1169  }
1170 }
#define LogDebug(id)
static L1GctInternEtSum fromMissEtxOrEty(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
int i
Definition: DBlmapReader.cc:9
static L1GctInternEtSum fromTotalEtOrHt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
L1GctInternHFDataCollection *const gctInternHFData() const
Internal Hadronic-Forward bit-counts/ring-sums data collection.
L1GctInternEtSumCollection *const gctInternEtSums() const
Internal Et Sum collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
void GctFormatTranslateV38::blockToRctCaloRegions ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

Unpack RCT Calo Regions.

Definition at line 878 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), end, spr::find(), GctFormatTranslateBase::hltMode(), i, errorMatrix2Lands_multiChannel::id, LogDebug, L1CaloRegion::makeRegionFromUnpacker(), GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, GctUnpackCollections::rctCalo(), rctJetCrateMap(), and GctFormatTranslateBase::unpackSharedRegions().

Referenced by GctFormatTranslateV38().

879 {
880  // Don't want to do this in HLT optimisation mode!
881  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of RCT Regions"; return; }
882 
883  unsigned int id = hdr.blockId();
884  unsigned int nSamples = hdr.nSamples();
885  unsigned int length = hdr.blockLength();
886 
887  // Debug assertion to prevent problems if definitions not up to date.
888  assert(rctJetCrateMap().find(id) != rctJetCrateMap().end());
889 
890  // get crate (need this to get ieta and iphi)
891  unsigned int crate=rctJetCrateMap()[id];
892 
893  // re-interpret pointer
894  uint16_t * p = reinterpret_cast<uint16_t *>(const_cast<unsigned char *>(d));
895 
896  // eta and phi
897  unsigned int ieta;
898  unsigned int iphi;
899 
900  for (unsigned int i=0; i<length; ++i)
901  {
902  for (uint16_t bx=0; bx<nSamples; ++bx)
903  {
904  // First figure out eta and phi
905  if (crate<9) { // negative eta
906  ieta = 12-i;
907  iphi = 2*((11-crate)%9);
908  }
909  else { // positive eta
910  ieta = 9+i;
911  iphi = 2*((20-crate)%9);
912  }
913 
914  // Skip the first four regions (i.e. where i<2) which are duplicates (shared data).
915  if (i>1) {
916  // First region is phi=0
917  colls()->rctCalo()->push_back( L1CaloRegion::makeRegionFromUnpacker(*p, ieta, iphi, id, i, bx) );
918  ++p;
919  // Second region is phi=1
920  if (iphi>0) { iphi-=1; }
921  else { iphi = 17; }
922  colls()->rctCalo()->push_back( L1CaloRegion::makeRegionFromUnpacker(*p, ieta, iphi, id, i, bx) );
923  ++p;
924  }
925  // Unpack the shared data if asked for debugging
926  else if (unpackSharedRegions()){
927  // First region is phi=0
928  colls()->rctCalo()->push_back( L1CaloRegion::makeRegionFromUnpacker(*p, ieta, iphi, id, i, bx) );
929  ++p;
930  // Second region is phi=1
931  if (iphi>0) { iphi-=1; }
932  else { iphi = 17; }
933  colls()->rctCalo()->push_back( L1CaloRegion::makeRegionFromUnpacker(*p, ieta, iphi, id, i, bx) );
934  ++p;
935 
936  } else { // Skip the shared data
937  ++p;
938  ++p;
939  }
940  }
941  }
942 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
virtual BlkToRctCrateMap & rctJetCrateMap()
get the static block ID to RCT crate map for jets
#define end
Definition: vmac.h:38
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
static L1CaloRegion makeRegionFromUnpacker(const uint16_t data, const unsigned ieta, const unsigned iphi, const uint16_t block, const uint16_t index, const int16_t bx)
constructor from raw data and GCT indices for unpacking
L1CaloRegionCollection *const rctCalo() const
Input calo regions from the RCT to the GCT.
void GctFormatTranslateV38::blockToRctEmCand ( const unsigned char *  d,
const GctBlockHeader hdr 
)
private

unpack RCT EM Candidates

Definition at line 824 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctBlockHeader::blockLength(), GctFormatTranslateBase::colls(), GctFormatTranslateBase::hltMode(), i, errorMatrix2Lands_multiChannel::id, LogDebug, GctBlockHeader::nSamples(), AlCaHLTBitMon_ParallelJobs::p, GctUnpackCollections::rctEm(), rctEmCrateMap(), SourceCardRouting::SFPtoEMU(), and GctFormatTranslateBase::srcCardRouting().

Referenced by blockToFibresAndToRctEmCand().

825 {
826  // Don't want to do this in HLT optimisation mode!
827  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of RCT EM Cands"; return; }
828 
829  unsigned int id = hdr.blockId();
830  unsigned int nSamples = hdr.nSamples();
831  unsigned int length = hdr.blockLength();
832 
833  // re-interpret pointer
834  uint16_t * p = reinterpret_cast<uint16_t *>(const_cast<unsigned char *>(d));
835 
836  // arrays of source card data
837  uint16_t sfp[2][4]; // [ cycle ] [ SFP ]
838  uint16_t eIsoRank[4];
839  uint16_t eIsoCard[4];
840  uint16_t eIsoRgn[4];
841  uint16_t eNonIsoRank[4];
842  uint16_t eNonIsoCard[4];
843  uint16_t eNonIsoRgn[4];
844  uint16_t MIPbits[7][2];
845  uint16_t QBits[7][2];
846 
847  unsigned int bx = 0;
848 
849  // loop over crates
850  for (unsigned int crate=rctEmCrateMap()[id]; crate<rctEmCrateMap()[id]+length/3; ++crate) {
851 
852  // read SC SFP words
853  for (unsigned short iSfp=0 ; iSfp<4 ; ++iSfp) {
854  for (unsigned short cyc=0 ; cyc<2 ; ++cyc) {
855  if (iSfp==0) { sfp[cyc][iSfp] = 0; } // muon bits
856  else { // EM candidate
857  sfp[cyc][iSfp] = *p;
858  ++p;
859  }
860  }
861  p = p + 2*(nSamples-1);
862  }
863 
864  // fill SC arrays
865  srcCardRouting().SFPtoEMU(eIsoRank, eIsoCard, eIsoRgn, eNonIsoRank, eNonIsoCard, eNonIsoRgn, MIPbits, QBits, sfp);
866 
867  // create EM cands
868  for (unsigned short int i=0; i<4; ++i) {
869  colls()->rctEm()->push_back( L1CaloEmCand( eIsoRank[i], eIsoRgn[i], eIsoCard[i], crate, true, i, bx) );
870  }
871  for (unsigned short int i=0; i<4; ++i) {
872  colls()->rctEm()->push_back( L1CaloEmCand( eNonIsoRank[i], eNonIsoRgn[i], eNonIsoCard[i], crate, false, i, bx) );
873  }
874  }
875 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
L1CaloEmCollection *const rctEm() const
Input electrons from the RCT to the GCT.
void SFPtoEMU(unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned short(&SFP)[2][4]) const
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
const SourceCardRouting & srcCardRouting() const
Protected interface to the unpackSharedRegions commissioning option.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
uint32_t blockId() const
Get the block ID.
virtual BlkToRctCrateMap & rctEmCrateMap()
get the static block ID to RCT crate map for electrons.
uint32_t nSamples() const
Get the number of time samples.
bool GctFormatTranslateV38::convertBlock ( const unsigned char *  d,
const GctBlockHeader hdr 
)
virtual

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

Implements GctFormatTranslateBase.

Definition at line 604 of file GctFormatTranslateV38.cc.

References GctBlockHeader::blockId(), GctFormatTranslateBase::checkBlock(), data, m_blockUnpackFn, GctBlockHeader::nSamples(), and edm::second().

605 {
606  // if the block has no time samples, don't bother with it.
607  if ( hdr.nSamples() < 1 ) { return true; }
608 
609  if(!checkBlock(hdr)) { return false; } // Check the block to see if it's possible to unpack.
610 
611  // The header validity check above will protect against
612  // the map::find() method returning the end of the map,
613  // assuming the block header definitions are up-to-date.
614  (this->*m_blockUnpackFn.find(hdr.blockId())->second)(data, hdr); // Calls the correct unpack function, based on block ID.
615 
616  return true;
617 }
bool checkBlock(const GctBlockHeader &hdr) const
Performs checks on the block header to see if the block is possible to unpack or not.
static BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
U second(std::pair< T, U > const &p)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
uint32_t blockId() const
Get the block ID.
uint32_t nSamples() const
Get the number of time samples.
GctBlockHeader GctFormatTranslateV38::generateBlockHeader ( const unsigned char *  data) const
virtual

Generate a block header from four 8-bit values.

Implements GctFormatTranslateBase.

Definition at line 576 of file GctFormatTranslateV38.cc.

References blockLengthMap(), and TrackValidation_HighPurity_cff::valid.

577 {
578  // Turn the four 8-bit header words into the full 32-bit header.
579  uint32_t hdr = data[0] + (data[1]<<8) + (data[2]<<16) + (data[3]<<24);
580 
581 // Bit mapping of V35 header:
582 // --------------------------
583 // 11:0 => block_id Unique pipeline identifier.
584 // - 3:0 =>> pipe_id There can be up to 16 different pipelines per FPGA.
585 // - 6:4 =>> reserved Do not use yet. Set to zero.
586 // - 11:7 =>> fpga geograpical add The VME geographical address of the FPGA.
587 // 15:12 => event_id Determined locally. Not reset by Resync.
588 // 19:16 => number_of_time_samples If time samples 15 or more then value = 15.
589 // 31:20 => event_bcid The bunch crossing the data was recorded.
590 
591  unsigned blockId = hdr & 0xfff;
592  unsigned blockLength = 0; // Set to zero until we know it's a valid block
593  unsigned nSamples = (hdr>>16) & 0xf;
594  unsigned bxId = (hdr>>20) & 0xfff;
595  unsigned eventId = (hdr>>12) & 0xf;
596  bool valid = (blockLengthMap().find(blockId) != blockLengthMap().end());
597 
598  if(valid) { blockLength = blockLengthMap().find(blockId)->second; }
599 
600  return GctBlockHeader(blockId, blockLength, nSamples, bxId, eventId, valid);
601 }
Simple class for holding the basic attributes of an 32-bit block header.
virtual BlockLengthMap & blockLengthMap()
get the static block ID to block-length map.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
uint32_t GctFormatTranslateV38::generateRawHeader ( const uint32_t  blockId,
const uint32_t  nSamples,
const uint32_t  bxId,
const uint32_t  eventId 
) const
protectedvirtual

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 622 of file GctFormatTranslateV38.cc.

626 {
627  // Bit mapping of V35 header:
628  // --------------------------
629  // 11:0 => block_id Unique pipeline identifier.
630  // - 3:0 =>> pipe_id There can be up to 16 different pipelines per FPGA.
631  // - 6:4 =>> reserved Do not use yet. Set to zero.
632  // - 11:7 =>> fpga geograpical add The VME geographical address of the FPGA.
633  // 15:12 => event_id Determined locally. Not reset by Resync.
634  // 19:16 => number_of_time_samples If time samples 15 or more then value = 15.
635  // 31:20 => event_bxId The bunch crossing the data was recorded.
636 
637  return ((bxId & 0xfff) << 20) | ((nSamples & 0xf) << 16) | ((eventId & 0xf) << 12) | (blockId & 0xfff);
638 }
virtual BlockIdToEmCandIsoBoundMap& GctFormatTranslateV38::internEmIsoBounds ( )
inlineprotectedvirtual

get the static intern EM cand isolated boundary map.

Implements GctFormatTranslateBase.

Definition at line 66 of file GctFormatTranslateV38.h.

References m_internEmIsoBounds.

Referenced by blockToGctInternEmCand().

virtual const BlockIdToEmCandIsoBoundMap& GctFormatTranslateV38::internEmIsoBounds ( ) const
inlineprotectedvirtual

get the static intern EM cand isolated boundary map.

Implements GctFormatTranslateBase.

Definition at line 67 of file GctFormatTranslateV38.h.

References m_internEmIsoBounds.

virtual BlkToRctCrateMap& GctFormatTranslateV38::rctEmCrateMap ( )
inlineprotectedvirtual

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

Implements GctFormatTranslateBase.

Definition at line 60 of file GctFormatTranslateV38.h.

References m_rctEmCrate.

Referenced by blockToRctEmCand().

virtual const BlkToRctCrateMap& GctFormatTranslateV38::rctEmCrateMap ( ) const
inlineprotectedvirtual

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

Implements GctFormatTranslateBase.

Definition at line 61 of file GctFormatTranslateV38.h.

References m_rctEmCrate.

virtual BlkToRctCrateMap& GctFormatTranslateV38::rctJetCrateMap ( )
inlineprotectedvirtual

get the static block ID to RCT crate map for jets

Implements GctFormatTranslateBase.

Definition at line 63 of file GctFormatTranslateV38.h.

References m_rctJetCrate.

Referenced by blockToRctCaloRegions().

virtual const BlkToRctCrateMap& GctFormatTranslateV38::rctJetCrateMap ( ) const
inlineprotectedvirtual

get the static block ID to RCT crate map for jets

Implements GctFormatTranslateBase.

Definition at line 64 of file GctFormatTranslateV38.h.

References m_rctJetCrate.

Member Data Documentation

GctFormatTranslateV38::BlockLengthMap GctFormatTranslateV38::m_blockLength = GctFormatTranslateV38::BlockLengthMap()
staticprivate

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

Definition at line 91 of file GctFormatTranslateV38.h.

Referenced by blockLengthMap(), and GctFormatTranslateV38().

GctFormatTranslateV38::BlockNameMap GctFormatTranslateV38::m_blockName = GctFormatTranslateV38::BlockNameMap()
staticprivate

Map to hold a description for each block number.

Definition at line 94 of file GctFormatTranslateV38.h.

Referenced by blockNameMap(), and GctFormatTranslateV38().

GctFormatTranslateV38::BlockIdToUnpackFnMap GctFormatTranslateV38::m_blockUnpackFn = GctFormatTranslateV38::BlockIdToUnpackFnMap()
staticprivate

Block ID to unpack function map.

Definition at line 107 of file GctFormatTranslateV38.h.

Referenced by convertBlock(), and GctFormatTranslateV38().

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 104 of file GctFormatTranslateV38.h.

Referenced by GctFormatTranslateV38(), and internEmIsoBounds().

const unsigned GctFormatTranslateV38::m_numberOfGctSamplesToUnpack
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 110 of file GctFormatTranslateV38.h.

Referenced by blockToGctEmCandsAndEnergySums(), and blockToGctJetCandsAndCounts().

const unsigned GctFormatTranslateV38::m_numberOfRctSamplesToUnpack
private

Definition at line 113 of file GctFormatTranslateV38.h.

GctFormatTranslateV38::BlkToRctCrateMap GctFormatTranslateV38::m_rctEmCrate = GctFormatTranslateV38::BlkToRctCrateMap()
staticprivate

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

Definition at line 97 of file GctFormatTranslateV38.h.

Referenced by GctFormatTranslateV38(), and rctEmCrateMap().

GctFormatTranslateV38::BlkToRctCrateMap GctFormatTranslateV38::m_rctJetCrate = GctFormatTranslateV38::BlkToRctCrateMap()
staticprivate

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

Definition at line 100 of file GctFormatTranslateV38.h.

Referenced by GctFormatTranslateV38(), and rctJetCrateMap().