CMS 3D CMS Logo

HcalTriggerPrimitiveSample.h
Go to the documentation of this file.
1 #ifndef HCALTRIGGERPRIMITIVESAMPLE_H
2 #define HCALTRIGGERPRIMITIVESAMPLE_H 1
3 
4 #include <boost/cstdint.hpp>
5 #include <ostream>
6 
12 public:
15  HcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int slb, int slbchan);
16  HcalTriggerPrimitiveSample(int encodedEt, int finegrainExtended);
17 
19  uint16_t raw() const { return theSample; }
21  int compressedEt() const { return theSample&0xFF; }
23  bool fineGrain(int i=0) const { return (((theSample)>>(i+8))&0x1)!=0; }
24 
25 private:
26  uint16_t theSample;
27 };
28 
29 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveSample& samp);
30 
31 
32 #endif
std::ostream & operator<<(std::ostream &s, const HcalTriggerPrimitiveSample &samp)
int i
Definition: DBlmapReader.cc:9
bool fineGrain(int i=0) const
get fine-grain bit (traditional)
static int slb(const HcalTriggerPrimitiveSample &theSample)
uint16_t raw() const
get the raw word
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int compressedEt() const
get the encoded/compressed Et