CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
UCTCTP7RawData Class Reference

#include <UCTCTP7RawData.h>

Public Types

enum  CaloType {
  EBEE = 0, HBHE, HF, EBEE = 0,
  HBHE, HF
}
 
enum  CaloType {
  EBEE = 0, HBHE, HF, EBEE = 0,
  HBHE, HF
}
 

Public Member Functions

uint32_t caloLinkBXID ()
 
const uint32_t * dataPtr () const
 
const uint32_t * dataPtr () const
 
uint32_t getET (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getET (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getFB (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getFB (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getFeatureIndex (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
size_t getFeatureIndex (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getHFFeatureBits (bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getHFFeatureBits (bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getIndex (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
size_t getIndex (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getLinkStatus (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t getLinkStatus (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool getRegionEGVeto (bool negativeEta, uint32_t region)
 
bool getRegionEGVeto (bool negativeEta, uint32_t region)
 
uint32_t getRegionET (bool negativeEta, uint32_t region)
 
uint32_t getRegionET (bool negativeEta, uint32_t region)
 
uint32_t getRegionHitLocation (bool negativeEta, uint32_t region)
 
uint32_t getRegionHitLocation (bool negativeEta, uint32_t region)
 
uint32_t getRegionSummary (bool negativeEta, uint32_t region)
 
uint32_t getRegionSummary (bool negativeEta, uint32_t region)
 
bool getRegionTauVeto (bool negativeEta, uint32_t region)
 
bool getRegionTauVeto (bool negativeEta, uint32_t region)
 
uint32_t getSummaryIndex (bool negativeEta, uint32_t region)
 
size_t getSummaryIndex (bool negativeEta, uint32_t region)
 
bool isLinkDown (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkDown (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkInError (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkInError (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkMasked (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkMasked (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkMisaligned (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isLinkMisaligned (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isTowerMasked (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
bool isTowerMasked (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
 
uint32_t nBXPerL1A ()
 
void print ()
 
void setET (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi, uint32_t et)
 
void setFB (CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi, uint32_t fb)
 
void setHFFeatureBits (bool negativeEta, uint32_t cEta, uint32_t iPhi, uint32_t fb)
 
void setRegionSummary (bool negativeEta, uint32_t region, uint32_t regionData)
 
uint32_t sof ()
 
uint32_t sof ()
 
 UCTCTP7RawData (const uint32_t *d)
 
 UCTCTP7RawData (const uint32_t *d)
 
 UCTCTP7RawData (uint32_t *d)
 
virtual ~UCTCTP7RawData ()
 
virtual ~UCTCTP7RawData ()
 

Private Member Functions

const UCTCTP7RawDataoperator= (const UCTCTP7RawData &i)=delete
 
const UCTCTP7RawDataoperator= (const UCTCTP7RawData &i)=delete
 
 UCTCTP7RawData (const UCTCTP7RawData &)=delete
 
 UCTCTP7RawData (const UCTCTP7RawData &)=delete
 

Private Attributes

const uint32_t * myDataPtr
 
uint32_t * myDataWritePtr = nullptr
 

Detailed Description

Definition at line 7 of file UCTCTP7RawData.h.

Member Enumeration Documentation

◆ CaloType [1/2]

Enumerator
EBEE 
HBHE 
HF 
EBEE 
HBHE 
HF 

Definition at line 9 of file UCTCTP7RawData.h.

9 { EBEE = 0, HBHE, HF };

◆ CaloType [2/2]

Enumerator
EBEE 
HBHE 
HF 
EBEE 
HBHE 
HF 

Definition at line 9 of file UCTCTP7RawData.h.

9 { EBEE = 0, HBHE, HF };

Constructor & Destructor Documentation

◆ UCTCTP7RawData() [1/5]

UCTCTP7RawData::UCTCTP7RawData ( const uint32_t *  d)
inline

Definition at line 12 of file UCTCTP7RawData.h.

12  : myDataPtr(d) {
13  if (myDataPtr == nullptr) {
14  edm::LogError("UCTCTP7RawData") << "You gave me a nullptr :<";
15  }
16  }

References myDataPtr.

◆ UCTCTP7RawData() [2/5]

UCTCTP7RawData::UCTCTP7RawData ( uint32_t *  d)
inline

Definition at line 18 of file UCTCTP7RawData.h.

19  if (myDataPtr == nullptr) {
20  edm::LogError("UCTCTP7RawData") << "You gave me a nullptr :<";
21  }
22  }

References myDataPtr.

◆ ~UCTCTP7RawData() [1/2]

virtual UCTCTP7RawData::~UCTCTP7RawData ( )
inlinevirtual

Definition at line 24 of file UCTCTP7RawData.h.

24 { ; }

◆ UCTCTP7RawData() [3/5]

UCTCTP7RawData::UCTCTP7RawData ( const UCTCTP7RawData )
privatedelete

◆ UCTCTP7RawData() [4/5]

UCTCTP7RawData::UCTCTP7RawData ( const uint32_t *  d)
inline

Definition at line 11 of file UCTCTP7RawData.h.

11  : myDataPtr(d) {
12  if (myDataPtr != nullptr) {
13  if (sof() != 0xA110CA7E) {
14  edm::LogError("UCTCTP7RawData") << "Failed to see 0xA110CA7E at start - but continuing" << std::endl;
15  }
16  }
17  }

References myDataPtr, and sof().

◆ ~UCTCTP7RawData() [2/2]

virtual UCTCTP7RawData::~UCTCTP7RawData ( )
inlinevirtual

Definition at line 19 of file UCTCTP7RawData.h.

19 { ; }

◆ UCTCTP7RawData() [5/5]

UCTCTP7RawData::UCTCTP7RawData ( const UCTCTP7RawData )
privatedelete

Member Function Documentation

◆ caloLinkBXID()

uint32_t UCTCTP7RawData::caloLinkBXID ( )
inline

Definition at line 27 of file UCTCTP7RawData.h.

27 { return (myDataPtr[1] & 0x00000FFF); }

References myDataPtr.

Referenced by print().

◆ dataPtr() [1/2]

const uint32_t* UCTCTP7RawData::dataPtr ( ) const
inline

Definition at line 23 of file UCTCTP7RawData.h.

23 { return myDataPtr; }

References myDataPtr.

◆ dataPtr() [2/2]

const uint32_t* UCTCTP7RawData::dataPtr ( ) const
inline

Definition at line 28 of file UCTCTP7RawData.h.

28 { return myDataPtr; }

References myDataPtr.

◆ getET() [1/2]

uint32_t UCTCTP7RawData::getET ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 134 of file UCTCTP7RawData.h.

134  {
135  uint32_t index = getIndex(cType, negativeEta, cEta, iPhi);
136  const uint32_t data = myDataPtr[index];
137  uint32_t et = 0xDEADBEEF;
138  if (cType == HF) {
139  // Pick out the correct 8-bits for the iEta chosen
140  // Note that cEta = 41 is special, it only occurs for iPhi == 1 and shares cEta = 40 position
141  if (cEta == 41)
142  et = ((data >> 16) & 0xFF);
143  else
144  et = ((data >> ((cEta - 30) % 4) * 8) & 0xFF);
145  } else {
146  // Pick out the correct 8-bits for the iPhi chosen
147  et = ((data >> (iPhi * 8)) & 0xFF);
148  }
149  return et;
150  }

References data, EgHLTOffHistBins_cfi::et, getIndex(), HF, and myDataPtr.

◆ getET() [2/2]

uint32_t UCTCTP7RawData::getET ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 166 of file UCTCTP7RawData.h.

166  {
167  size_t index = getIndex(cType, negativeEta, cEta, iPhi);
168  const uint32_t data = myDataPtr[index];
169  uint32_t et = 0xDEADBEEF;
170  if (cType == HF) {
171  // Pick out the correct 8-bits for the iEta chosen
172  // Note that cEta = 41 is special, it only occurs for iPhi == 1 and shares cEta = 40 position
173  if (cEta == 41)
174  et = ((data >> 16) & 0xFF);
175  else
176  et = ((data >> ((cEta - 30) % 4) * 8) & 0xFF);
177  } else {
178  // Pick out the correct 8-bits for the iPhi chosen
179  et = ((data >> (iPhi * 8)) & 0xFF);
180  }
181  return et;
182  }

References data, EgHLTOffHistBins_cfi::et, getIndex(), HF, and myDataPtr.

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), L1TCaloLayer1RawToDigi::makeHFTPGs(), and print().

◆ getFB() [1/2]

uint32_t UCTCTP7RawData::getFB ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 152 of file UCTCTP7RawData.h.

152  {
153  uint32_t index = getFeatureIndex(cType, negativeEta, cEta, iPhi);
154  const uint32_t data = myDataPtr[index];
155  uint32_t fb = 0;
156  if (cType == HF) {
157  fb = getHFFeatureBits(negativeEta, cEta, iPhi);
158  } else {
159  // Pick out the correct bit for the tower chosen
160  uint32_t tower = iPhi;
161  if (((cEta - 1) % 2) == 1) {
162  tower += 4;
163  }
164  fb = ((data & (0x1 << tower)) != 0) ? 1 : 0;
165  }
166  return fb;
167  }

References data, getFeatureIndex(), getHFFeatureBits(), HF, myDataPtr, and hgcalTowerProducer_cfi::tower.

◆ getFB() [2/2]

uint32_t UCTCTP7RawData::getFB ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 203 of file UCTCTP7RawData.h.

203  {
204  size_t index = getFeatureIndex(cType, negativeEta, cEta, iPhi);
205  const uint32_t data = myDataPtr[index];
206  uint32_t fb = 0;
207  if (cType == HF) {
208  fb = getHFFeatureBits(negativeEta, cEta, iPhi);
209  } else {
210  // Pick out the correct bit for the tower chosen
211  uint32_t tower = iPhi;
212  if (((cEta - 1) % 2) == 1) {
213  tower += 4;
214  }
215  fb = ((data & (0x1 << tower)) != 0) ? 1 : 0;
216  }
217  return fb;
218  }

References data, getFeatureIndex(), getHFFeatureBits(), HF, myDataPtr, and hgcalTowerProducer_cfi::tower.

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), L1TCaloLayer1RawToDigi::makeHFTPGs(), and print().

◆ getFeatureIndex() [1/2]

uint32_t UCTCTP7RawData::getFeatureIndex ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 102 of file UCTCTP7RawData.h.

102  {
103  // Get index into the data words for the tower
104  uint32_t index = getIndex(cType, negativeEta, cEta, iPhi);
105  if (cType == EBEE || cType == HBHE) {
106  // Two 32-bit words contain ET, so we should offset the index to
107  // to the feature and link status bits
108  if (((cEta - 1) % 2) == 0) {
109  // [index] is offset to ET of first four towers (0 - 3)
110  // [index + 2] is where the feature and link status bits are
111  index += 2;
112  } else {
113  // In this case [index] is offset to ET of second four towers (4 - 7)
114  // [index + 1] is where the feature and link status bits are
115  index += 1;
116  }
117  } else if (cType == HF) {
118  // HF Fragment has different structure than EBEE and HBHE fragments
119  // First three 32-bit words have ETs for 11 objects (yes, 11 not 12)
120  // cEta = 40 / 41 are double in eta and flop bettween a and b HF fragments
121  // Further the remaining upper byte of the third word actually has feature
122  // bits. This feature index will point to the 4th 32-bit word. It is
123  // expected that the top byte from 3rd 32-bit word will be patched in within
124  // the feature bit access function.
125  // Since there are three instead of if block as above for EBEE, HBHE
126  // I wrote here a more compact implementation of index computation.
127  index += (3 - ((cEta - 30) / 4));
128  } else {
129  return 0xDEADBEEF;
130  }
131  return index;
132  }

References EBEE, getIndex(), HBHE, and HF.

◆ getFeatureIndex() [2/2]

size_t UCTCTP7RawData::getFeatureIndex ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 105 of file UCTCTP7RawData.h.

105  {
106  // Get index into the data words for the tower
107  size_t index = getIndex(cType, negativeEta, cEta, iPhi);
108  if (cType == EBEE || cType == HBHE) {
109  // Two 32-bit words contain ET, so we should offset the index to
110  // to the feature and link status bits
111  if (((cEta - 1) % 2) == 0) {
112  // [index] is offset to ET of first four towers (0 - 3)
113  // [index + 2] is where the feature and link status bits are
114  index += 2;
115  } else {
116  // In this case [index] is offset to ET of second four towers (4 - 7)
117  // [index + 1] is where the feature and link status bits are
118  index += 1;
119  }
120  } else if (cType == HF) {
121  // HF Fragment has different structure than EBEE and HBHE fragments
122  // First three 32-bit words have ETs for 11 objects (yes, 11 not 12)
123  // cEta = 40 / 41 are double in eta and flop bettween a and b HF fragments
124  // Further the remaining upper byte of the third word actually has feature
125  // bits. This feature index will point to the 4th 32-bit word. It is
126  // expected that the top byte from 3rd 32-bit word will be patched in within
127  // the feature bit access function.
128  // Since there are three instead of if block as above for EBEE, HBHE
129  // I wrote here a more compact implementation of index computation.
130  index += (3 - ((cEta - 30) / 4));
131  if (index == 0) {
132  // Since we sticth index-1, zero is also illegal
133  edm::LogError("UCTCTP7RawData") << "Managed to calculate an out-of-bounds index, buyer beware";
134  }
135  } else {
136  // Unknown calotype error already generated in getIndex()
137  return 0;
138  }
139  if (index >= 192) {
140  edm::LogError("UCTCTP7RawData") << "Managed to calculate an out-of-bounds index, buyer beware";
141  }
142  return index;
143  }

References EBEE, getIndex(), HBHE, and HF.

Referenced by getFB(), getHFFeatureBits(), getLinkStatus(), setFB(), and setHFFeatureBits().

◆ getHFFeatureBits() [1/2]

uint32_t UCTCTP7RawData::getHFFeatureBits ( bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 169 of file UCTCTP7RawData.h.

169  {
170  uint32_t index = getFeatureIndex(HF, negativeEta, cEta, iPhi);
171  // Stitch together the top 8 bits from previous 32-bit word and bottom 14 bits from this word
172  const uint32_t data = ((myDataPtr[index] & 0x3FFF) << 8) + (myDataPtr[index - 1] >> 24);
173  uint32_t shift = (cEta - 30) * 2;
174  if (cEta == 41)
175  shift = 20; // 41 occurs on b-fiber but shares the position of 40
176  return ((data >> shift) & 0x3);
177  }

References data, getFeatureIndex(), HF, myDataPtr, and edm::shift.

◆ getHFFeatureBits() [2/2]

uint32_t UCTCTP7RawData::getHFFeatureBits ( bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 238 of file UCTCTP7RawData.h.

238  {
239  size_t index = getFeatureIndex(HF, negativeEta, cEta, iPhi);
240  // Stitch together the top 8 bits from previous 32-bit word and bottom 14 bits from this word
241  const uint32_t data = ((myDataPtr[index] & 0x3FFF) << 8) + (myDataPtr[index - 1] >> 24);
242  uint32_t shift = (cEta - 30) * 2;
243  if (cEta == 41)
244  shift = 20; // 41 occurs on b-fiber but shares the position of 40
245  return ((data >> shift) & 0x3);
246  }

References data, getFeatureIndex(), HF, myDataPtr, and edm::shift.

Referenced by getFB(), and print().

◆ getIndex() [1/2]

uint32_t UCTCTP7RawData::getIndex ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 31 of file UCTCTP7RawData.h.

31  {
32  uint32_t index = 0xDEADBEEF;
33  if (cType == EBEE || cType == HBHE) {
34  if (iPhi > 3) {
35  edm::LogError("UCTCTP7RawData") << "Incorrect iPhi; iPhi = " << iPhi << "; should be in [0,3]" << std::endl;
36  return 0xDEADBEEF;
37  }
38  if (cEta < 1 || cEta > 28) {
39  edm::LogError("UCTCTP7RawData") << "Incorrect caloEta; cEta = " << cEta << "; should be in [1-28]" << std::endl;
40  return 0xDEADBEEF;
41  }
42  // ECAL/HB+HE fragment size is 3 32-bit words
43  // Each fragment covers 2 eta and 4 phi towers
44  // All four phi towers are in one 32-bit word
45  // Even and odd eta are in neighboring 32-bit words
46  index = 2 + (((cEta - 1) / 2) * (3 + 3) + ((cEta - 1) % 2));
47  // But, towers are arranged in a peculiar order for firmware
48  // convenience - the index needs to be computing with these
49  // if statements. This is brittle code that one should be
50  // very careful with.
51  if (negativeEta) {
52  // Add offset for 6 ECAL and 6 HCAL fragments
53  index += (6 * (3 + 3));
54  } else {
55  if (cEta > 12) {
56  // Add offset for 14 ECAL, 14 HB+HE and 2 HF fragments
57  // Note that first six are included in the definition of
58  // the variable - index
59  // Note also that HF fragments are larger at 4 32-bit words
60  index += ((14 * (3 + 3) + (2 * 4)));
61  }
62  }
63  // Data starts with ECAL towers so offset by 3 additional 32-bit words
64  if (cType == HBHE)
65  index += 3;
66  } else if (cType == HF) {
67  if (iPhi > 1) {
68  edm::LogError("UCTCTP7RawData") << "HF iPhi should be 0 or 1 (for a , b) - invalid iPhi = " << iPhi
69  << std::endl;
70  return 0xDEADBEEF;
71  }
72  if (cEta < 30 || cEta > 41) {
73  edm::LogError("UCTCTP7RawData") << "HF cEta should be between 30 and 41 - invalid cEta = " << cEta << std::endl;
74  return 0xDEADBEEF;
75  }
76  if (negativeEta) {
77  if (iPhi == 0) {
78  // Offset by 6 positive eta and 14 negative eta EBEE/HBHE fragments (each 3 32-bit words)
79  // There are four HF cEta towers packed in each 32-bit word
80  // Add additional offset of 1 for (34-37) and 2 for (38-41)
81  index = 2 + 20 * (3 + 3) + ((cEta - 30) / 4);
82  } else {
83  // Additional HF a fragment offset for HF b channel
84  index = 2 + 20 * (3 + 3) + 1 * 4 + ((cEta - 30) / 4);
85  }
86  } else {
87  if (iPhi == 0) {
88  // Offset by all EBEE/HBHE and two HF fragments (4 32-bit words)
89  index = 2 + 2 * 14 * (3 + 3) + 2 * 4 + ((cEta - 30) / 4);
90  } else {
91  // Additional HF a fragment offset for HF b channel
92  index = 2 + 2 * 14 * (3 + 3) + 3 * 4 + ((cEta - 30) / 4);
93  }
94  }
95  } else {
96  edm::LogError("UCTCTP7RawData") << "Unknown CaloType " << cType << std::endl;
97  return 0xDEADBEEF;
98  }
99  return index;
100  }

References EBEE, HBHE, and HF.

◆ getIndex() [2/2]

size_t UCTCTP7RawData::getIndex ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 32 of file UCTCTP7RawData.h.

32  {
33  size_t index = 0;
34  if (cType == EBEE || cType == HBHE) {
35  if (iPhi > 3) {
36  edm::LogError("UCTCTP7RawData") << "Incorrect iPhi; iPhi = " << iPhi << "; should be in [0,3]";
37  return index;
38  }
39  if (cEta < 1 || cEta > 28) {
40  edm::LogError("UCTCTP7RawData") << "Incorrect caloEta; cEta = " << cEta << "; should be in [1-28]";
41  return index;
42  }
43  // ECAL/HB+HE fragment size is 3 32-bit words
44  // Each fragment covers 2 eta and 4 phi towers
45  // All four phi towers are in one 32-bit word
46  // Even and odd eta are in neighboring 32-bit words
47  index = (((cEta - 1) / 2) * (3 + 3) + ((cEta - 1) % 2));
48  // But, towers are arranged in a peculiar order for firmware
49  // convenience - the index needs to be computing with these
50  // if statements. This is brittle code that one should be
51  // very careful with.
52  if (negativeEta) {
53  // Add offset for 6 ECAL and 6 HCAL fragments
54  index += (6 * (3 + 3));
55  } else {
56  if (cEta > 12) {
57  // Add offset for 14 ECAL, 14 HB+HE and 2 HF fragments
58  // Note that first six are included in the definition of
59  // the variable - index
60  // Note also that HF fragments are larger at 4 32-bit words
61  index += ((14 * (3 + 3) + (2 * 4)));
62  }
63  }
64  // Data starts with ECAL towers so offset by 3 additional 32-bit words
65  if (cType == HBHE)
66  index += 3;
67  } else if (cType == HF) {
68  if (iPhi > 1) {
69  edm::LogError("UCTCTP7RawData") << "HF iPhi should be 0 or 1 (for a , b) - invalid iPhi = " << iPhi;
70  return index;
71  }
72  if (cEta < 30 || cEta > 41) {
73  edm::LogError("UCTCTP7RawData") << "HF cEta should be between 30 and 41 - invalid cEta = " << cEta;
74  return index;
75  }
76  if (negativeEta) {
77  if (iPhi == 0) {
78  // Offset by 6 positive eta and 14 negative eta EBEE/HBHE fragments (each 3 32-bit words)
79  // There are four HF cEta towers packed in each 32-bit word
80  // Add additional offset of 1 for (34-37) and 2 for (38-41)
81  index = 20 * (3 + 3) + ((cEta - 30) / 4);
82  } else {
83  // Additional HF a fragment offset for HF b channel
84  index = 20 * (3 + 3) + 1 * 4 + ((cEta - 30) / 4);
85  }
86  } else {
87  if (iPhi == 0) {
88  // Offset by all EBEE/HBHE and two HF fragments (4 32-bit words)
89  index = 2 * 14 * (3 + 3) + 2 * 4 + ((cEta - 30) / 4);
90  } else {
91  // Additional HF a fragment offset for HF b channel
92  index = 2 * 14 * (3 + 3) + 3 * 4 + ((cEta - 30) / 4);
93  }
94  }
95  } else {
96  edm::LogError("UCTCTP7RawData") << "Unknown CaloType " << cType;
97  return index;
98  }
99  if (index >= 192) {
100  edm::LogError("UCTCTP7RawData") << "Managed to calculate an out-of-bounds index, buyer beware";
101  }
102  return index;
103  }

References EBEE, HBHE, and HF.

Referenced by getET(), getFeatureIndex(), print(), and setET().

◆ getLinkStatus() [1/2]

uint32_t UCTCTP7RawData::getLinkStatus ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 179 of file UCTCTP7RawData.h.

179  {
180  uint32_t index = getFeatureIndex(cType, negativeEta, cEta, iPhi);
181  const uint32_t data = myDataPtr[index];
182  return (data >> 16);
183  }

References data, getFeatureIndex(), and myDataPtr.

◆ getLinkStatus() [2/2]

uint32_t UCTCTP7RawData::getLinkStatus ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 248 of file UCTCTP7RawData.h.

248  {
249  size_t index = getFeatureIndex(cType, negativeEta, cEta, iPhi);
250  const uint32_t data = myDataPtr[index];
251  return (data >> 16);
252  }

References data, getFeatureIndex(), and myDataPtr.

Referenced by isLinkDown(), isLinkInError(), isLinkMasked(), isLinkMisaligned(), isTowerMasked(), and print().

◆ getRegionEGVeto() [1/2]

bool UCTCTP7RawData::getRegionEGVeto ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 200 of file UCTCTP7RawData.h.

200 { return (getRegionSummary(negativeEta, region) & 0x0400); }

References getRegionSummary(), and HLT_FULL_cff::region.

◆ getRegionEGVeto() [2/2]

bool UCTCTP7RawData::getRegionEGVeto ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 282 of file UCTCTP7RawData.h.

282 { return (getRegionSummary(negativeEta, region) & 0x0400); }

References getRegionSummary(), and HLT_FULL_cff::region.

Referenced by print().

◆ getRegionET() [1/2]

uint32_t UCTCTP7RawData::getRegionET ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 198 of file UCTCTP7RawData.h.

198 { return (getRegionSummary(negativeEta, region) & 0x3FF); }

References getRegionSummary(), and HLT_FULL_cff::region.

◆ getRegionET() [2/2]

uint32_t UCTCTP7RawData::getRegionET ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 280 of file UCTCTP7RawData.h.

280 { return (getRegionSummary(negativeEta, region) & 0x3FF); }

References getRegionSummary(), and HLT_FULL_cff::region.

Referenced by print().

◆ getRegionHitLocation() [1/2]

uint32_t UCTCTP7RawData::getRegionHitLocation ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 204 of file UCTCTP7RawData.h.

204  {
205  return ((getRegionSummary(negativeEta, region) & 0xF000) >> 12);
206  }

References getRegionSummary(), and HLT_FULL_cff::region.

◆ getRegionHitLocation() [2/2]

uint32_t UCTCTP7RawData::getRegionHitLocation ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 286 of file UCTCTP7RawData.h.

286  {
287  return ((getRegionSummary(negativeEta, region) & 0xF000) >> 12);
288  }

References getRegionSummary(), and HLT_FULL_cff::region.

Referenced by print().

◆ getRegionSummary() [1/2]

uint32_t UCTCTP7RawData::getRegionSummary ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 192 of file UCTCTP7RawData.h.

192  {
193  uint32_t index = getSummaryIndex(negativeEta, region);
194  const uint32_t data = myDataPtr[index];
195  return ((data >> (16 * (region % 2))) & 0xFFFF);
196  }

References data, getSummaryIndex(), myDataPtr, and HLT_FULL_cff::region.

◆ getRegionSummary() [2/2]

uint32_t UCTCTP7RawData::getRegionSummary ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 274 of file UCTCTP7RawData.h.

274  {
275  size_t index = getSummaryIndex(negativeEta, region);
276  const uint32_t data = myDataPtr[index];
277  return ((data >> (16 * (region % 2))) & 0xFFFF);
278  }

References data, getSummaryIndex(), myDataPtr, and HLT_FULL_cff::region.

Referenced by getRegionEGVeto(), getRegionET(), getRegionHitLocation(), getRegionTauVeto(), l1t::stage2::CaloLayer1Unpacker::makeRegions(), and L1TCaloLayer1RawToDigi::makeRegions().

◆ getRegionTauVeto() [1/2]

bool UCTCTP7RawData::getRegionTauVeto ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 202 of file UCTCTP7RawData.h.

202 { return (getRegionSummary(negativeEta, region) & 0x0800); }

References getRegionSummary(), and HLT_FULL_cff::region.

◆ getRegionTauVeto() [2/2]

bool UCTCTP7RawData::getRegionTauVeto ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 284 of file UCTCTP7RawData.h.

284 { return (getRegionSummary(negativeEta, region) & 0x0800); }

References getRegionSummary(), and HLT_FULL_cff::region.

Referenced by print().

◆ getSummaryIndex() [1/2]

uint32_t UCTCTP7RawData::getSummaryIndex ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 185 of file UCTCTP7RawData.h.

185  {
186  uint32_t index = 2 + 2 * 14 * (3 + 3) + 4 * 4 + (region / 2);
187  if (negativeEta)
188  index += 4;
189  return index;
190  }

References HLT_FULL_cff::region.

◆ getSummaryIndex() [2/2]

size_t UCTCTP7RawData::getSummaryIndex ( bool  negativeEta,
uint32_t  region 
)
inline

Definition at line 254 of file UCTCTP7RawData.h.

254  {
255  size_t index = 2 * 14 * (3 + 3) + 4 * 4 + (region / 2);
256  if (negativeEta)
257  index += 4;
258  if (index >= 192) {
259  edm::LogError("UCTCTP7RawData") << "Managed to calculate an out-of-bounds index, buyer beware";
260  }
261  return index;
262  }

References HLT_FULL_cff::region.

Referenced by getRegionSummary(), and setRegionSummary().

◆ isLinkDown() [1/2]

bool UCTCTP7RawData::isLinkDown ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 237 of file UCTCTP7RawData.h.

237  {
238  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
239  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
240  return ((linkStatus & 0x00000400) != 0);
241  }
242  return ((linkStatus & 0x00004000) != 0);
243  }

References EBEE, and getLinkStatus().

◆ isLinkDown() [2/2]

bool UCTCTP7RawData::isLinkDown ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 319 of file UCTCTP7RawData.h.

319  {
320  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
321  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
322  return ((linkStatus & 0x00000400) != 0);
323  }
324  return ((linkStatus & 0x00004000) != 0);
325  }

References EBEE, and getLinkStatus().

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), and L1TCaloLayer1RawToDigi::makeHFTPGs().

◆ isLinkInError() [1/2]

bool UCTCTP7RawData::isLinkInError ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 229 of file UCTCTP7RawData.h.

229  {
230  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
231  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
232  return ((linkStatus & 0x00000200) != 0);
233  }
234  return ((linkStatus & 0x00002000) != 0);
235  }

References EBEE, and getLinkStatus().

◆ isLinkInError() [2/2]

bool UCTCTP7RawData::isLinkInError ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 311 of file UCTCTP7RawData.h.

311  {
312  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
313  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
314  return ((linkStatus & 0x00000200) != 0);
315  }
316  return ((linkStatus & 0x00002000) != 0);
317  }

References EBEE, and getLinkStatus().

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), and L1TCaloLayer1RawToDigi::makeHFTPGs().

◆ isLinkMasked() [1/2]

bool UCTCTP7RawData::isLinkMasked ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 245 of file UCTCTP7RawData.h.

245  {
246  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
247  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
248  return ((linkStatus & 0x00000800) != 0);
249  }
250  return ((linkStatus & 0x00008000) != 0);
251  }

References EBEE, and getLinkStatus().

◆ isLinkMasked() [2/2]

bool UCTCTP7RawData::isLinkMasked ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 327 of file UCTCTP7RawData.h.

327  {
328  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
329  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
330  return ((linkStatus & 0x00000800) != 0);
331  }
332  return ((linkStatus & 0x00008000) != 0);
333  }

References EBEE, and getLinkStatus().

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), and L1TCaloLayer1RawToDigi::makeHFTPGs().

◆ isLinkMisaligned() [1/2]

bool UCTCTP7RawData::isLinkMisaligned ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 221 of file UCTCTP7RawData.h.

221  {
222  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
223  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
224  return ((linkStatus & 0x00000100) != 0);
225  }
226  return ((linkStatus & 0x00001000) != 0);
227  }

References EBEE, and getLinkStatus().

◆ isLinkMisaligned() [2/2]

bool UCTCTP7RawData::isLinkMisaligned ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 303 of file UCTCTP7RawData.h.

303  {
304  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
305  if (cType == EBEE && (cEta == 17 || cEta == 21)) {
306  return ((linkStatus & 0x00000100) != 0);
307  }
308  return ((linkStatus & 0x00001000) != 0);
309  }

References EBEE, and getLinkStatus().

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), and L1TCaloLayer1RawToDigi::makeHFTPGs().

◆ isTowerMasked() [1/2]

bool UCTCTP7RawData::isTowerMasked ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 208 of file UCTCTP7RawData.h.

208  {
209  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
210  uint32_t tower = iPhi;
211  if (((cEta - 1) % 2) == 1)
212  tower += 4;
213  if (cType == HF) {
214  tower = (cEta - 30);
215  if (cEta == 41)
216  tower = 10;
217  }
218  return ((linkStatus & (0x1 << tower)) != 0);
219  }

References getLinkStatus(), HF, hgcalTowerProducer_cfi::tower, and testProducerWithPsetDescEmpty_cfi::x1.

◆ isTowerMasked() [2/2]

bool UCTCTP7RawData::isTowerMasked ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi 
)
inline

Definition at line 290 of file UCTCTP7RawData.h.

290  {
291  uint32_t linkStatus = getLinkStatus(cType, negativeEta, cEta, iPhi);
292  uint32_t tower = iPhi;
293  if ((cEta % 2) == 0)
294  tower += 4;
295  if (cType == HF) {
296  tower = (cEta - 30);
297  if (cEta == 41)
298  tower = 10;
299  }
300  return ((linkStatus & (0x1 << tower)) != 0);
301  }

References getLinkStatus(), HF, hgcalTowerProducer_cfi::tower, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by l1t::stage2::CaloLayer1Unpacker::makeECalTPGs(), L1TCaloLayer1RawToDigi::makeECalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHCalTPGs(), L1TCaloLayer1RawToDigi::makeHCalTPGs(), l1t::stage2::CaloLayer1Unpacker::makeHFTPGs(), and L1TCaloLayer1RawToDigi::makeHFTPGs().

◆ nBXPerL1A()

uint32_t UCTCTP7RawData::nBXPerL1A ( )
inline

Definition at line 29 of file UCTCTP7RawData.h.

29 { return ((myDataPtr[1] & 0x000F0000) >> 16); }

References myDataPtr.

Referenced by print().

◆ operator=() [1/2]

const UCTCTP7RawData& UCTCTP7RawData::operator= ( const UCTCTP7RawData i)
privatedelete

◆ operator=() [2/2]

const UCTCTP7RawData& UCTCTP7RawData::operator= ( const UCTCTP7RawData i)
privatedelete

◆ print()

void UCTCTP7RawData::print ( void  )
inline

Definition at line 253 of file UCTCTP7RawData.h.

253  {
254  using namespace std;
255  edm::LogError("UCTCTP7RawData") << "CTP7 Payload Header:" << endl;
256  edm::LogError("UCTCTP7RawData") << "No BX per L1A = " << dec << nBXPerL1A() << endl;
257  edm::LogError("UCTCTP7RawData") << "Calo BX ID = " << dec << caloLinkBXID() << endl;
258  CaloType cType = EBEE;
259  bool negativeEta = false;
260  bool first = true;
261  for (uint32_t i = 0; i < 2; i++) {
262  if (i != 0)
263  negativeEta = true;
264  first = true;
265  cType = EBEE;
266  for (uint32_t cEta = 1; cEta <= 28; cEta++) {
267  for (uint32_t iPhi = 0; iPhi < 4; iPhi++) {
268  if (getLinkStatus(cType, negativeEta, cEta, iPhi) != 0 || getET(cType, negativeEta, cEta, iPhi) != 0) {
269  if (first)
270  edm::LogError("UCTCTP7RawData") << "EcalET FG LinkStatus" << endl;
271  first = false;
272  edm::LogError("UCTCTP7RawData")
273  << dec << setfill(' ') << setw(6) << getET(cType, negativeEta, cEta, iPhi) << " "
274  << getFB(cType, negativeEta, cEta, iPhi) << " " << showbase << internal << setfill('0') << setw(10)
275  << hex << getLinkStatus(cType, negativeEta, cEta, iPhi) << " (" << dec
276  << getIndex(cType, negativeEta, cEta, iPhi) << ", " << negativeEta << ", " << cEta << ", " << iPhi
277  << ")" << endl;
278  }
279  }
280  }
281  first = true;
282  cType = HBHE;
283  for (uint32_t cEta = 1; cEta <= 28; cEta++) {
284  for (uint32_t iPhi = 0; iPhi < 4; iPhi++) {
285  if (getLinkStatus(cType, negativeEta, cEta, iPhi) != 0 || getET(cType, negativeEta, cEta, iPhi) != 0) {
286  if (first)
287  edm::LogError("UCTCTP7RawData") << "HcalET Feature LinkStatus" << endl;
288  first = false;
289  edm::LogError("UCTCTP7RawData")
290  << dec << setfill(' ') << setw(6) << getET(cType, negativeEta, cEta, iPhi) << " "
291  << getFB(cType, negativeEta, cEta, iPhi) << " " << showbase << internal << setfill('0') << setw(10)
292  << hex << getLinkStatus(cType, negativeEta, cEta, iPhi) << " (" << dec
293  << getIndex(cType, negativeEta, cEta, iPhi) << ", " << negativeEta << ", " << cEta << ", " << iPhi
294  << ")" << endl;
295  }
296  }
297  }
298  first = true;
299  cType = HF;
300  for (uint32_t cEta = 30; cEta <= 40; cEta++) {
301  for (uint32_t iPhi = 0; iPhi < 2; iPhi++) {
302  if (iPhi == 1 && cEta == 40)
303  cEta = 41;
304  if (getLinkStatus(cType, negativeEta, cEta, iPhi) != 0 || getET(cType, negativeEta, cEta, iPhi) != 0) {
305  if (first)
306  edm::LogError("UCTCTP7RawData") << "HF-ET Feature LinkStatus" << endl;
307  first = false;
308  edm::LogError("UCTCTP7RawData")
309  << dec << setfill(' ') << setw(6) << getET(cType, negativeEta, cEta, iPhi) << " " << dec
310  << setfill(' ') << setw(2) << getHFFeatureBits(negativeEta, cEta, iPhi) << " " << showbase << internal
311  << setfill('0') << setw(10) << hex << getLinkStatus(cType, negativeEta, cEta, iPhi) << " (" << dec
312  << getIndex(cType, negativeEta, cEta, iPhi) << ", " << negativeEta << ", " << cEta << ", " << iPhi
313  << ")" << endl;
314  }
315  }
316  }
317  first = true;
318  for (uint32_t region = 0; region < 7; region++) {
319  if (first)
320  edm::LogError("UCTCTP7RawData") << "Region ET EGVeto TauVeto HitLocation" << endl;
321  first = false;
322  edm::LogError("UCTCTP7RawData") << dec << setfill(' ') << setw(6) << region << " " << hex << showbase
323  << internal << setfill('0') << setw(6) << getRegionET(negativeEta, region)
324  << dec << " " << getRegionEGVeto(negativeEta, region) << " "
325  << getRegionTauVeto(negativeEta, region) << " " << showbase << internal
326  << setfill('0') << setw(3) << hex << getRegionHitLocation(negativeEta, region)
327  << endl;
328  }
329  }
330  }

References caloLinkBXID(), TauDecayModes::dec, EBEE, first, getET(), getFB(), getHFFeatureBits(), getIndex(), getLinkStatus(), getRegionEGVeto(), getRegionET(), getRegionHitLocation(), getRegionTauVeto(), HBHE, HF, mps_fire::i, nBXPerL1A(), and HLT_FULL_cff::region.

Referenced by L1TCaloLayer1RawToDigi::produce().

◆ setET()

void UCTCTP7RawData::setET ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi,
uint32_t  et 
)
inline

Definition at line 145 of file UCTCTP7RawData.h.

145  {
146  if (myDataWritePtr == nullptr) {
147  edm::LogError("UCTCTP7RawData") << "I was made in read-only mode";
148  return;
149  }
150  size_t index = getIndex(cType, negativeEta, cEta, iPhi);
151  uint32_t& data = myDataWritePtr[index];
152  if (cType == HF) {
153  // Pick out the correct 8-bits for the iEta chosen
154  // Note that cEta = 41 is special, it only occurs for iPhi == 1 and shares cEta = 40 position
155  if (cEta == 41) {
156  data |= (et & 0xFF) << 16;
157  } else {
158  data |= (et & 0xFF) << (((cEta - 30) % 4) * 8);
159  }
160  } else {
161  // Pick out the correct 8-bits for the iPhi chosen
162  data |= (et & 0xFF) << (iPhi * 8);
163  }
164  }

References data, EgHLTOffHistBins_cfi::et, getIndex(), HF, and myDataWritePtr.

Referenced by l1t::stage2::CaloLayer1Packer::makeECalTPGs(), l1t::stage2::CaloLayer1Packer::makeHCalTPGs(), and l1t::stage2::CaloLayer1Packer::makeHFTPGs().

◆ setFB()

void UCTCTP7RawData::setFB ( CaloType  cType,
bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi,
uint32_t  fb 
)
inline

Definition at line 184 of file UCTCTP7RawData.h.

184  {
185  if (myDataWritePtr == nullptr) {
186  edm::LogError("UCTCTP7RawData") << "I was made in read-only mode";
187  return;
188  }
189  if (cType == HF) {
190  setHFFeatureBits(negativeEta, cEta, iPhi, fb);
191  } else {
192  size_t index = getFeatureIndex(cType, negativeEta, cEta, iPhi);
193  uint32_t& data = myDataWritePtr[index];
194 
195  uint32_t tower = iPhi;
196  if (((cEta - 1) % 2) == 1) {
197  tower += 4;
198  }
199  data |= (fb & 0x1) << tower;
200  }
201  }

References data, getFeatureIndex(), HF, myDataWritePtr, setHFFeatureBits(), and hgcalTowerProducer_cfi::tower.

Referenced by l1t::stage2::CaloLayer1Packer::makeECalTPGs(), l1t::stage2::CaloLayer1Packer::makeHCalTPGs(), and l1t::stage2::CaloLayer1Packer::makeHFTPGs().

◆ setHFFeatureBits()

void UCTCTP7RawData::setHFFeatureBits ( bool  negativeEta,
uint32_t  cEta,
uint32_t  iPhi,
uint32_t  fb 
)
inline

Definition at line 220 of file UCTCTP7RawData.h.

220  {
221  if (myDataWritePtr == nullptr) {
222  edm::LogError("UCTCTP7RawData") << "I was made in read-only mode";
223  return;
224  }
225  size_t index = getFeatureIndex(HF, negativeEta, cEta, iPhi);
226  uint32_t shift = (cEta - 30) * 2;
227  if (cEta == 41)
228  shift = 20; // 41 occurs on b-fiber but shares the position of 40
229  if (shift >= 8) {
230  uint32_t& data = myDataWritePtr[index];
231  data |= (fb & 0x3) << (shift - 8);
232  } else {
233  uint32_t& data = myDataWritePtr[index - 1];
234  data |= (fb & 0x3) << (shift + 24);
235  }
236  }

References data, getFeatureIndex(), HF, myDataWritePtr, and edm::shift.

Referenced by setFB().

◆ setRegionSummary()

void UCTCTP7RawData::setRegionSummary ( bool  negativeEta,
uint32_t  region,
uint32_t  regionData 
)
inline

Definition at line 264 of file UCTCTP7RawData.h.

264  {
265  if (myDataWritePtr == nullptr) {
266  edm::LogError("UCTCTP7RawData") << "I was made in read-only mode";
267  return;
268  }
269  size_t index = getSummaryIndex(negativeEta, region);
270  uint32_t& data = myDataWritePtr[index];
271  data |= (regionData & 0xFFFF) << (16 * (region % 2));
272  }

References data, getSummaryIndex(), myDataWritePtr, and HLT_FULL_cff::region.

Referenced by l1t::stage2::CaloLayer1Packer::makeRegions().

◆ sof() [1/2]

uint32_t UCTCTP7RawData::sof ( )
inline

Definition at line 25 of file UCTCTP7RawData.h.

25 { return myDataPtr[0]; }

References myDataPtr.

◆ sof() [2/2]

uint32_t UCTCTP7RawData::sof ( )
inline

Definition at line 30 of file UCTCTP7RawData.h.

30 { return myDataPtr[0]; }

References myDataPtr.

Referenced by UCTCTP7RawData().

Member Data Documentation

◆ myDataPtr

const uint32_t * UCTCTP7RawData::myDataPtr
private

◆ myDataWritePtr

uint32_t* UCTCTP7RawData::myDataWritePtr = nullptr
private

Definition at line 345 of file UCTCTP7RawData.h.

Referenced by setET(), setFB(), setHFFeatureBits(), and setRegionSummary().

UCTCTP7RawData::getFeatureIndex
size_t getFeatureIndex(CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
Definition: UCTCTP7RawData.h:105
UCTCTP7RawData::HBHE
Definition: UCTCTP7RawData.h:9
mps_fire.i
i
Definition: mps_fire.py:428
UCTCTP7RawData::sof
uint32_t sof()
Definition: UCTCTP7RawData.h:30
UCTCTP7RawData::getRegionSummary
uint32_t getRegionSummary(bool negativeEta, uint32_t region)
Definition: UCTCTP7RawData.h:274
UCTCTP7RawData::getHFFeatureBits
uint32_t getHFFeatureBits(bool negativeEta, uint32_t cEta, uint32_t iPhi)
Definition: UCTCTP7RawData.h:238
UCTCTP7RawData::EBEE
Definition: UCTCTP7RawData.h:9
UCTCTP7RawData::getRegionET
uint32_t getRegionET(bool negativeEta, uint32_t region)
Definition: UCTCTP7RawData.h:280
UCTCTP7RawData::getRegionTauVeto
bool getRegionTauVeto(bool negativeEta, uint32_t region)
Definition: UCTCTP7RawData.h:284
UCTCTP7RawData::CaloType
CaloType
Definition: UCTCTP7RawData.h:9
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
UCTCTP7RawData::setHFFeatureBits
void setHFFeatureBits(bool negativeEta, uint32_t cEta, uint32_t iPhi, uint32_t fb)
Definition: UCTCTP7RawData.h:220
UCTCTP7RawData::caloLinkBXID
uint32_t caloLinkBXID()
Definition: UCTCTP7RawData.h:27
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
UCTCTP7RawData::myDataWritePtr
uint32_t * myDataWritePtr
Definition: UCTCTP7RawData.h:345
UCTCTP7RawData::getRegionEGVeto
bool getRegionEGVeto(bool negativeEta, uint32_t region)
Definition: UCTCTP7RawData.h:282
UCTCTP7RawData::getIndex
size_t getIndex(CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
Definition: UCTCTP7RawData.h:32
UCTCTP7RawData::myDataPtr
const uint32_t * myDataPtr
Definition: UCTCTP7RawData.h:343
UCTCTP7RawData::getSummaryIndex
size_t getSummaryIndex(bool negativeEta, uint32_t region)
Definition: UCTCTP7RawData.h:254
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
UCTCTP7RawData::getET
uint32_t getET(CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
Definition: UCTCTP7RawData.h:166
std
Definition: JetResolutionObject.h:76
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
UCTCTP7RawData::getFB
uint32_t getFB(CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
Definition: UCTCTP7RawData.h:203
UCTCTP7RawData::nBXPerL1A
uint32_t nBXPerL1A()
Definition: UCTCTP7RawData.h:29
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ztail.d
d
Definition: ztail.py:151
UCTCTP7RawData::getRegionHitLocation
uint32_t getRegionHitLocation(bool negativeEta, uint32_t region)
Definition: UCTCTP7RawData.h:286
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
UCTCTP7RawData::HF
Definition: UCTCTP7RawData.h:9
UCTCTP7RawData::getLinkStatus
uint32_t getLinkStatus(CaloType cType, bool negativeEta, uint32_t cEta, uint32_t iPhi)
Definition: UCTCTP7RawData.h:248