00001 //-------------------------------------------------------------------------- 00002 // Environment: 00003 // This software was developed for the BESIII collaboration. If you 00004 // use all or part of it, please give an appropriate acknowledgement. 00005 // 00006 // Copyright Information: 00007 // Copyright (C) 2005 IHEP 00008 // 00009 //------------------------------------------------------------------------ 00010 00011 #ifndef EMCCALIBTAGDEADORHOT_H 00012 #define EMCCALIBTAGDEADORHOT_H 00013 00014 //------------- 00015 // C Headers -- 00016 //------------- 00017 #include <ctime> 00018 00019 #include <cstring> 00020 00021 00022 #include "GaudiKernel/Algorithm.h" 00023 00024 #include "EmcCalibConstSvc/IEmcCalibConstSvc.h" 00025 #include "EmcCalibConstSvc/EmcCalibConstSvc.h" 00026 #include "GaudiKernel/Bootstrap.h" 00027 #include "GaudiKernel/ISvcLocator.h" 00028 00029 //Ntuple 00030 #include "GaudiKernel/NTuple.h" 00031 00032 using namespace std; 00033 00034 00035 class EmcCalibTagDeadOrHot:public Algorithm{ 00036 00037 00038 public: 00039 00040 EmcCalibTagDeadOrHot(const std::string& name, ISvcLocator* pSvcLocator); 00041 00042 00043 //-------------- 00044 // Destructor 00045 //-------------- 00046 virtual ~EmcCalibTagDeadOrHot(); 00047 00048 StatusCode initialize(); 00049 StatusCode execute(); 00050 StatusCode finalize(); 00051 00052 private: 00053 00054 00055 // read in calibration constants from file or initialize them to 1 00056 void initCalibConst(); 00057 00058 void SetDeadOrHotChannel(); 00059 00060 private: 00061 00062 //cut on minimum number of direct hits needed per xtal 00063 int m_deadIxtal; 00064 int m_hotIxtal; 00065 00066 //file name extensions for different output files 00067 std::string m_fileExt; 00068 00069 //file directory 00070 std::string m_fileDir; 00071 00072 //the old absolute constants the new once are relative to 00073 double* m_oldConstants; 00074 int* m_IxtalNumber; 00075 IEmcCalibConstSvc* m_emcCalibConstSvc; 00076 00077 }; 00078 00079 #endif // EMCCALIBTAGDEADORHOT_H 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098