CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalTBTDCSample Class Reference

#include <EcalTBTDCSample.h>

List of all members.

Public Member Functions

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

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.

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

Definition at line 18 of file EcalTBTDCSample.h.

References data, and theSample.

EcalTBTDCSample::EcalTBTDCSample ( unsigned int  tdcChan,
unsigned int  tdcVal 
)

Definition at line 4 of file EcalTBTDCSample.cc.

References theSample.

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

Member Function Documentation

uint32_t EcalTBTDCSample::operator() ( ) [inline]

for streaming

Definition at line 28 of file EcalTBTDCSample.h.

References theSample.

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

get the raw word

Definition at line 22 of file EcalTBTDCSample.h.

References theSample.

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

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

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