CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DataFormats/HcalDigi/interface/HcalTriggerPrimitiveSample.h

Go to the documentation of this file.
00001 #ifndef HCALTRIGGERPRIMITIVESAMPLE_H
00002 #define HCALTRIGGERPRIMITIVESAMPLE_H 1
00003 
00004 #include <boost/cstdint.hpp>
00005 #include <ostream>
00006 
00013 class HcalTriggerPrimitiveSample {
00014 public:
00015   HcalTriggerPrimitiveSample();
00016   HcalTriggerPrimitiveSample(uint16_t data);
00017   HcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int slb, int slbchan);
00018   
00020   uint16_t raw() const { return theSample; }
00022   int compressedEt() const { return theSample&0xFF; }
00024   bool fineGrain() const { return (theSample&0x100)!=0; }
00026   int slb() const { return ((theSample>>13)&0x7); }
00028   int slbChan() const { return (theSample>>11)&0x3; }
00030   int slbAndChan() const { return (theSample>>11)&0x1F; }
00031   
00032 private:
00033   uint16_t theSample;
00034 };
00035 
00036 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveSample& samp);
00037 
00038 
00039 #endif