Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:27

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