1 #ifndef DataFormats_EcalDigi_EcalMGPASample_h 2 #define DataFormats_EcalDigi_EcalMGPASample_h constexpr sample_type pack(int adc, int gainId)
std::ostream & operator<<(std::ostream &, const EcalMGPASample &)
static constexpr unsigned int NBITS
EcalMGPASample(uint16_t data)
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
char data[epos_bytes_allocation]
static constexpr unsigned int kGainIdMask
int adc() const
get the ADC sample (12 bits)
uint16_t operator()() const
for streaming
uint16_t raw() const
get the raw word
static constexpr unsigned int kAdcMask
int gainId() const
get the gainId (2 bits)