Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:20

0001 #ifndef HCAL_CODER_DB_H
0002 #define HCAL_CODER_DB_H
0003 
0004 #include "CalibFormats/HcalObjects/interface/HcalCoder.h"
0005 
0006 /** \class HcalCoderDb

0007 

0008     coder which uses DB services to convert to fC

0009     $Author: ratnikov

0010 */
0011 
0012 class HcalQIECoder;
0013 class HcalQIEShape;
0014 
0015 class HcalCoderDb : public HcalCoder {
0016 public:
0017   HcalCoderDb(const HcalQIECoder& fCoder, const HcalQIEShape& fShape);
0018 
0019   //these need to be overloads instead of templates to avoid linking issues when calling private member function templates

0020   void adc2fC(const HBHEDataFrame& df, CaloSamples& lf) const override;
0021   void adc2fC(const HODataFrame& df, CaloSamples& lf) const override;
0022   void adc2fC(const HFDataFrame& df, CaloSamples& lf) const override;
0023   void adc2fC(const ZDCDataFrame& df, CaloSamples& lf) const override;
0024   void adc2fC(const HcalCalibDataFrame& df, CaloSamples& lf) const override;
0025   void adc2fC(const QIE10DataFrame& df, CaloSamples& lf) const override;
0026   void adc2fC(const QIE11DataFrame& df, CaloSamples& lf) const override;
0027 
0028   void fC2adc(const CaloSamples& clf, HBHEDataFrame& df, int fCapIdOffset) const override;
0029   void fC2adc(const CaloSamples& clf, HFDataFrame& df, int fCapIdOffset) const override;
0030   void fC2adc(const CaloSamples& clf, HODataFrame& df, int fCapIdOffset) const override;
0031   void fC2adc(const CaloSamples& clf, ZDCDataFrame& df, int fCapIdOffset) const override;
0032   void fC2adc(const CaloSamples& clf, HcalCalibDataFrame& df, int fCapIdOffset) const override;
0033   void fC2adc(const CaloSamples& clf, QIE10DataFrame& df, int fCapIdOffset) const override;
0034   void fC2adc(const CaloSamples& clf, QIE11DataFrame& df, int fCapIdOffset) const override;
0035 
0036 private:
0037   template <class Digi>
0038   void adc2fC_(const Digi& df, CaloSamples& clf) const;
0039   template <class Digi>
0040   void fC2adc_(const CaloSamples& clf, Digi& df, int fCapIdOffset) const;
0041 
0042   const HcalQIECoder* mCoder;
0043   const HcalQIEShape* mShape;
0044 };
0045 
0046 #endif