CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EcalLiteDTUSample Class Reference

#include <EcalLiteDTUSample.h>

Public Member Functions

int adc () const
 get the ADC sample (12 bits) More...
 
 EcalLiteDTUSample ()
 
 EcalLiteDTUSample (int adc, int gainId)
 
 EcalLiteDTUSample (uint16_t data)
 
int gainId () const
 get the gainId (2 bits) More...
 
 operator uint16_t () const
 
uint16_t operator() () const
 for streaming More...
 
uint16_t raw () const
 get the raw word More...
 

Private Attributes

uint16_t theSample
 

Detailed Description

Simple container packer/unpacker for a single sample from the Lite_CATIA electronics

Definition at line 25 of file EcalLiteDTUSample.h.

Constructor & Destructor Documentation

◆ EcalLiteDTUSample() [1/3]

EcalLiteDTUSample::EcalLiteDTUSample ( )
inline

Definition at line 27 of file EcalLiteDTUSample.h.

27 { theSample = 0; }

References theSample.

◆ EcalLiteDTUSample() [2/3]

EcalLiteDTUSample::EcalLiteDTUSample ( uint16_t  data)
inline

Definition at line 28 of file EcalLiteDTUSample.h.

28 { theSample = data; }

References data, and theSample.

◆ EcalLiteDTUSample() [3/3]

EcalLiteDTUSample::EcalLiteDTUSample ( int  adc,
int  gainId 
)

Member Function Documentation

◆ adc()

int EcalLiteDTUSample::adc ( ) const
inline

get the ADC sample (12 bits)

Definition at line 34 of file EcalLiteDTUSample.h.

34 { return theSample & ecalPh2::kAdcMask; }

References ecalPh2::kAdcMask, and theSample.

Referenced by EcalLiteDTUSample(), and operator<<().

◆ gainId()

int EcalLiteDTUSample::gainId ( ) const
inline

get the gainId (2 bits)

Definition at line 36 of file EcalLiteDTUSample.h.

References ecalPh2::kGainIdMask, ecalPh2::NBITS, and theSample.

Referenced by EcalLiteDTUSample(), and operator<<().

◆ operator uint16_t()

EcalLiteDTUSample::operator uint16_t ( ) const
inline

Definition at line 39 of file EcalLiteDTUSample.h.

39 { return theSample; }

References theSample.

◆ operator()()

uint16_t EcalLiteDTUSample::operator() ( ) const
inline

for streaming

Definition at line 38 of file EcalLiteDTUSample.h.

38 { return theSample; }

References theSample.

◆ raw()

uint16_t EcalLiteDTUSample::raw ( ) const
inline

get the raw word

Definition at line 32 of file EcalLiteDTUSample.h.

32 { return theSample; }

References theSample.

Member Data Documentation

◆ theSample

uint16_t EcalLiteDTUSample::theSample
private

Definition at line 42 of file EcalLiteDTUSample.h.

Referenced by adc(), EcalLiteDTUSample(), gainId(), operator uint16_t(), operator()(), and raw().

ecalPh2::kGainIdMask
static constexpr unsigned int kGainIdMask
Definition: EcalConstants.h:19
EcalLiteDTUSample::adc
int adc() const
get the ADC sample (12 bits)
Definition: EcalLiteDTUSample.h:34
EcalLiteDTUSample::theSample
uint16_t theSample
Definition: EcalLiteDTUSample.h:42
EcalLiteDTUSample::gainId
int gainId() const
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:36
ecalPh2::kAdcMask
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:18
ecalPh2::NBITS
static constexpr unsigned int NBITS
Definition: EcalConstants.h:13
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79