CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctJetCounts.h
Go to the documentation of this file.
1 #ifndef L1GCTJETCOUNTS_H
2 #define L1GCTJETCOUNTS_H
3 
4 #include <vector>
5 #include <ostream>
6 #include <stdint.h>
7 
15 
16 
18 
19  public:
20 
24  static const unsigned MAX_TOTAL_COUNTS;
25  static const unsigned MAX_TRUE_COUNTS;
26 
29 
31 
36  L1GctJetCounts(uint32_t data0, uint32_t data1);
37 
38  L1GctJetCounts(uint32_t data0, uint32_t data1, int16_t bx);
39 
41  L1GctJetCounts(const std::vector<unsigned>& counts);
42 
43  L1GctJetCounts(const std::vector<unsigned>& counts, int16_t bx);
44 
46  virtual ~L1GctJetCounts();
47 
49  std::string name() const { return "JetCounts"; }
50 
52  bool empty() const { return false; }
53 
55  uint32_t raw0() const { return m_data0; }
56 
58  uint32_t raw1() const { return m_data1; }
59 
61  unsigned count(unsigned i) const;
62 
64  unsigned count00() const { return (MAX_TRUE_COUNTS<1 ? 0 : count(0)); }
65  unsigned count01() const { return (MAX_TRUE_COUNTS<2 ? 0 : count(1)); }
66  unsigned count02() const { return (MAX_TRUE_COUNTS<3 ? 0 : count(2)); }
67  unsigned count03() const { return (MAX_TRUE_COUNTS<4 ? 0 : count(3)); }
68  unsigned count04() const { return (MAX_TRUE_COUNTS<5 ? 0 : count(4)); }
69  unsigned count05() const { return (MAX_TRUE_COUNTS<6 ? 0 : count(5)); }
70  unsigned count06() const { return (MAX_TRUE_COUNTS<7 ? 0 : count(6)); }
71  unsigned count07() const { return (MAX_TRUE_COUNTS<8 ? 0 : count(7)); }
72  unsigned count08() const { return (MAX_TRUE_COUNTS<9 ? 0 : count(8)); }
73  unsigned count09() const { return (MAX_TRUE_COUNTS<10 ? 0 : count(9)); }
74  unsigned count10() const { return (MAX_TRUE_COUNTS<11 ? 0 : count(10)); }
75  unsigned count11() const { return (MAX_TRUE_COUNTS<12 ? 0 : count(11)); }
76 
78  int16_t bx() const { return m_bx; }
79 
81  int operator==(const L1GctJetCounts& c) const { return (m_data0==c.raw0() && m_data1==c.raw1()); }
82 
84  int operator!=(const L1GctJetCounts& c) const { return !(*this == c); }
85 
86  private:
87 
88  uint32_t m_data0;
89  uint32_t m_data1;
90  int16_t m_bx;
91 
92 };
93 
94 std::ostream& operator<<(std::ostream& s, const L1GctJetCounts& c);
95 
96 #endif
int i
Definition: DBlmapReader.cc:9
virtual ~L1GctJetCounts()
destructor
unsigned count02() const
unsigned count11() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
unsigned count07() const
unsigned count10() const
bool empty() const
empty method
static const unsigned MAX_TRUE_COUNTS
int operator==(const L1GctJetCounts &c) const
equality operator
unsigned count09() const
int operator!=(const L1GctJetCounts &c) const
inequality operator
uint32_t raw1() const
get raw word 1
uint32_t raw0() const
get raw word 0
unsigned count(unsigned i) const
get count by index
std::string name() const
name method
static const unsigned MAX_TOTAL_COUNTS
unsigned count00() const
get individual counts (for use with FWLite)
unsigned count03() const
unsigned count05() const
unsigned count01() const
L1GctJetCounts()
default constructor
uint32_t m_data0
uint32_t m_data1
unsigned count08() const
int16_t bx() const
get bunch-crossing index
unsigned count04() const
unsigned count06() const