CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 <cstdint>
7 
15 
17 public:
21  static const unsigned MAX_TOTAL_COUNTS;
22  static const unsigned MAX_TRUE_COUNTS;
23 
26 
28 
33  L1GctJetCounts(uint32_t data0, uint32_t data1);
34 
35  L1GctJetCounts(uint32_t data0, uint32_t data1, int16_t bx);
36 
38  L1GctJetCounts(const std::vector<unsigned>& counts);
39 
40  L1GctJetCounts(const std::vector<unsigned>& counts, int16_t bx);
41 
43  virtual ~L1GctJetCounts();
44 
46  std::string name() const { return "JetCounts"; }
47 
49  bool empty() const { return false; }
50 
52  uint32_t raw0() const { return m_data0; }
53 
55  uint32_t raw1() const { return m_data1; }
56 
58  unsigned count(unsigned i) const;
59 
61  unsigned count00() const { return (MAX_TRUE_COUNTS < 1 ? 0 : count(0)); }
62  unsigned count01() const { return (MAX_TRUE_COUNTS < 2 ? 0 : count(1)); }
63  unsigned count02() const { return (MAX_TRUE_COUNTS < 3 ? 0 : count(2)); }
64  unsigned count03() const { return (MAX_TRUE_COUNTS < 4 ? 0 : count(3)); }
65  unsigned count04() const { return (MAX_TRUE_COUNTS < 5 ? 0 : count(4)); }
66  unsigned count05() const { return (MAX_TRUE_COUNTS < 6 ? 0 : count(5)); }
67  unsigned count06() const { return (MAX_TRUE_COUNTS < 7 ? 0 : count(6)); }
68  unsigned count07() const { return (MAX_TRUE_COUNTS < 8 ? 0 : count(7)); }
69  unsigned count08() const { return (MAX_TRUE_COUNTS < 9 ? 0 : count(8)); }
70  unsigned count09() const { return (MAX_TRUE_COUNTS < 10 ? 0 : count(9)); }
71  unsigned count10() const { return (MAX_TRUE_COUNTS < 11 ? 0 : count(10)); }
72  unsigned count11() const { return (MAX_TRUE_COUNTS < 12 ? 0 : count(11)); }
73 
75  int16_t bx() const { return m_bx; }
76 
78  int operator==(const L1GctJetCounts& c) const { return (m_data0 == c.raw0() && m_data1 == c.raw1()); }
79 
81  int operator!=(const L1GctJetCounts& c) const { return !(*this == c); }
82 
83 private:
84  uint32_t m_data0;
85  uint32_t m_data1;
86  int16_t m_bx;
87 };
88 
89 std::ostream& operator<<(std::ostream& s, const L1GctJetCounts& c);
90 
91 #endif
virtual ~L1GctJetCounts()
destructor
const edm::EventSetup & c
unsigned count02() const
unsigned count11() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
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