00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4INTERFACE_H
00015 #define TGO4INTERFACE_H
00016
00017 #include "TGo4AbstractInterface.h"
00018 #include "TString.h"
00019
00020 class TGo4RootBrowserProxy;
00021 class TGo4AnalysisStatus;
00022 class TGo4AnalysisStepStatus;
00023 class TTimer;
00024
00025 class TGo4Interface : public TGo4AbstractInterface {
00026 protected:
00027 void ProcessEvents(Int_t timeout = -1);
00028
00029 public:
00030 TGo4Interface();
00031 TGo4Interface(const TGo4Interface&) {}
00032 virtual ~TGo4Interface();
00033
00034 void Wait(double tm_sec);
00035 void HotStart(const char* filename);
00036 void Message(const char* msg);
00037
00038
00039
00040 void LaunchAnalysis();
00041 void LaunchAnalysis(const char* ClientName,
00042 const char* ClientDir,
00043 const char* ClientExec,
00044 const char* ClientNode,
00045 Int_t ShellMode = 2,
00046 Int_t TermMode = 1,
00047 Int_t ExeMode = 0,
00048 const char* UserArgs = 0);
00049 void ConnectAnalysis(const char* ServerNode,
00050 Int_t ServerPort,
00051 Int_t ControllerMode,
00052 const char* password = 0);
00053 void WaitAnalysis(Int_t delay_sec);
00054 void DisconnectAnalysis();
00055 void ShutdownAnalysis();
00056
00057 void SubmitAnalysisConfig(int tmout = 20);
00058 void StartAnalysis();
00059 void StopAnalysis();
00060 void RefreshNamesList(int tmout = 10);
00061
00062
00063
00064
00065 void AnalysisAutoSave(const char* filename,
00066 Int_t interval,
00067 Int_t compression,
00068 Bool_t enabled,
00069 Bool_t overwrite);
00070
00071 void AnalysisConfigName(const char* filename);
00072
00073 void ConfigStep(const char* stepname,
00074 Bool_t enableprocess,
00075 Bool_t enablesource,
00076 Bool_t enablestore);
00077
00078 void StepFileSource(const char* stepname,
00079 const char* sourcename,
00080 int timeout);
00081
00082 void StepMbsFileSource(const char* stepname,
00083 const char* sourcename,
00084 int timeout,
00085 const char* TagFile,
00086 int start = 0,
00087 int stop = 0,
00088 int interval = 0);
00089
00090 void StepMbsStreamSource(const char* stepname,
00091 const char* sourcename,
00092 int timeout,
00093 int start = 0,
00094 int stop = 0,
00095 int interval = 0);
00096
00097 void StepMbsTransportSource(const char* stepname,
00098 const char* sourcename,
00099 int timeout,
00100 int start = 0,
00101 int stop = 0,
00102 int interval = 0);
00103
00104 void StepMbsEventServerSource(const char* stepname,
00105 const char* sourcename,
00106 int timeout,
00107 int start = 0,
00108 int stop = 0,
00109 int interval = 0);
00110
00111 void StepMbsRevServSource(const char* stepname,
00112 const char* sourcename,
00113 int timeout,
00114 int port,
00115 int start = 0,
00116 int stop = 0,
00117 int interval = 0);
00118
00119 void StepRandomSource(const char* stepname,
00120 const char* sourcename,
00121 int timeout);
00122
00123 void StepUserSource(const char* stepname,
00124 const char* sourcename,
00125 int timeout,
00126 int port,
00127 const char* expr);
00128
00129 void StepFileStore(const char* stepname,
00130 const char* storename,
00131 bool overwrite,
00132 int bufsize,
00133 int splitlevel,
00134 int compression);
00135
00136 void StepBackStore(const char* stepname,
00137 const char* storename,
00138 int bufsize,
00139 int splitlevel);
00140
00141
00142 ViewPanelHandle StartViewPanel();
00143 ViewPanelHandle StartViewPanel(int x, int y, int width, int height, int mode = 1, TGo4Picture* pic = 0);
00144 TString GetViewPanelName(ViewPanelHandle handle);
00145 ViewPanelHandle FindViewPanel(const char* name);
00146 Bool_t SetViewPanelName(ViewPanelHandle handle, const char* newname);
00147 ViewPanelHandle GetActiveViewPanel();
00148 void RedrawPanel(ViewPanelHandle panel);
00149 void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY);
00150 TPad* SelectPad(ViewPanelHandle panel, Int_t number = 0);
00151
00152 Bool_t DrawItem(const char* itemname, ViewPanelHandle panel = 0, const char* drawopt = 0);
00153 void RedrawItem(const char* itemname);
00154
00155 void ProcessHotStart();
00156
00157 virtual Bool_t HandleTimer(TTimer* timer);
00158
00159 protected:
00160 TGo4AnalysisProxy* AddAnalysisProxy(Bool_t isserver);
00161 TGo4AnalysisStatus* GetAnalStatus();
00162 TGo4AnalysisStepStatus* GetStepStatus(const char* stepname);
00163
00164 TGo4RootBrowserProxy* fRootBrowser;
00165 TString fOMDataPath;
00166 TString fOMBrowserPath;
00167 TString fOMEditorsPath;
00168 Bool_t fCmdFinished;
00169 TTimer* fCmdTimer;
00170 Int_t fWaitCounter;
00171
00172
00173 ClassDef(TGo4Interface, 1);
00174
00175 };
00176 #endif