CMS 3D CMS Logo

Typedefs | Functions
ecalMGPA Namespace Reference

Typedefs

typedef uint16_t sample_type
 

Functions

constexpr int adc (sample_type sample)
 get the ADC sample (12 bits) More...
 
constexpr int gainId (sample_type sample)
 get the gainId (2 bits) More...
 
constexpr sample_type pack (int adc, int gainId)
 

Typedef Documentation

◆ sample_type

typedef uint16_t ecalMGPA::sample_type

Definition at line 8 of file EcalMGPASample.h.

Function Documentation

◆ adc()

constexpr int ecalMGPA::adc ( sample_type  sample)
constexpr

get the ADC sample (12 bits)

Definition at line 11 of file EcalMGPASample.h.

11 { return sample & 0xFFF; }

References simplePhotonAnalyzer_cfi::sample.

Referenced by pack().

◆ gainId()

constexpr int ecalMGPA::gainId ( sample_type  sample)
constexpr

get the gainId (2 bits)

Definition at line 13 of file EcalMGPASample.h.

13 { return (sample >> 12) & 0x3; }

References simplePhotonAnalyzer_cfi::sample.

Referenced by pack().

◆ pack()

constexpr sample_type ecalMGPA::pack ( int  adc,
int  gainId 
)
constexpr

Definition at line 14 of file EcalMGPASample.h.

14 { return (adc & 0xFFF) | ((gainId & 0x3) << 12); }

References adc(), and gainId().

ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
ecalMGPA::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalMGPASample.h:13