CMS 3D CMS Logo

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