CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/DataFormats/L1GlobalCaloTrigger/interface/L1GctJetCounts.h

Go to the documentation of this file.
00001 #ifndef L1GCTJETCOUNTS_H
00002 #define L1GCTJETCOUNTS_H
00003 
00004 #include <vector>
00005 #include <ostream>
00006 #include <stdint.h>
00007 
00015 
00016 
00017 class L1GctJetCounts {
00018 
00019  public:
00020 
00024   static const unsigned MAX_TOTAL_COUNTS;
00025   static const unsigned MAX_TRUE_COUNTS;
00026 
00028   L1GctJetCounts();
00029 
00031 
00036   L1GctJetCounts(uint32_t data0, uint32_t data1);
00037 
00038   L1GctJetCounts(uint32_t data0, uint32_t data1, int16_t bx);
00039 
00041   L1GctJetCounts(std::vector<unsigned> counts);
00042 
00043   L1GctJetCounts(std::vector<unsigned> counts, int16_t bx);
00044 
00046   virtual ~L1GctJetCounts();
00047 
00049   std::string name() const { return "JetCounts"; }
00050 
00052   bool empty() const { return false; }
00053 
00055   uint32_t raw0() const { return m_data0; }
00056 
00058   uint32_t raw1() const { return m_data1; }
00059 
00061   unsigned count(unsigned i) const;
00062 
00064   unsigned count00() const { return (MAX_TRUE_COUNTS<1 ?  0 : count(0)); }
00065   unsigned count01() const { return (MAX_TRUE_COUNTS<2 ?  0 : count(1)); }
00066   unsigned count02() const { return (MAX_TRUE_COUNTS<3 ?  0 : count(2)); }
00067   unsigned count03() const { return (MAX_TRUE_COUNTS<4 ?  0 : count(3)); }
00068   unsigned count04() const { return (MAX_TRUE_COUNTS<5 ?  0 : count(4)); }
00069   unsigned count05() const { return (MAX_TRUE_COUNTS<6 ?  0 : count(5)); }
00070   unsigned count06() const { return (MAX_TRUE_COUNTS<7 ?  0 : count(6)); }
00071   unsigned count07() const { return (MAX_TRUE_COUNTS<8 ?  0 : count(7)); }
00072   unsigned count08() const { return (MAX_TRUE_COUNTS<9 ?  0 : count(8)); }
00073   unsigned count09() const { return (MAX_TRUE_COUNTS<10 ? 0 : count(9)); }
00074   unsigned count10() const { return (MAX_TRUE_COUNTS<11 ? 0 : count(10)); }
00075   unsigned count11() const { return (MAX_TRUE_COUNTS<12 ? 0 : count(11)); }
00076 
00078   int16_t bx() const { return m_bx; }
00079 
00081   int operator==(const L1GctJetCounts& c) const { return (m_data0==c.raw0() && m_data1==c.raw1()); }
00082 
00084   int operator!=(const L1GctJetCounts& c) const { return !(*this == c); }
00085 
00086  private:
00087 
00088   uint32_t m_data0;
00089   uint32_t m_data1;
00090   int16_t m_bx;
00091 
00092 };
00093 
00094 std::ostream& operator<<(std::ostream& s, const L1GctJetCounts& c);
00095 
00096 #endif