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 
16 public:
19  HcalQIESample(int adc, int capid, int fiber, int fiberchan, bool dv=true, bool er=false);
20 
22  uint16_t raw() const { return theSample; }
24  int adc() const { return theSample&0x7F; }
26  double nominal_fC() const;
28  int capid() const { return (theSample>>7)&0x3; }
30  bool dv() const { return (theSample&0x0200)!=0; }
32  bool er() const { return (theSample&0x0400)!=0; }
34  int fiber() const { return ((theSample>>13)&0x7)+1; }
36  int fiberChan() const { return (theSample>>11)&0x3; }
38  int fiberAndChan() const { return (theSample>>11)&0x1F; }
39 
41  uint16_t operator()() { return theSample; }
42 
43 private:
44  uint16_t theSample;
45 };
46 
47 std::ostream& operator<<(std::ostream&, const HcalQIESample&);
48 
49 #endif
uint16_t operator()()
for streaming
Definition: HcalQIESample.h:41
uint16_t raw() const
get the raw word
Definition: HcalQIESample.h:22
int fiberAndChan() const
get the id channel
Definition: HcalQIESample.h:38
int fiberChan() const
get the fiber channel number
Definition: HcalQIESample.h:36
int adc() const
get the ADC sample
Definition: HcalQIESample.h:24
bool dv() const
is the Data Valid bit set?
Definition: HcalQIESample.h:30
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
uint16_t theSample
Definition: HcalQIESample.h:44
HcalQIESample(uint16_t data)
Definition: HcalQIESample.h:18
int fiber() const
get the fiber number
Definition: HcalQIESample.h:34
int capid() const
get the Capacitor id
Definition: HcalQIESample.h:28
double nominal_fC() const
get the nominal FC (no calibrations applied)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool er() const
is the error bit set?
Definition: HcalQIESample.h:32