CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <stdint.h>
7 
15 
16 
18 
19  public:
20 
27  };
28 
31 
34 
35  static L1GctInternHFData fromConcRingSums(const uint16_t capBlock,
36  const uint16_t capIndex,
37  const int16_t bx,
38  const uint32_t data);
39 
40  static L1GctInternHFData fromConcBitCounts(const uint16_t capBlock,
41  const uint16_t capIndex,
42  const int16_t bx,
43  const uint32_t data);
44 
45  static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock,
46  const uint16_t capIndex,
47  const int16_t bx,
48  const uint32_t data);
49 
50  static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock,
51  const uint16_t capIndex,
52  const int16_t bx,
53  const uint32_t data);
54 
56 
59 
61  uint16_t capBlock() const { return capBlock_; }
62 
64  uint16_t capIndex() const { return capIndex_; }
65 
67  int16_t bx() const { return bx_; }
68 
70  bool empty() const { return (data_ == 0); }
71 
72 
74 
76  bool isRingSums() const { return (type_ == conc_hf_ring_et_sums || type_ == wheel_hf_ring_et_sums); }
77 
79  uint32_t raw() const { return data_; }
80 
82  uint16_t value(unsigned i) const;
83 
85  uint16_t et(unsigned i) const;
86 
88  uint16_t count(unsigned i) const;
89 
90 
91  // setters
92 
94  void setCapBlock(uint16_t const capBlock) { capBlock_ = capBlock; }
95 
97  void setCapIndex(uint16_t const capIndex) { capIndex_ = capIndex; }
98 
100  void setBx(int16_t const bx) { bx_ = bx; }
101 
104 
106  void setValue(unsigned const i, uint16_t const val);
107 
109  void setEt(unsigned const i, uint16_t const et);
110 
112  void setCount(unsigned const i, uint16_t const count);
113 
114  void setData(uint32_t const data) { data_ = data; }
115 
116 
118 
120  bool operator==(const L1GctInternHFData& c) const;
121 
123  bool operator!=(const L1GctInternHFData& c) const { return !(*this == c); }
124 
125 
126  private:
127 
128  // type of data
130 
131  // source of the data
132  uint16_t capBlock_;
133  uint16_t capIndex_;
134  int16_t bx_;
135 
136  // the captured data
137  uint32_t data_;
138 
139  };
140 
141 std::ostream& operator<<(std::ostream& s, const L1GctInternHFData& cand);
142 
143 #endif
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
void setCapBlock(uint16_t const capBlock)
set cap block
L1GctInternHFData()
default constructor (for vector initialisation etc.)
L1GctInternHFData::L1GctInternHFDataType type() const
metadata
void setValue(unsigned const i, uint16_t const val)
set value
uint16_t capIndex() const
get index within capture block
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
void setCount(unsigned const i, uint16_t const count)
set the count
static L1GctInternHFData fromConcBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
L1GctInternHFDataType
et sum type - not clear this is required
bool isRingSums() const
get the actual data
static L1GctInternHFData fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint16_t count(unsigned i) const
get the counts
uint16_t capBlock() const
get capture block
uint16_t et(unsigned i) const
get the et sums
int16_t bx() const
get BX number
static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
void setType(L1GctInternHFDataType type)
set type
uint16_t value(unsigned i) const
get value
void setEt(unsigned const i, uint16_t const et)
set the sum
void setBx(int16_t const bx)
set bx
bool empty() const
is the sum non-zero
~L1GctInternHFData()
destructor
void setData(uint32_t const data)
bool operator==(const L1GctInternHFData &c) const
operators
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
L1GctInternHFDataType type_
static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
uint32_t raw() const
get the raw data
L1 GCT internal ring sums and/or bit counts.
void setCapIndex(uint16_t const capIndex)
set cap index
bool operator!=(const L1GctInternHFData &c) const
inequality operator