CMS 3D CMS Logo

L1GctEtTotal.h
Go to the documentation of this file.
1 #ifndef L1GCTETTOTAL_H
2 #define L1GCTETTOTAL_H
3 
4 #include <ostream>
5 #include <cstdint>
6 
14 
17 class L1GctEtTotal {
18 public:
19  enum numberOfBits {
24  };
25 
26  L1GctEtTotal();
27  L1GctEtTotal(uint16_t rawData);
28  L1GctEtTotal(uint16_t rawData, int16_t bx);
29  L1GctEtTotal(unsigned et, bool oflow);
30  L1GctEtTotal(unsigned et, bool oflow, int16_t bx);
31  virtual ~L1GctEtTotal();
32 
34  std::string name() const { return "EtTotal"; }
35 
37  bool empty() const { return false; }
38 
40  uint16_t raw() const { return m_data; }
41 
43  unsigned et() const { return m_data & kEtTotalMaxValue; }
44 
46  bool overFlow() const { return (m_data & kEtTotalOFlowBit) != 0; }
47 
49  int16_t bx() const { return m_bx; }
50 
52  int operator==(const L1GctEtTotal& e) const { return m_data == e.raw(); }
53 
55  int operator!=(const L1GctEtTotal& e) const { return m_data != e.raw(); }
56 
57 private:
58  uint16_t m_data;
59  int16_t m_bx;
60 };
61 
63 std::ostream& operator<<(std::ostream& s, const L1GctEtTotal& c);
64 
65 #endif
int operator!=(const L1GctEtTotal &e) const
inequality operator
Definition: L1GctEtTotal.h:55
int16_t m_bx
Definition: L1GctEtTotal.h:59
int operator==(const L1GctEtTotal &e) const
equality operator
Definition: L1GctEtTotal.h:52
uint16_t m_data
Definition: L1GctEtTotal.h:58
bool overFlow() const
get the overflow
Definition: L1GctEtTotal.h:46
Persistable copy of total Et measured at Level-1.
Definition: L1GctEtTotal.h:17
bool empty() const
empty method (= false; total Et is always calculated)
Definition: L1GctEtTotal.h:37
unsigned et() const
get the Et
Definition: L1GctEtTotal.h:43
std::ostream & operator<<(std::ostream &s, const L1GctEtTotal &c)
Pretty-print operator for L1GctEtTotal.
Definition: L1GctEtTotal.cc:21
uint16_t raw() const
get the data
Definition: L1GctEtTotal.h:40
virtual ~L1GctEtTotal()
Definition: L1GctEtTotal.cc:18
std::string name() const
name method
Definition: L1GctEtTotal.h:34
int16_t bx() const
get bunch-crossing index
Definition: L1GctEtTotal.h:49