GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4Interface.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4INTERFACE_H
15 #define TGO4INTERFACE_H
16 
17 #include "TGo4AbstractInterface.h"
18 #include "TString.h"
19 
21 class TGo4AnalysisStatus;
23 class TTimer;
24 
26  protected:
27  void ProcessEvents(Int_t timeout = -1) override;
28 
29  public:
30  TGo4Interface();
32  virtual ~TGo4Interface();
33 
34  void Wait(double tm_sec) override;
35  void HotStart(const char *filename) override;
36  void Message(const char *msg) override;
37 
38  // analysis start and configuration
39 
40  void LaunchAnalysis() override;
41  void LaunchAnalysis(const char *ClientName,
42  const char *ClientDir,
43  const char *ClientExec,
44  const char *ClientNode,
45  Int_t ShellMode = 2, // 0 = exec, 1 = rsh 2 = ssh
46  Int_t TermMode = 1, // 1 = Qt 2 = Xterm 3 = konsole
47  Int_t ExeMode = 0, // 0 = exe, 1 = lib
48  const char *UserArgs = nullptr) override;
49  void ConnectAnalysis(const char *ServerNode,
50  Int_t ServerPort,
51  Int_t ControllerMode, // 0 - obsrver, 1- controller, 2 - administrator
52  const char *password = nullptr) override;
53  void WaitAnalysis(Int_t delay_sec) override;
54  void DisconnectAnalysis() override;
55  void ShutdownAnalysis() override;
56 
57  void SubmitAnalysisConfig(int tmout = 20) override;
58  void StartAnalysis() override;
59  void StopAnalysis() override;
60  void RefreshNamesList(int tmout = 10) override;
61 
62 
63  // steps configuration
64 
65  void AnalysisAutoSave(const char *filename,
66  Int_t interval,
67  Int_t compression,
68  Bool_t enabled,
69  Bool_t overwrite) override;
70 
71  void AnalysisConfigName(const char *filename) override;
72 
73  void ConfigStep(const char *stepname,
74  Bool_t enableprocess,
75  Bool_t enablesource,
76  Bool_t enablestore) override;
77 
78  void StepFileSource(const char *stepname,
79  const char *sourcename,
80  int timeout) override;
81 
82  void StepMbsFileSource(const char *stepname,
83  const char *sourcename,
84  int timeout,
85  const char *TagFile,
86  int start = 0,
87  int stop = 0,
88  int interval = 0) override;
89 
90  void StepMbsStreamSource(const char *stepname,
91  const char *sourcename,
92  int timeout,
93  int start = 0,
94  int stop = 0,
95  int interval = 0) override;
96 
97  void StepMbsTransportSource(const char *stepname,
98  const char *sourcename,
99  int timeout,
100  int start = 0,
101  int stop = 0,
102  int interval = 0) override;
103 
104  void StepMbsEventServerSource(const char *stepname,
105  const char *sourcename,
106  int timeout,
107  int start = 0,
108  int stop = 0,
109  int interval = 0) override;
110 
111  void StepMbsRevServSource(const char *stepname,
112  const char *sourcename,
113  int timeout,
114  int port,
115  int start = 0,
116  int stop = 0,
117  int interval = 0) override;
118 
119  void StepRandomSource(const char *stepname,
120  const char *sourcename,
121  int timeout) override;
122 
123  void StepUserSource(const char *stepname,
124  const char *sourcename,
125  int timeout,
126  int port,
127  const char *expr) override;
128 
129  void StepFileStore(const char *stepname,
130  const char *storename,
131  bool overwrite,
132  int bufsize,
133  int splitlevel,
134  int compression,
135  int autosaveperiod = 10000) override;
136 
137  void StepBackStore(const char *stepname,
138  const char *storename,
139  int bufsize,
140  int splitlevel) override;
141 
142  void StepUserStore(const char *stepname,
143  const char *storename) override;
144 
145  // windows management
146  ViewPanelHandle StartViewPanel() override;
147  ViewPanelHandle StartViewPanel(int x, int y, int width, int height, int mode = 1, TGo4Picture *pic = nullptr) override;
148  TString GetViewPanelName(ViewPanelHandle handle) override;
149  ViewPanelHandle FindViewPanel(const char *name) override;
150  Bool_t SetViewPanelName(ViewPanelHandle handle, const char *newname) override;
152  void RedrawPanel(ViewPanelHandle panel) override;
153  void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY) override;
154  TPad *SelectPad(ViewPanelHandle panel, Int_t number = 0) override;
155 
156  Bool_t DrawItem(const char *itemname, ViewPanelHandle panel = nullptr, const char *drawopt = nullptr) override;
157  void RedrawItem(const char *itemname) override;
158 
159  void ProcessHotStart();
160 
161  Bool_t HandleTimer(TTimer *timer) override;
162 
163  protected:
164  TGo4AnalysisProxy *AddAnalysisProxy(Bool_t isserver);
166  TGo4AnalysisStepStatus *GetStepStatus(const char *stepname);
167 
169  TString fOMDataPath;
170  TString fOMBrowserPath;
171  TString fOMEditorsPath;
172  Bool_t fCmdFinished{kFALSE};
173  TTimer *fCmdTimer{nullptr};
174  Int_t fWaitCounter{0};
175 
176 
178 };
179 
180 #endif
void StepFileStore(const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000) override
void StepMbsTransportSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
TGo4AnalysisProxy * AddAnalysisProxy(Bool_t isserver)
TGo4Interface(const TGo4Interface &)
Definition: TGo4Interface.h:31
void StepBackStore(const char *stepname, const char *storename, int bufsize, int splitlevel) override
void LaunchAnalysis() override
TString fOMBrowserPath
void StepRandomSource(const char *stepname, const char *sourcename, int timeout) override
void StepUserSource(const char *stepname, const char *sourcename, int timeout, int port, const char *expr) override
void DisconnectAnalysis() override
virtual ~TGo4Interface()
void ProcessEvents(Int_t timeout=-1) override
void Message(const char *msg) override
ViewPanelHandle FindViewPanel(const char *name) override
void ProcessHotStart()
TGo4RootBrowserProxy * fRootBrowser
ViewPanelHandle GetActiveViewPanel() override
TString fOMDataPath
ClassDefOverride(TGo4Interface, 1)
void StepMbsStreamSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
void StepMbsFileSource(const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0) override
void StepUserStore(const char *stepname, const char *storename) override
void SubmitAnalysisConfig(int tmout=20) override
void WaitAnalysis(Int_t delay_sec) override
void AnalysisConfigName(const char *filename) override
TTimer * fCmdTimer
void StepMbsRevServSource(const char *stepname, const char *sourcename, int timeout, int port, int start=0, int stop=0, int interval=0) override
void ShutdownAnalysis() override
Bool_t HandleTimer(TTimer *timer) override
TGo4AnalysisStepStatus * GetStepStatus(const char *stepname)
void AnalysisAutoSave(const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite) override
void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY) override
void ConfigStep(const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore) override
void StopAnalysis() override
TString fOMEditorsPath
void Wait(double tm_sec) override
void RefreshNamesList(int tmout=10) override
Bool_t fCmdFinished
void HotStart(const char *filename) override
void * ViewPanelHandle
TGo4AnalysisStatus * GetAnalStatus()
void StepMbsEventServerSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
ViewPanelHandle StartViewPanel() override
void StartAnalysis() override
void RedrawItem(const char *itemname) override
void StepFileSource(const char *stepname, const char *sourcename, int timeout) override
TPad * SelectPad(ViewPanelHandle panel, Int_t number=0) override
Bool_t DrawItem(const char *itemname, ViewPanelHandle panel=nullptr, const char *drawopt=nullptr) override
void RedrawPanel(ViewPanelHandle panel) override
string msg
Definition: go4init.py:11
Bool_t SetViewPanelName(ViewPanelHandle handle, const char *newname) override
void ConnectAnalysis(const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=nullptr) override
TString GetViewPanelName(ViewPanelHandle handle) override