CMS 3D CMS Logo

EcalFEMSample Class Reference

Simple container packer/unpacker for a single sample from the FEM electronics. More...

#include <DataFormats/EcalDigi/interface/EcalFEMSample.h>

List of all members.

Public Member Functions

int adc () const
 get the ADC sample (12 bits)
 EcalFEMSample (int adc, int gainId)
 EcalFEMSample (uint16_t data)
 EcalFEMSample ()
int gainId () const
 get the gainId (2 bits)
uint16_t operator() ()
 for streaming
uint16_t raw () const
 get the raw word

Private Attributes

uint16_t theSample


Detailed Description

Simple container packer/unpacker for a single sample from the FEM electronics.

$Id:

Definition at line 14 of file EcalFEMSample.h.


Constructor & Destructor Documentation

EcalFEMSample::EcalFEMSample (  )  [inline]

Definition at line 16 of file EcalFEMSample.h.

References theSample.

00016 { theSample=0; }

EcalFEMSample::EcalFEMSample ( uint16_t  data  )  [inline]

Definition at line 17 of file EcalFEMSample.h.

References theSample.

00017 { theSample=data; }

EcalFEMSample::EcalFEMSample ( int  adc,
int  gainId 
)

Definition at line 3 of file EcalFEMSample.cc.

References theSample.

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


Member Function Documentation

int EcalFEMSample::adc (  )  const [inline]

get the ADC sample (12 bits)

Definition at line 23 of file EcalFEMSample.h.

References theSample.

Referenced by EcalHVScanAnalyzer::maxPNDiode(), and operator<<().

00023 { return theSample&0xFFF; }

int EcalFEMSample::gainId (  )  const [inline]

get the gainId (2 bits)

Definition at line 25 of file EcalFEMSample.h.

References theSample.

Referenced by operator<<().

00025 { return (theSample>>12)&0x3; }

uint16_t EcalFEMSample::operator() (  )  [inline]

for streaming

Definition at line 27 of file EcalFEMSample.h.

References theSample.

00027 { return theSample; }

uint16_t EcalFEMSample::raw (  )  const [inline]

get the raw word

Definition at line 21 of file EcalFEMSample.h.

References theSample.

00021 { return theSample; }


Member Data Documentation

uint16_t EcalFEMSample::theSample [private]

Definition at line 30 of file EcalFEMSample.h.

Referenced by adc(), EcalFEMSample(), gainId(), operator()(), and raw().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:34 2009 for CMSSW by  doxygen 1.5.4