00001 #ifndef CASTOR_CODER_DB_H 00002 #define CASTOR_CODER_DB_H 00003 00004 #include "CalibFormats/CastorObjects/interface/CastorChannelCoder.h" 00005 #include "CalibFormats/CastorObjects/interface/QieShape.h" 00006 #include "CalibFormats/CastorObjects/interface/CastorCoder.h" 00007 00014 class CastorQIECoder; 00015 class CastorQIEShape; 00016 00017 class CastorCoderDb : public CastorCoder { 00018 public: 00019 CastorCoderDb (const CastorQIECoder& fCoder, const CastorQIEShape& fShape); 00020 00021 virtual void adc2fC(const CastorDataFrame& df, CaloSamples& lf) const; 00022 00023 virtual void fC2adc(const CaloSamples& clf, CastorDataFrame& df, int fCapIdOffset) const; 00024 00025 private: 00026 template <class Digi> void adc2fC_ (const Digi& df, CaloSamples& clf) const; 00027 template <class Digi> void fC2adc_ (const CaloSamples& clf, Digi& df, int fCapIdOffset) const; 00028 00029 const CastorQIECoder* mCoder; 00030 const CastorQIEShape* mShape; 00031 }; 00032 00033 #endif