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 Member Functions | Private Attributes
HcalCoderDb Class Reference

#include <HcalCoderDb.h>

Inheritance diagram for HcalCoderDb:
HcalCoder

Public Member Functions

virtual void adc2fC (const HBHEDataFrame &df, CaloSamples &lf) const
 
virtual void adc2fC (const HODataFrame &df, CaloSamples &lf) const
 
virtual void adc2fC (const HFDataFrame &df, CaloSamples &lf) const
 
virtual void adc2fC (const ZDCDataFrame &df, CaloSamples &lf) const
 
virtual void adc2fC (const HcalCalibDataFrame &df, CaloSamples &lf) const
 
virtual void fC2adc (const CaloSamples &clf, HBHEDataFrame &df, int fCapIdOffset) const
 
virtual void fC2adc (const CaloSamples &clf, HFDataFrame &df, int fCapIdOffset) const
 
virtual void fC2adc (const CaloSamples &clf, HODataFrame &df, int fCapIdOffset) const
 
virtual void fC2adc (const CaloSamples &clf, ZDCDataFrame &df, int fCapIdOffset) const
 
virtual void fC2adc (const CaloSamples &clf, HcalCalibDataFrame &df, int fCapIdOffset) const
 
 HcalCoderDb (const HcalQIECoder &fCoder, const HcalQIEShape &fShape)
 

Private Member Functions

template<class Digi >
void adc2fC_ (const Digi &df, CaloSamples &clf) const
 
template<class Digi >
void fC2adc_ (const CaloSamples &clf, Digi &df, int fCapIdOffset) const
 

Private Attributes

const HcalQIECodermCoder
 
const HcalQIEShapemShape
 

Detailed Description

coder which uses DB services to convert to fC $Author: ratnikov

Date:
2006/09/25 21:59:23
Revision:
1.5

Definition at line 19 of file HcalCoderDb.h.

Constructor & Destructor Documentation

HcalCoderDb::HcalCoderDb ( const HcalQIECoder fCoder,
const HcalQIEShape fShape 
)

Definition at line 13 of file HcalCoderDb.cc.

14  : mCoder (&fCoder),
15  mShape (&fShape)
16 {}
const HcalQIEShape * mShape
Definition: HcalCoderDb.h:38
const HcalQIECoder * mCoder
Definition: HcalCoderDb.h:37

Member Function Documentation

void HcalCoderDb::adc2fC ( const HBHEDataFrame df,
CaloSamples lf 
) const
virtual
void HcalCoderDb::adc2fC ( const HODataFrame df,
CaloSamples lf 
) const
virtual

Implements HcalCoder.

Definition at line 38 of file HcalCoderDb.cc.

References adc2fC_().

38 {adc2fC_ (df, lf);}
void adc2fC_(const Digi &df, CaloSamples &clf) const
Definition: HcalCoderDb.cc:18
void HcalCoderDb::adc2fC ( const HFDataFrame df,
CaloSamples lf 
) const
virtual

Implements HcalCoder.

Definition at line 39 of file HcalCoderDb.cc.

References adc2fC_().

39 {adc2fC_ (df, lf);}
void adc2fC_(const Digi &df, CaloSamples &clf) const
Definition: HcalCoderDb.cc:18
void HcalCoderDb::adc2fC ( const ZDCDataFrame df,
CaloSamples lf 
) const
virtual

Implements HcalCoder.

Definition at line 40 of file HcalCoderDb.cc.

References adc2fC_().

40 {adc2fC_ (df, lf);}
void adc2fC_(const Digi &df, CaloSamples &clf) const
Definition: HcalCoderDb.cc:18
void HcalCoderDb::adc2fC ( const HcalCalibDataFrame df,
CaloSamples lf 
) const
virtual

Implements HcalCoder.

Definition at line 41 of file HcalCoderDb.cc.

References adc2fC_().

41 {adc2fC_ (df, lf);}
void adc2fC_(const Digi &df, CaloSamples &clf) const
Definition: HcalCoderDb.cc:18
template<class Digi >
void HcalCoderDb::adc2fC_ ( const Digi &  df,
CaloSamples clf 
) const
private

Definition at line 18 of file HcalCoderDb.cc.

References ecalMGPA::adc(), HcalQIECoder::charge(), i, mCoder, mShape, and CaloSamples::setPresamples().

Referenced by adc2fC().

18  {
19  clf=CaloSamples(df.id(),df.size());
20  for (int i=0; i<df.size(); i++) {
21  clf[i]=mCoder->charge (*mShape, df[i].adc (), df[i].capid ());
22  }
23  clf.setPresamples(df.presamples());
24 }
int adc(sample_type sample)
get the ADC sample (12 bits)
int i
Definition: DBlmapReader.cc:9
void setPresamples(int pre)
set presample information
Definition: CaloSamples.cc:15
const HcalQIEShape * mShape
Definition: HcalCoderDb.h:38
const HcalQIECoder * mCoder
Definition: HcalCoderDb.h:37
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -&gt; fC conversion.
Definition: HcalQIECoder.cc:22
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HBHEDataFrame df,
int  fCapIdOffset 
) const
virtual

Implements HcalCoder.

Definition at line 43 of file HcalCoderDb.cc.

References fC2adc_().

Referenced by edm::DataMixingHcalDigiWorker::putHcal().

43 {fC2adc_ (clf, df, fCapIdOffset);}
void fC2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
Definition: HcalCoderDb.cc:26
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HFDataFrame df,
int  fCapIdOffset 
) const
virtual

Implements HcalCoder.

Definition at line 44 of file HcalCoderDb.cc.

References fC2adc_().

44 {fC2adc_ (clf, df, fCapIdOffset);}
void fC2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
Definition: HcalCoderDb.cc:26
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HODataFrame df,
int  fCapIdOffset 
) const
virtual

Implements HcalCoder.

Definition at line 45 of file HcalCoderDb.cc.

References fC2adc_().

45 {fC2adc_ (clf, df, fCapIdOffset);}
void fC2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
Definition: HcalCoderDb.cc:26
void HcalCoderDb::fC2adc ( const CaloSamples clf,
ZDCDataFrame df,
int  fCapIdOffset 
) const
virtual

Implements HcalCoder.

Definition at line 46 of file HcalCoderDb.cc.

References fC2adc_().

46 {fC2adc_ (clf, df, fCapIdOffset);}
void fC2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
Definition: HcalCoderDb.cc:26
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HcalCalibDataFrame df,
int  fCapIdOffset 
) const
virtual

Implements HcalCoder.

Definition at line 47 of file HcalCoderDb.cc.

References fC2adc_().

47 {fC2adc_ (clf, df, fCapIdOffset);}
void fC2adc_(const CaloSamples &clf, Digi &df, int fCapIdOffset) const
Definition: HcalCoderDb.cc:26
template<class Digi >
void HcalCoderDb::fC2adc_ ( const CaloSamples clf,
Digi &  df,
int  fCapIdOffset 
) const
private

Definition at line 26 of file HcalCoderDb.cc.

References HcalQIECoder::adc(), i, CaloSamples::id(), mCoder, mShape, CaloSamples::presamples(), and CaloSamples::size().

Referenced by fC2adc().

26  {
27  df = Digi (clf.id ());
28  df.setSize (clf.size ());
29  df.setPresamples (clf.presamples ());
30  for (int i=0; i<clf.size(); i++) {
31  int capId = (fCapIdOffset + i) % 4;
32  df.setSample(i, HcalQIESample(mCoder->adc(*mShape, clf[i], capId), capId, 0, 0));
33  }
34 }
int i
Definition: DBlmapReader.cc:9
int presamples() const
access presample information
Definition: CaloSamples.h:31
const HcalQIEShape * mShape
Definition: HcalCoderDb.h:38
int size() const
get the size
Definition: CaloSamples.h:24
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -&gt; ADC conversion
Definition: HcalQIECoder.cc:27
DetId id() const
get the (generic) id
Definition: CaloSamples.h:21
const HcalQIECoder * mCoder
Definition: HcalCoderDb.h:37

Member Data Documentation

const HcalQIECoder* HcalCoderDb::mCoder
private

Definition at line 37 of file HcalCoderDb.h.

Referenced by adc2fC_(), and fC2adc_().

const HcalQIEShape* HcalCoderDb::mShape
private

Definition at line 38 of file HcalCoderDb.h.

Referenced by adc2fC_(), and fC2adc_().