CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

HcalCoderDb Class Reference

#include <HcalCoderDb.h>

Inheritance diagram for HcalCoderDb:
HcalCoder

List of all members.

Public Member Functions

virtual void adc2fC (const HBHEDataFrame &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 HODataFrame &df, CaloSamples &lf) const
virtual void adc2fC (const HcalCalibDataFrame &df, CaloSamples &lf) const
virtual void adc2fC (const HcalUpgradeDataFrame &df, CaloSamples &lf) const
virtual void fC2adc (const CaloSamples &clf, HcalCalibDataFrame &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, HcalUpgradeDataFrame &df, int fCapIdOffset) const
virtual void fC2adc (const CaloSamples &clf, HBHEDataFrame &df, int fCapIdOffset) const
virtual void fC2adc (const CaloSamples &clf, HFDataFrame &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
template<class Digi >
void fCUpgrade2adc_ (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:
2013/04/19 07:36:50
Revision:
1.7

Definition at line 17 of file HcalCoderDb.h.


Constructor & Destructor Documentation

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

Definition at line 13 of file HcalCoderDb.cc.

  : mCoder (&fCoder),
    mShape (&fShape)
{}

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 47 of file HcalCoderDb.cc.

References adc2fC_().

{adc2fC_ (df, lf);}
void HcalCoderDb::adc2fC ( const ZDCDataFrame df,
CaloSamples lf 
) const [virtual]

Implements HcalCoder.

Definition at line 49 of file HcalCoderDb.cc.

References adc2fC_().

{adc2fC_ (df, lf);}
void HcalCoderDb::adc2fC ( const HcalCalibDataFrame df,
CaloSamples lf 
) const [virtual]

Implements HcalCoder.

Definition at line 50 of file HcalCoderDb.cc.

References adc2fC_().

{adc2fC_ (df, lf);}
void HcalCoderDb::adc2fC ( const HFDataFrame df,
CaloSamples lf 
) const [virtual]

Implements HcalCoder.

Definition at line 48 of file HcalCoderDb.cc.

References adc2fC_().

{adc2fC_ (df, lf);}
void HcalCoderDb::adc2fC ( const HcalUpgradeDataFrame df,
CaloSamples lf 
) const [virtual]

Implements HcalCoder.

Definition at line 51 of file HcalCoderDb.cc.

References adc2fC_().

{adc2fC_ (df, lf);}
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().

                                                                                       {
  clf=CaloSamples(df.id(),df.size());
  for (int i=0; i<df.size(); i++) {
    clf[i]=mCoder->charge (*mShape, df[i].adc (), df[i].capid ());
  }
  clf.setPresamples(df.presamples());
}
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HFDataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements HcalCoder.

Definition at line 54 of file HcalCoderDb.cc.

References fC2adc_().

{fC2adc_ (clf, df, fCapIdOffset);}
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HODataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements HcalCoder.

Definition at line 55 of file HcalCoderDb.cc.

References fC2adc_().

{fC2adc_ (clf, df, fCapIdOffset);}
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HBHEDataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements HcalCoder.

Definition at line 53 of file HcalCoderDb.cc.

References fC2adc_().

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

{fC2adc_ (clf, df, fCapIdOffset);}
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HcalUpgradeDataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements HcalCoder.

Definition at line 58 of file HcalCoderDb.cc.

References fCUpgrade2adc_().

{fCUpgrade2adc_ (clf, df, fCapIdOffset);}
void HcalCoderDb::fC2adc ( const CaloSamples clf,
ZDCDataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements HcalCoder.

Definition at line 56 of file HcalCoderDb.cc.

References fC2adc_().

{fC2adc_ (clf, df, fCapIdOffset);}
void HcalCoderDb::fC2adc ( const CaloSamples clf,
HcalCalibDataFrame df,
int  fCapIdOffset 
) const [virtual]

Implements HcalCoder.

Definition at line 57 of file HcalCoderDb.cc.

References fC2adc_().

{fC2adc_ (clf, df, fCapIdOffset);}
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().

                                                                                                         {
  df = Digi (clf.id ());
  df.setSize (clf.size ());
  df.setPresamples (clf.presamples ());
  for (int i=0; i<clf.size(); i++) {
    int capId = (fCapIdOffset + i) % 4;
    df.setSample(i, HcalQIESample(mCoder->adc(*mShape, clf[i], capId), capId, 0, 0));
  }
}
template<class Digi >
void HcalCoderDb::fCUpgrade2adc_ ( const CaloSamples clf,
Digi &  df,
int  fCapIdOffset 
) const [private]

Definition at line 36 of file HcalCoderDb.cc.

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

Referenced by fC2adc().

                                                                                                                {
  df = HcalUpgradeDataFrame(clf.id(), fCapIdOffset, clf.size(), 
                            clf.presamples());
  for (int i=0; i<clf.size(); ++i) {
    df.setSample(i, mCoder->adc(*mShape, clf[i], df.capId(i)),
                 0, true);
  }
}

Member Data Documentation

Definition at line 40 of file HcalCoderDb.h.

Referenced by adc2fC_(), fC2adc_(), and fCUpgrade2adc_().

Definition at line 41 of file HcalCoderDb.h.

Referenced by adc2fC_(), fC2adc_(), and fCUpgrade2adc_().