Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HCALTRIGGERPRIMITIVESAMPLE_H
0002 #define HCALTRIGGERPRIMITIVESAMPLE_H 1
0003 
0004 #include <ostream>
0005 #include <cstdint>
0006 
0007 /** \class HcalTriggerPrimitiveSample
0008     
0009   \author J. Mans - Minnesota
0010 */
0011 class HcalTriggerPrimitiveSample {
0012 public:
0013   HcalTriggerPrimitiveSample();
0014   HcalTriggerPrimitiveSample(uint16_t data);
0015   HcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int slb, int slbchan);
0016   HcalTriggerPrimitiveSample(int encodedEt, int finegrainExtended);
0017 
0018   /// get the raw word
0019   uint16_t raw() const { return theSample; }
0020   /// get the encoded/compressed Et
0021   int compressedEt() const { return theSample & 0xFF; }
0022   /// get fine-grain bit (traditional)
0023   bool fineGrain(int i = 0) const { return (((theSample) >> (i + 8)) & 0x1) != 0; }
0024 
0025 private:
0026   uint16_t theSample;
0027 };
0028 
0029 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveSample& samp);
0030 
0031 #endif