CMS 3D CMS Logo

CastorCoderDb Class Reference

coder which uses DB services to convert to fC More...

#include <CalibFormats/CastorObjects/interface/CastorCoderDb.h>

Inheritance diagram for CastorCoderDb:

CastorCoder

List of all members.

Public Member Functions

virtual void adc2fC (const CastorDataFrame &df, CaloSamples &lf) const
 CastorCoderDb (const CastorQIECoder &fCoder, const CastorQIEShape &fShape)
virtual void fC2adc (const CaloSamples &clf, CastorDataFrame &df, int fCapIdOffset) const

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 CastorQIECodermCoder
const CastorQIEShapemShape


Detailed Description

coder which uses DB services to convert to fC

Definition at line 17 of file CastorCoderDb.h.


Constructor & Destructor Documentation

CastorCoderDb::CastorCoderDb ( const CastorQIECoder fCoder,
const CastorQIEShape fShape 
)

Definition at line 11 of file CastorCoderDB.cc.

00012   : mCoder (&fCoder),
00013     mShape (&fShape)
00014 {}


Member Function Documentation

void CastorCoderDb::adc2fC ( const CastorDataFrame df,
CaloSamples lf 
) const [virtual]

Implements CastorCoder.

Definition at line 34 of file CastorCoderDB.cc.

References adc2fC_().

00034 {adc2fC_ (df, lf);}

template<class Digi>
void CastorCoderDb::adc2fC_ ( const Digi &  df,
CaloSamples clf 
) const [inline, private]

Definition at line 16 of file CastorCoderDB.cc.

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

Referenced by adc2fC().

00016                                                                                          {
00017   clf=CaloSamples(df.id(),df.size());
00018   for (int i=0; i<df.size(); i++) {
00019     clf[i]=mCoder->charge (*mShape, df[i].adc (), df[i].capid ());
00020   }
00021   clf.setPresamples(df.presamples());
00022 }

void CastorCoderDb::fC2adc ( const CaloSamples clf,
CastorDataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements CastorCoder.

Definition at line 36 of file CastorCoderDB.cc.

References fC2adc_().

00036 {fC2adc_ (clf, df, fCapIdOffset);}

template<class Digi>
void CastorCoderDb::fC2adc_ ( const CaloSamples clf,
Digi &  df,
int  fCapIdOffset 
) const [inline, private]

Definition at line 24 of file CastorCoderDB.cc.

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

Referenced by fC2adc().

00024                                                                                                            {
00025   df = Digi (clf.id ());
00026   df.setSize (clf.size ());
00027   df.setPresamples (clf.presamples ());
00028   for (int i=0; i<clf.size(); i++) {
00029     int capId = (fCapIdOffset + i) % 4;
00030     df.setSample(i, HcalQIESample(mCoder->adc(*mShape, clf[i], capId), capId, 0, 0));
00031   }
00032 }


Member Data Documentation

const CastorQIECoder* CastorCoderDb::mCoder [private]

Definition at line 29 of file CastorCoderDb.h.

Referenced by adc2fC_(), and fC2adc_().

const CastorQIEShape* CastorCoderDb::mShape [private]

Definition at line 30 of file CastorCoderDb.h.

Referenced by adc2fC_(), and fC2adc_().


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