Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:11

0001 #ifndef CASTOR_CODER_DB_H
0002 #define CASTOR_CODER_DB_H
0003 
0004 #include "CalibFormats/CastorObjects/interface/CastorChannelCoder.h"
0005 #include "CalibFormats/CastorObjects/interface/CastorCoder.h"
0006 
0007 /** \class CastorCoderDb
0008     
0009     coder which uses DB services to convert to fC
0010 
0011 */
0012 
0013 class CastorQIECoder;
0014 class CastorQIEShape;
0015 
0016 class CastorCoderDb : public CastorCoder {
0017 public:
0018   CastorCoderDb(const CastorQIECoder& fCoder, const CastorQIEShape& fShape);
0019 
0020   void adc2fC(const CastorDataFrame& df, CaloSamples& lf) const override;
0021 
0022   void fC2adc(const CaloSamples& clf, CastorDataFrame& df, int fCapIdOffset) const override;
0023 
0024 private:
0025   template <class Digi>
0026   void adc2fC_(const Digi& df, CaloSamples& clf) const;
0027   template <class Digi>
0028   void fC2adc_(const CaloSamples& clf, Digi& df, int fCapIdOffset) const;
0029 
0030   const CastorQIECoder* mCoder;
0031   const CastorQIEShape* mShape;
0032 };
0033 
0034 #endif