File indexing completed on 2024-04-06 12:04:27
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
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 }