CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DataFormats/L1GlobalCaloTrigger/src/L1GctEtTotal.cc

Go to the documentation of this file.
00001 
00002 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtTotal.h"
00003 
00004 L1GctEtTotal::L1GctEtTotal() : m_data(0), m_bx(0) { }
00005 
00006 L1GctEtTotal::L1GctEtTotal(uint16_t rawData) : m_data(rawData & kRawCtorMask), m_bx(0) { }
00007 
00008 L1GctEtTotal::L1GctEtTotal(uint16_t rawData, int16_t bx) : m_data(rawData & kRawCtorMask), m_bx(bx) { }
00009 
00010 L1GctEtTotal::L1GctEtTotal(unsigned et, bool oflow) : m_data(0),
00011                                                       m_bx(0)
00012 {
00013   m_data = (et & kEtTotalMaxValue) | ((oflow || et>kEtTotalMaxValue) ? kEtTotalOFlowBit : 0);
00014 }
00015 
00016 L1GctEtTotal::L1GctEtTotal(unsigned et, bool oflow, int16_t bx) : m_data(0),
00017                                                                   m_bx(bx)
00018 {
00019   m_data = (et & kEtTotalMaxValue) | ((oflow || et>kEtTotalMaxValue) ? kEtTotalOFlowBit : 0);
00020 }
00021 
00022 L1GctEtTotal::~L1GctEtTotal() { } 
00023 
00025 std::ostream& operator<<(std::ostream& s, const L1GctEtTotal& c) {
00026   s << " L1GctEtTotal: ";
00027   s << " et=" << c.et();
00028   if (c.overFlow()) { s << "; overflow set"; }
00029   return s;
00030 }