CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DataFormats/L1GlobalCaloTrigger/interface/L1GctEtTotal.h

Go to the documentation of this file.
00001 #ifndef L1GCTETTOTAL_H
00002 #define L1GCTETTOTAL_H
00003 
00004 #include <ostream>
00005 #include <stdint.h>
00006 
00015 
00016 
00017 
00018 class L1GctEtTotal {
00019  public:
00020 
00021   enum numberOfBits {
00022     kEtTotalNBits    = 12,
00023     kEtTotalOFlowBit = 1 << kEtTotalNBits,
00024     kEtTotalMaxValue = kEtTotalOFlowBit - 1,
00025     kRawCtorMask     = kEtTotalOFlowBit | kEtTotalMaxValue
00026   };
00027 
00028   L1GctEtTotal();
00029   L1GctEtTotal(uint16_t rawData);
00030   L1GctEtTotal(uint16_t rawData, int16_t bx);
00031   L1GctEtTotal(unsigned et, bool oflow);
00032   L1GctEtTotal(unsigned et, bool oflow, int16_t bx);
00033   virtual ~L1GctEtTotal();
00034 
00036   std::string name() const { return "EtTotal"; }
00037 
00039   bool empty() const { return false; }
00040 
00042   uint16_t raw() const { return m_data; }
00043 
00045   unsigned et() const { return m_data & kEtTotalMaxValue; }
00046 
00048   bool overFlow() const { return (m_data & kEtTotalOFlowBit)!=0; }
00049 
00051   int16_t bx() const { return m_bx; }
00052 
00054   int operator==(const L1GctEtTotal& e) const { return m_data==e.raw(); }
00055 
00057   int operator!=(const L1GctEtTotal& e) const { return m_data!=e.raw(); }
00058 
00059  private:
00060 
00061   uint16_t m_data;
00062   int16_t m_bx;
00063 
00064 };
00065 
00066 
00068 std::ostream& operator<<(std::ostream& s, const L1GctEtTotal& c);
00069 
00070 
00071 #endif