CMS 3D CMS Logo

L1GctInternHFData.h
Go to the documentation of this file.
1 #ifndef L1GCTINTERNHFDATA_H
2 #define L1GCTINTERNHFDATA_H
3 
4 #include <ostream>
5 #include <string>
6 #include <cstdint>
7 
15 
17 public:
20  null,
25  };
26 
29 
32 
33  static L1GctInternHFData fromConcRingSums(const uint16_t capBlock,
34  const uint16_t capIndex,
35  const int16_t bx,
36  const uint32_t data);
37 
38  static L1GctInternHFData fromConcBitCounts(const uint16_t capBlock,
39  const uint16_t capIndex,
40  const int16_t bx,
41  const uint32_t data);
42 
43  static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock,
44  const uint16_t capIndex,
45  const int16_t bx,
46  const uint32_t data);
47 
48  static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock,
49  const uint16_t capIndex,
50  const int16_t bx,
51  const uint32_t data);
52 
54 
57 
59  uint16_t capBlock() const { return capBlock_; }
60 
62  uint16_t capIndex() const { return capIndex_; }
63 
65  int16_t bx() const { return bx_; }
66 
68  bool empty() const { return (data_ == 0); }
69 
71 
73  bool isRingSums() const { return (type_ == conc_hf_ring_et_sums || type_ == wheel_hf_ring_et_sums); }
74 
76  uint32_t raw() const { return data_; }
77 
79  uint16_t value(unsigned i) const;
80 
82  uint16_t et(unsigned i) const;
83 
85  uint16_t count(unsigned i) const;
86 
87  // setters
88 
90  void setCapBlock(uint16_t const capBlock) { capBlock_ = capBlock; }
91 
93  void setCapIndex(uint16_t const capIndex) { capIndex_ = capIndex; }
94 
96  void setBx(int16_t const bx) { bx_ = bx; }
97 
100 
102  void setValue(unsigned const i, uint16_t const val);
103 
105  void setEt(unsigned const i, uint16_t const et);
106 
108  void setCount(unsigned const i, uint16_t const count);
109 
110  void setData(uint32_t const data) { data_ = data; }
111 
113 
115  bool operator==(const L1GctInternHFData& c) const;
116 
118  bool operator!=(const L1GctInternHFData& c) const { return !(*this == c); }
119 
120 private:
121  // type of data
123 
124  // source of the data
125  uint16_t capBlock_;
126  uint16_t capIndex_;
127  int16_t bx_;
128 
129  // the captured data
130  uint32_t data_;
131 };
132 
133 std::ostream& operator<<(std::ostream& s, const L1GctInternHFData& cand);
134 
135 #endif
mps_fire.i
i
Definition: mps_fire.py:355
L1GctInternHFData::type
L1GctInternHFData::L1GctInternHFDataType type() const
metadata
Definition: L1GctInternHFData.h:56
L1GctInternHFData::conc_hf_bit_counts
Definition: L1GctInternHFData.h:22
L1GctInternHFData::setValue
void setValue(unsigned const i, uint16_t const val)
set value
Definition: L1GctInternHFData.cc:76
L1GctInternHFData::isRingSums
bool isRingSums() const
get the actual data
Definition: L1GctInternHFData.h:73
L1GctInternHFData::conc_hf_ring_et_sums
Definition: L1GctInternHFData.h:21
L1GctInternHFData::empty
bool empty() const
is the sum non-zero
Definition: L1GctInternHFData.h:68
L1GctInternHFData::fromConcBitCounts
static L1GctInternHFData fromConcBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Definition: L1GctInternHFData.cc:22
L1GctInternHFData::setCapBlock
void setCapBlock(uint16_t const capBlock)
set cap block
Definition: L1GctInternHFData.h:90
L1GctInternHFData::bx_
int16_t bx_
Definition: L1GctInternHFData.h:127
L1GctInternHFData::capIndex
uint16_t capIndex() const
get index within capture block
Definition: L1GctInternHFData.h:62
L1GctInternHFData::wheel_hf_ring_et_sums
Definition: L1GctInternHFData.h:23
L1GctInternHFData::capIndex_
uint16_t capIndex_
Definition: L1GctInternHFData.h:126
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctInternHFData::capBlock_
uint16_t capBlock_
Definition: L1GctInternHFData.h:125
L1GctInternHFData::L1GctInternHFDataType
L1GctInternHFDataType
et sum type - not clear this is required
Definition: L1GctInternHFData.h:19
L1GctInternHFData::count
uint16_t count(unsigned i) const
get the counts
Definition: L1GctInternHFData.cc:70
L1GctInternHFData::operator!=
bool operator!=(const L1GctInternHFData &c) const
inequality operator
Definition: L1GctInternHFData.h:118
L1GctInternHFData::setCount
void setCount(unsigned const i, uint16_t const count)
set the count
Definition: L1GctInternHFData.cc:85
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctInternHFData &cand)
Definition: L1GctInternHFData.cc:87
L1GctInternHFData::et
uint16_t et(unsigned i) const
get the et sums
Definition: L1GctInternHFData.cc:67
L1GctInternHFData::fromConcRingSums
static L1GctInternHFData fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Definition: L1GctInternHFData.cc:9
L1GctInternHFData::operator==
bool operator==(const L1GctInternHFData &c) const
operators
Definition: L1GctInternHFData.cc:73
L1GctInternHFData::value
uint16_t value(unsigned i) const
get value
Definition: L1GctInternHFData.cc:64
cand
Definition: decayParser.h:34
L1GctInternHFData::setBx
void setBx(int16_t const bx)
set bx
Definition: L1GctInternHFData.h:96
L1GctInternHFData::fromWheelRingSums
static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Definition: L1GctInternHFData.cc:37
L1GctInternHFData::data_
uint32_t data_
Definition: L1GctInternHFData.h:130
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1GctInternHFData::setData
void setData(uint32_t const data)
Definition: L1GctInternHFData.h:110
L1GctInternHFData::capBlock
uint16_t capBlock() const
get capture block
Definition: L1GctInternHFData.h:59
L1GctInternHFData::setType
void setType(L1GctInternHFDataType type)
set type
Definition: L1GctInternHFData.h:99
type
type
Definition: HCALResponse.h:21
heppy_batch.val
val
Definition: heppy_batch.py:351
L1GctInternHFData::wheel_hf_bit_counts
Definition: L1GctInternHFData.h:24
L1GctInternHFData
L1 GCT internal ring sums and/or bit counts.
Definition: L1GctInternHFData.h:16
L1GctInternHFData::~L1GctInternHFData
~L1GctInternHFData()
destructor
Definition: L1GctInternHFData.cc:7
L1GctInternHFData::setEt
void setEt(unsigned const i, uint16_t const et)
set the sum
Definition: L1GctInternHFData.cc:82
L1GctInternHFData::fromWheelBitCounts
static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Definition: L1GctInternHFData.cc:50
L1GctInternHFData::bx
int16_t bx() const
get BX number
Definition: L1GctInternHFData.h:65
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
L1GctInternHFData::setCapIndex
void setCapIndex(uint16_t const capIndex)
set cap index
Definition: L1GctInternHFData.h:93
L1GctInternHFData::L1GctInternHFData
L1GctInternHFData()
default constructor (for vector initialisation etc.)
Definition: L1GctInternHFData.cc:4
L1GctInternHFData::type_
L1GctInternHFDataType type_
Definition: L1GctInternHFData.h:122
L1GctInternHFData::raw
uint32_t raw() const
get the raw data
Definition: L1GctInternHFData.h:76