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
EcalTBTDCSample Class Reference

#include <EcalTBTDCSample.h>

Public Member Functions

 EcalTBTDCSample ()
 
 EcalTBTDCSample (uint32_t data)
 
 EcalTBTDCSample (unsigned int tdcChan, unsigned int tdcVal)
 
uint32_t operator() ()
 for streaming More...
 
uint32_t raw () const
 get the raw word More...
 
unsigned int tdcChannel () const
 get the gainId (8 bits) More...
 
unsigned int tdcValue () const
 get the ADC sample (24 bits) More...
 

Private Attributes

uint32_t theSample
 

Detailed Description

Simple container packer/unpacker for a single sample from the TB TDC raw data

$Id:

Definition at line 14 of file EcalTBTDCSample.h.

Constructor & Destructor Documentation

EcalTBTDCSample::EcalTBTDCSample ( )
inline

Definition at line 16 of file EcalTBTDCSample.h.

References theSample.

16 { theSample = 0; }
EcalTBTDCSample::EcalTBTDCSample ( uint32_t  data)
inline

Definition at line 17 of file EcalTBTDCSample.h.

References data, and theSample.

17 { theSample = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EcalTBTDCSample::EcalTBTDCSample ( unsigned int  tdcChan,
unsigned int  tdcVal 
)

Definition at line 3 of file EcalTBTDCSample.cc.

References theSample.

3  {
4  theSample = (tdcVal & 0xFFFFFF) | ((tdcChan & 0xFF) << 24);
5 }

Member Function Documentation

uint32_t EcalTBTDCSample::operator() ( )
inline

for streaming

Definition at line 27 of file EcalTBTDCSample.h.

References theSample.

27 { return theSample; }
uint32_t EcalTBTDCSample::raw ( ) const
inline

get the raw word

Definition at line 21 of file EcalTBTDCSample.h.

References theSample.

21 { return theSample; }
unsigned int EcalTBTDCSample::tdcChannel ( ) const
inline

get the gainId (8 bits)

Definition at line 25 of file EcalTBTDCSample.h.

References theSample.

Referenced by operator<<().

25 { return (theSample >> 24) & 0xFF; }
unsigned int EcalTBTDCSample::tdcValue ( ) const
inline

get the ADC sample (24 bits)

Definition at line 23 of file EcalTBTDCSample.h.

References theSample.

Referenced by operator<<().

23 { return theSample & 0xFFFFFF; }

Member Data Documentation

uint32_t EcalTBTDCSample::theSample
private

Definition at line 30 of file EcalTBTDCSample.h.

Referenced by EcalTBTDCSample(), operator()(), raw(), tdcChannel(), and tdcValue().