CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 15 of file EcalTBTDCSample.h.

Constructor & Destructor Documentation

EcalTBTDCSample::EcalTBTDCSample ( )
inline

Definition at line 17 of file EcalTBTDCSample.h.

References theSample.

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

Definition at line 18 of file EcalTBTDCSample.h.

References data, and theSample.

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

Definition at line 4 of file EcalTBTDCSample.cc.

References theSample.

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

Member Function Documentation

uint32_t EcalTBTDCSample::operator() ( )
inline

for streaming

Definition at line 28 of file EcalTBTDCSample.h.

References theSample.

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

get the raw word

Definition at line 22 of file EcalTBTDCSample.h.

References theSample.

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

get the gainId (8 bits)

Definition at line 26 of file EcalTBTDCSample.h.

References theSample.

Referenced by operator<<().

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

get the ADC sample (24 bits)

Definition at line 24 of file EcalTBTDCSample.h.

References theSample.

Referenced by operator<<().

24 { return theSample&0xFFFFFF; }

Member Data Documentation

uint32_t EcalTBTDCSample::theSample
private

Definition at line 31 of file EcalTBTDCSample.h.

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