CMS 3D CMS Logo

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

#include <EcalMGPASample.h>

Public Member Functions

int adc () const
 get the ADC sample (12 bits) More...
 
 EcalMGPASample ()
 
 EcalMGPASample (int adc, int gainId)
 
 EcalMGPASample (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 teh MGPA electronics

Definition at line 22 of file EcalMGPASample.h.

Constructor & Destructor Documentation

◆ EcalMGPASample() [1/3]

EcalMGPASample::EcalMGPASample ( )
inline

Definition at line 24 of file EcalMGPASample.h.

24 { theSample = 0; }

References theSample.

◆ EcalMGPASample() [2/3]

EcalMGPASample::EcalMGPASample ( uint16_t  data)
inline

Definition at line 25 of file EcalMGPASample.h.

25 { theSample = data; }

References data, and theSample.

◆ EcalMGPASample() [3/3]

EcalMGPASample::EcalMGPASample ( int  adc,
int  gainId 
)

Definition at line 4 of file EcalMGPASample.cc.

4 { theSample = (adc & 0xFFF) | ((gainId & 0x3) << 12); }

References adc(), gainId(), and theSample.

Member Function Documentation

◆ adc()

int EcalMGPASample::adc ( ) const
inline

◆ gainId()

int EcalMGPASample::gainId ( ) const
inline

◆ operator uint16_t()

EcalMGPASample::operator uint16_t ( ) const
inline

Definition at line 36 of file EcalMGPASample.h.

36 { return theSample; }

References theSample.

◆ operator()()

uint16_t EcalMGPASample::operator() ( ) const
inline

for streaming

Definition at line 35 of file EcalMGPASample.h.

35 { return theSample; }

References theSample.

◆ raw()

uint16_t EcalMGPASample::raw ( ) const
inline

get the raw word

Definition at line 29 of file EcalMGPASample.h.

29 { return theSample; }

References theSample.

Referenced by EcalDigiSelector::produce(), and EcalFenixLinearizer::setInput().

Member Data Documentation

◆ theSample

uint16_t EcalMGPASample::theSample
private

Definition at line 39 of file EcalMGPASample.h.

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

EcalMGPASample::theSample
uint16_t theSample
Definition: EcalMGPASample.h:39
EcalMGPASample::gainId
int gainId() const
get the gainId (2 bits)
Definition: EcalMGPASample.h:33
EcalMGPASample::adc
int adc() const
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:31
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79