emcDCProcessorv2.h

Go to the documentation of this file.
00001 #ifndef __EMCDCPROCESSORV2_H__
00002 #define __EMCDCPROCESSORV2_H__
00003 
00004 #ifndef __EMCDCPROCESSOR_H__
00005 #include "emcDCProcessor.h"
00006 #endif
00007 #include <vector>
00008 
00009 class emcTowerContent;
00010 class emcCalibrationDataHelper;
00011 
00016 class emcDCProcessorv2 : public emcDCProcessor
00017 {
00018 public:
00019   emcDCProcessorv2(emcCalibrationDataHelper*);
00020 
00021   virtual ~emcDCProcessorv2();
00022 
00023   bool calibrate(emcTowerContainer* pbsc, 
00024                  emcTowerContainer* pbgl,
00025                  time_t incrTime);
00026 
00027   int isValid() const;
00028 
00029   void identify(std::ostream& out = std::cout) const;
00030 
00031   void Reset();
00032 
00033 private:
00034 
00035   typedef float (emcDCProcessorv2::*FPTR)(emcTowerContent*,time_t);
00036 
00037   float calibrateEnergyPbGl(emcTowerContent* t, time_t);
00038   float calibrateEnergyPbSc(emcTowerContent* t, time_t incrTime);
00039   float calibrateTimePbGl(emcTowerContent* t, time_t);
00040   float calibrateTimePbSc(emcTowerContent* t,time_t incrTime);
00041 
00042   static float Log(int adc);
00043   static std::vector<float> LogInit(void);
00044 
00045 private:
00046   emcCalibrationDataHelper* fCH;
00047   bool fZeroSuppression;
00048 
00049   static const int fgADCThreshold = 10;
00050 
00051   ClassDef(emcDCProcessorv2,1)
00052 };
00053 
00054 #endif