CMS 3D CMS Logo

EcalMGPASample.cc
Go to the documentation of this file.
2 #include<iostream>
3 
5  theSample=(adc&0xFFF) | ((gainId&0x3)<<12);
6 }
7 
8 std::ostream& operator<<(std::ostream& s, const EcalMGPASample& samp) {
9  s << "ADC=" << samp.adc() << ", gainId=" << samp.gainId();
10  return s;
11 }
int adc(sample_type sample)
get the ADC sample (12 bits)
std::ostream & operator<<(std::ostream &s, const EcalMGPASample &samp)
int gainId(sample_type sample)
get the gainId (2 bits)
uint16_t theSample
int gainId() const
get the gainId (2 bits)
int adc() const
get the ADC sample (12 bits)