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 (uint16_t data)
 
 EcalLiteDTUSample (int adc, int gainId)
 
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.

References theSample.

27 { theSample = 0; }

◆ EcalLiteDTUSample() [2/3]

EcalLiteDTUSample::EcalLiteDTUSample ( uint16_t  data)
inline

Definition at line 28 of file EcalLiteDTUSample.h.

References data, and theSample.

28 { theSample = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ EcalLiteDTUSample() [3/3]

EcalLiteDTUSample::EcalLiteDTUSample ( int  adc,
int  gainId 
)

Definition at line 4 of file EcalLiteDTUSample.cc.

References adc(), gainId(), ecalPh2::kAdcMask, ecalPh2::kGainIdMask, ecalPh2::NBITS, and theSample.

4  {
6 }
static constexpr unsigned int kGainIdMask
Definition: EcalConstants.h:36
int adc() const
get the ADC sample (12 bits)
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:35
int gainId() const
get the gainId (2 bits)
static constexpr unsigned int NBITS
Definition: EcalConstants.h:28

Member Function Documentation

◆ adc()

int EcalLiteDTUSample::adc ( ) const
inline

get the ADC sample (12 bits)

Definition at line 34 of file EcalLiteDTUSample.h.

References ecalPh2::kAdcMask, and theSample.

Referenced by EcalLiteDTUSample(), operator<<(), and EcalUncalibRecHitPhase2WeightsProducer::produce().

34 { return theSample & ecalPh2::kAdcMask; }
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:35

◆ 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(), operator<<(), and EcalUncalibRecHitPhase2WeightsProducer::produce().

static constexpr unsigned int kGainIdMask
Definition: EcalConstants.h:36
static constexpr unsigned int NBITS
Definition: EcalConstants.h:28

◆ operator uint16_t()

EcalLiteDTUSample::operator uint16_t ( ) const
inline

Definition at line 39 of file EcalLiteDTUSample.h.

References theSample.

39 { return theSample; }

◆ operator()()

uint16_t EcalLiteDTUSample::operator() ( ) const
inline

for streaming

Definition at line 38 of file EcalLiteDTUSample.h.

References theSample.

38 { return theSample; }

◆ raw()

uint16_t EcalLiteDTUSample::raw ( ) const
inline

get the raw word

Definition at line 32 of file EcalLiteDTUSample.h.

References theSample.

Referenced by EcalPhase2DigiToGPUProducer::produce().

32 { return 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().