CMS 3D CMS Logo

L1GctHFRingEtSums.h
Go to the documentation of this file.
1 #ifndef L1GCTHFRINGETSUMS_H
2 #define L1GCTHFRINGETSUMS_H
3 
4 #include <ostream>
5 #include <string>
6 #include <cstdint>
7 
15 
17 public:
18  static const unsigned N_SUMS = 4;
19 
20 public:
23 
26 
30  static L1GctHFRingEtSums fromConcRingSums(const uint16_t capBlock,
31  const uint16_t capIndex,
32  const int16_t bx,
33  const uint32_t data);
34 
36  static L1GctHFRingEtSums fromGctEmulator(const int16_t bx,
37  const uint16_t etSumPosEtaRing1,
38  const uint16_t etSumNegEtaRing1,
39  const uint16_t etSumPosEtaRing2,
40  const uint16_t etSumNegEtaRing2);
41 
42  // optional named ctor for GT if required
43  // arguments to be defined
44  // static L1GctHfRingEtSums fromGtPsb()
45 
46  // get number of ring sums
47  static unsigned nSums() { return N_SUMS; }
48 
49  // getters
50 
52  uint16_t capBlock() const { return capBlock_; }
53 
55  uint16_t capIndex() const { return capIndex_; }
56 
58  int16_t bx() const { return bx_; }
59 
61  bool empty() const { return (data_ == 0); }
62 
64  uint16_t raw() const { return data_; }
65 
72  uint16_t etSum(unsigned const i) const;
73 
74  // setters
75 
77  void setCapBlock(uint16_t capBlock) { capBlock_ = capBlock; }
78 
80  void setCapIndex(uint16_t capIndex) { capIndex_ = capIndex; }
81 
83  void setBx(uint16_t bx) { bx_ = bx; }
84 
86  void setEtSum(unsigned i, uint16_t et);
87 
89  void setData(uint32_t data) { data_ = data; }
90 
92 
94  bool operator==(const L1GctHFRingEtSums& c) const;
95 
97  bool operator!=(const L1GctHFRingEtSums& c) const { return !(*this == c); }
98 
99 private:
100  // source of the data
101  uint16_t capBlock_;
102  uint16_t capIndex_;
103  int16_t bx_;
104 
105  // the captured data
106  uint16_t data_;
107 };
108 
109 std::ostream& operator<<(std::ostream& s, const L1GctHFRingEtSums& cand);
110 
111 #endif
mps_fire.i
i
Definition: mps_fire.py:428
L1GctHFRingEtSums
L1 GCT HF ring Et sums.
Definition: L1GctHFRingEtSums.h:16
L1GctHFRingEtSums::fromGctEmulator
static L1GctHFRingEtSums fromGctEmulator(const int16_t bx, const uint16_t etSumPosEtaRing1, const uint16_t etSumNegEtaRing1, const uint16_t etSumPosEtaRing2, const uint16_t etSumNegEtaRing2)
named ctor for GCT emulator
Definition: L1GctHFRingEtSums.cc:30
L1GctHFRingEtSums::capIndex_
uint16_t capIndex_
Definition: L1GctHFRingEtSums.h:102
L1GctHFRingEtSums::empty
bool empty() const
is the sum non-zero
Definition: L1GctHFRingEtSums.h:61
L1GctHFRingEtSums::~L1GctHFRingEtSums
~L1GctHFRingEtSums()
destructor
Definition: L1GctHFRingEtSums.cc:11
L1GctHFRingEtSums::setData
void setData(uint32_t data)
set the raw data
Definition: L1GctHFRingEtSums.h:89
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctHFRingEtSums::operator!=
bool operator!=(const L1GctHFRingEtSums &c) const
inequality operator
Definition: L1GctHFRingEtSums.h:97
L1GctHFRingEtSums::operator==
bool operator==(const L1GctHFRingEtSums &c) const
operators
Definition: L1GctHFRingEtSums.cc:53
L1GctHFRingEtSums::capBlock
uint16_t capBlock() const
get GCT unpacker capture block
Definition: L1GctHFRingEtSums.h:52
L1GctHFRingEtSums::etSum
uint16_t etSum(unsigned const i) const
Definition: L1GctHFRingEtSums.cc:50
L1GctHFRingEtSums::fromConcRingSums
static L1GctHFRingEtSums fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Definition: L1GctHFRingEtSums.cc:14
L1GctHFRingEtSums::nSums
static unsigned nSums()
Definition: L1GctHFRingEtSums.h:47
L1GctHFRingEtSums::capIndex
uint16_t capIndex() const
get index within GCT unpacker capture block
Definition: L1GctHFRingEtSums.h:55
L1GctHFRingEtSums::setCapBlock
void setCapBlock(uint16_t capBlock)
set cap block
Definition: L1GctHFRingEtSums.h:77
L1GctHFRingEtSums::N_SUMS
static const unsigned N_SUMS
Definition: L1GctHFRingEtSums.h:18
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctHFRingEtSums &cand)
Definition: L1GctHFRingEtSums.cc:61
cand
Definition: decayParser.h:32
L1GctHFRingEtSums::bx
int16_t bx() const
get BX number
Definition: L1GctHFRingEtSums.h:58
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1GctHFRingEtSums::setEtSum
void setEtSum(unsigned i, uint16_t et)
set a sum
Definition: L1GctHFRingEtSums.cc:56
L1GctHFRingEtSums::data_
uint16_t data_
Definition: L1GctHFRingEtSums.h:106
L1GctHFRingEtSums::capBlock_
uint16_t capBlock_
Definition: L1GctHFRingEtSums.h:101
L1GctHFRingEtSums::bx_
int16_t bx_
Definition: L1GctHFRingEtSums.h:103
L1GctHFRingEtSums::raw
uint16_t raw() const
get the raw data
Definition: L1GctHFRingEtSums.h:64
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
L1GctHFRingEtSums::setBx
void setBx(uint16_t bx)
set bx
Definition: L1GctHFRingEtSums.h:83
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
L1GctHFRingEtSums::setCapIndex
void setCapIndex(uint16_t capIndex)
set cap index
Definition: L1GctHFRingEtSums.h:80
L1GctHFRingEtSums::L1GctHFRingEtSums
L1GctHFRingEtSums()
default constructor (for vector initialisation etc.)
Definition: L1GctHFRingEtSums.cc:8