00001 #ifndef _RunProcessor_H 00002 #define _RunProcessor_H 1 00003 00004 #include "cmEstimator.h" 00005 #include "StructDef.h" 00006 #include "TTree.h" 00007 00008 #include <vector> 00009 00010 class TFile; 00011 00012 class RunProcessor{ 00013 00014 public: 00015 00016 typedef std::vector<float> inputType; 00017 typedef cmEstimator<float> cmTool; 00018 00024 RunProcessor(const char* rootFileName, 00025 const std::vector<float>& pedestals, 00026 const float outlierCut, 00027 const unsigned int iter); 00028 00032 bool execute(run& dataRun); 00033 00035 bool finalize(); 00036 00038 virtual ~RunProcessor(); 00039 00040 private: 00041 00043 void commonModeCorrection(Event& aEvt); 00044 00046 void correctForPedestal(const Event& aEvt, 00047 RunProcessor::inputType& corData); 00048 00050 void fillEvent(RunProcessor::inputType& corData, 00051 const unsigned int iOff, Event& aEvt); 00052 00054 void fillEventTree(const Event& aEvt); 00055 00056 //void fillRunTree(run& dataRun); 00057 00058 TFile* m_rootFile; 00059 TTree* m_eTree; 00060 //TTree* m_rTree; 00061 Data m_data; 00062 00063 inputType m_pedestals; 00064 cmTool* m_cmEst; 00065 00066 int m_reject; 00067 00068 }; 00069 00070 00071 #endif // endif