CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalQIESample.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HCALQIESAMPLE_H
2 #define DIGIHCAL_HCALQIESAMPLE_H
3 
4 #include <ostream>
5 #include <boost/cstdint.hpp>
6 
14 public:
17  HcalQIESample(int adc, int capid, int fiber, int fiberchan, bool dv=true, bool er=false);
18 
20  uint16_t raw() const { return theSample; }
22  int adc() const { return theSample&0x7F; }
24  double nominal_fC() const;
26  int capid() const { return (theSample>>7)&0x3; }
28  bool dv() const { return (theSample&0x0200)!=0; }
30  bool er() const { return (theSample&0x0400)!=0; }
32  int fiber() const { return ((theSample>>13)&0x7)+1; }
34  int fiberChan() const { return (theSample>>11)&0x3; }
36  int fiberAndChan() const { return (theSample>>11)&0x1F; }
37 
39  uint16_t operator()() { return theSample; }
40 
41 private:
42  uint16_t theSample;
43 };
44 
45 std::ostream& operator<<(std::ostream&, const HcalQIESample&);
46 
47 #endif
uint16_t operator()()
for streaming
Definition: HcalQIESample.h:39
uint16_t raw() const
get the raw word
Definition: HcalQIESample.h:20
int fiberAndChan() const
get the id channel
Definition: HcalQIESample.h:36
int fiberChan() const
get the fiber channel number
Definition: HcalQIESample.h:34
int adc() const
get the ADC sample
Definition: HcalQIESample.h:22
bool dv() const
is the Data Valid bit set?
Definition: HcalQIESample.h:28
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
uint16_t theSample
Definition: HcalQIESample.h:42
HcalQIESample(uint16_t data)
Definition: HcalQIESample.h:16
int fiber() const
get the fiber number
Definition: HcalQIESample.h:32
int capid() const
get the Capacitor id
Definition: HcalQIESample.h:26
double nominal_fC() const
get the nominal FC (no calibrations applied)
bool er() const
is the error bit set?
Definition: HcalQIESample.h:30