test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalUpgradeQIESample.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HCALUPGRADEQIESAMPLE_H
2 #define DIGIHCAL_HCALUPGRADEQIESAMPLE_H
3 
4 #include <ostream>
5 #include <boost/cstdint.hpp>
6 
14 public:
17  HcalUpgradeQIESample(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&0xFF; }
24  double nominal_fC() const;
26  int capid() const { return (theSample>>8)&0x3; }
28  bool dv() const { return (theSample&0x0400)!=0; }
30  bool er() const { return (theSample&0x0800)!=0; }
32  int fiber() const { return ((theSample>>14)&0x7)+1; }
34  int fiberChan() const { return (theSample>>12)&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 HcalUpgradeQIESample&);
46 
47 #endif
int fiber() const
get the fiber number
HcalUpgradeQIESample(uint16_t data)
bool dv() const
is the Data Valid bit set?
bool er() const
is the error bit set?
uint16_t operator()()
for streaming
int fiberAndChan() const
get the id channel
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int adc() const
get the ADC sample
int fiberChan() const
get the fiber channel number
double nominal_fC() const
get the nominal FC (no calibrations applied)
int capid() const
get the Capacitor id
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
uint16_t raw() const
get the raw word