00001
00002
00003
00004 #ifndef FROOT_TFndPreanProcess
00005 #define FROOT_TFndPreanProcess
00006
00007 #include <Riostream.h>
00008 #include "TROOT.h"
00009 #include "TSystem.h"
00010 #include "TApplication.h"
00011
00012 #include "TString.h"
00013
00014 #include "TFndHdt.h"
00015 #include "TFndPreanMan.h"
00016 #include "TFndPrean.h"
00017
00018 class TFndPreanProcess: public TObject{
00019
00020 public:
00021 enum E_FollowControl{
00022 E_Follow_NotUsed = -1,
00023 E_Follow_GoToNext = 0,
00024 E_Follow_RetryThis = 1,
00025 E_Follow_ProcessThis = 2,
00026 };
00027
00028
00029 private:
00030 TFndPreanMan *fPreanMan;
00031
00032 TString fDBhost;
00033 TString fDataPath;
00034 TString fRunType;
00035
00036 Int_t fFirstRun;
00037 Int_t fLastRun;
00038 Bool_t fIsLastRun;
00039
00040 Int_t fDebugLevel;
00041
00042 Int_t fTotEvCount;
00043 Int_t fTotEvTgt;
00044 Int_t fEvPerRunTgt;
00045 Int_t fCurEv;
00046 Int_t fIncrement;
00047 Int_t fCurrentRun;
00048 TString fLogFileName;
00049 TString fLogMsg;
00050
00051
00052 TDatime fCheckTime_Now;
00053 Int_t fStartTime;
00054 Int_t fStopTime;
00055
00056 private:
00057
00058
00059
00060
00061
00062 Int_t RunLoop();
00063 Int_t FollowDAQ();
00064
00065 public:
00066
00067 TFndPreanProcess();
00068 ~TFndPreanProcess();
00069
00070 void InitPreanalysis();
00071
00072 void SetDebugLevel(const Int_t &debug_lev) { fDebugLevel = debug_lev; }
00073
00074 void SetDBhost(const TString &db_host) { fDBhost = db_host; }
00075 void SetDataPath(const TString &data_path) { fDataPath = data_path; }
00076 void SetRunType(const TString &run_type) { fRunType = run_type; }
00077
00078 void SetCurrentRun(const Int_t &run_num) { fCurrentRun = run_num; }
00079
00080 void StartTimeCheck();
00081 void StopTimeCheck();
00082 void EventLoop();
00083 Int_t ProcessSingleRun();
00084
00085
00086 void SetRunEventTarget(const Int_t &nevt) { fEvPerRunTgt = nevt; }
00087 void SetTotEventTarget(const Int_t &nevt) { fTotEvTgt = nevt; }
00088
00089 void SetFirstRun(const Int_t &num) { fFirstRun = num; }
00090 void SetLastRun(const Int_t &num) { fLastRun = num; }
00091
00092 Int_t ProcessPreanalysis();
00093
00094 Int_t CheckRuns();
00095
00096
00097
00098
00099 ClassDef(TFndPreanProcess,0)
00100 };
00101
00102
00103
00104 #endif // FROOT_TFndPreanProcess
00105