CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::EcalLiteDTUSample ( )
inline

Definition at line 27 of file EcalLiteDTUSample.h.

References theSample.

27 { theSample = 0; }
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::EcalLiteDTUSample ( int  adc,
int  gainId 
)

Definition at line 4 of file EcalLiteDTUSample.cc.

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

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

Member Function Documentation

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

34 { return theSample & ecalPh2::kAdcMask; }
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:18
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 operator<<(), and EcalUncalibRecHitPhase2WeightsProducer::produce().

static constexpr unsigned int kGainIdMask
Definition: EcalConstants.h:19
static constexpr unsigned int NBITS
Definition: EcalConstants.h:13
EcalLiteDTUSample::operator uint16_t ( ) const
inline

Definition at line 39 of file EcalLiteDTUSample.h.

References theSample.

39 { return theSample; }
uint16_t EcalLiteDTUSample::operator() ( ) const
inline

for streaming

Definition at line 38 of file EcalLiteDTUSample.h.

References theSample.

38 { return theSample; }
uint16_t EcalLiteDTUSample::raw ( ) const
inline

get the raw word

Definition at line 32 of file EcalLiteDTUSample.h.

References theSample.

32 { return theSample; }

Member Data Documentation

uint16_t EcalLiteDTUSample::theSample
private

Definition at line 42 of file EcalLiteDTUSample.h.

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