Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:47

0001 
0002 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtTotal.h"
0003 
0004 L1GctEtTotal::L1GctEtTotal() : m_data(0), m_bx(0) {}
0005 
0006 L1GctEtTotal::L1GctEtTotal(uint16_t rawData) : m_data(rawData & kRawCtorMask), m_bx(0) {}
0007 
0008 L1GctEtTotal::L1GctEtTotal(uint16_t rawData, int16_t bx) : m_data(rawData & kRawCtorMask), m_bx(bx) {}
0009 
0010 L1GctEtTotal::L1GctEtTotal(unsigned et, bool oflow) : m_data(0), m_bx(0) {
0011   m_data = (et & kEtTotalMaxValue) | ((oflow || et > kEtTotalMaxValue) ? kEtTotalOFlowBit : 0);
0012 }
0013 
0014 L1GctEtTotal::L1GctEtTotal(unsigned et, bool oflow, int16_t bx) : m_data(0), m_bx(bx) {
0015   m_data = (et & kEtTotalMaxValue) | ((oflow || et > kEtTotalMaxValue) ? kEtTotalOFlowBit : 0);
0016 }
0017 
0018 L1GctEtTotal::~L1GctEtTotal() {}
0019 
0020 /// Pretty-print operator for L1GctEtTotal
0021 std::ostream& operator<<(std::ostream& s, const L1GctEtTotal& c) {
0022   s << " L1GctEtTotal: ";
0023   s << " et=" << c.et();
0024   if (c.overFlow()) {
0025     s << "; overflow set";
0026   }
0027   return s;
0028 }