GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4Interface.h
Go to the documentation of this file.
1 // $Id: TGo4Interface.h 1641 2015-06-24 14:02:48Z adamczew $
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 für 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);
28 
29  public:
30  TGo4Interface();
32  virtual ~TGo4Interface();
33 
34  void Wait(double tm_sec);
35  void HotStart(const char* filename);
36  void Message(const char* msg);
37 
38  // analysis start and configuration
39 
40  void LaunchAnalysis();
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 = 0);
49  void ConnectAnalysis(const char* ServerNode,
50  Int_t ServerPort,
51  Int_t ControllerMode, // 0 - obsrver, 1- controller, 2 - administrator
52  const char* password = 0);
53  void WaitAnalysis(Int_t delay_sec);
54  void DisconnectAnalysis();
55  void ShutdownAnalysis();
56 
57  void SubmitAnalysisConfig(int tmout = 20);
58  void StartAnalysis();
59  void StopAnalysis();
60  void RefreshNamesList(int tmout = 10);
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);
70 
71  void AnalysisConfigName(const char* filename);
72 
73  void ConfigStep(const char* stepname,
74  Bool_t enableprocess,
75  Bool_t enablesource,
76  Bool_t enablestore);
77 
78  void StepFileSource(const char* stepname,
79  const char* sourcename,
80  int timeout);
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);
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);
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);
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);
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);
118 
119  void StepRandomSource(const char* stepname,
120  const char* sourcename,
121  int timeout);
122 
123  void StepUserSource(const char* stepname,
124  const char* sourcename,
125  int timeout,
126  int port,
127  const char* expr);
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);
136 
137  void StepBackStore(const char* stepname,
138  const char* storename,
139  int bufsize,
140  int splitlevel);
141 
142  // windows management
144  ViewPanelHandle StartViewPanel(int x, int y, int width, int height, int mode = 1, TGo4Picture* pic = 0);
145  TString GetViewPanelName(ViewPanelHandle handle);
146  ViewPanelHandle FindViewPanel(const char* name);
147  Bool_t SetViewPanelName(ViewPanelHandle handle, const char* newname);
149  void RedrawPanel(ViewPanelHandle panel);
150  void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY);
151  TPad* SelectPad(ViewPanelHandle panel, Int_t number = 0);
152 
153  Bool_t DrawItem(const char* itemname, ViewPanelHandle panel = 0, const char* drawopt = 0);
154  void RedrawItem(const char* itemname);
155 
156  void ProcessHotStart();
157 
158  virtual Bool_t HandleTimer(TTimer* timer);
159 
160  protected:
161  TGo4AnalysisProxy* AddAnalysisProxy(Bool_t isserver);
163  TGo4AnalysisStepStatus* GetStepStatus(const char* stepname);
164 
166  TString fOMDataPath;
167  TString fOMBrowserPath;
168  TString fOMEditorsPath;
169  Bool_t fCmdFinished;
170  TTimer* fCmdTimer;
171  Int_t fWaitCounter;
172 
173 
175 
176 };
177 #endif
TGo4AnalysisProxy * AddAnalysisProxy(Bool_t isserver)
TGo4Interface(const TGo4Interface &)
Definition: TGo4Interface.h:31
void StepMbsFileSource(const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0)
ViewPanelHandle StartViewPanel()
TString fOMBrowserPath
void StepMbsEventServerSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
void StepRandomSource(const char *stepname, const char *sourcename, int timeout)
virtual ~TGo4Interface()
void DisconnectAnalysis()
void RefreshNamesList(int tmout=10)
void HotStart(const char *filename)
void ProcessHotStart()
void ProcessEvents(Int_t timeout=-1)
TGo4RootBrowserProxy * fRootBrowser
void StepFileSource(const char *stepname, const char *sourcename, int timeout)
void Wait(double tm_sec)
Bool_t DrawItem(const char *itemname, ViewPanelHandle panel=0, const char *drawopt=0)
TString fOMDataPath
void StepBackStore(const char *stepname, const char *storename, int bufsize, int splitlevel)
void StepFileStore(const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000)
ClassDef(TGo4Interface, 1)
TPad * SelectPad(ViewPanelHandle panel, Int_t number=0)
void RedrawPanel(ViewPanelHandle panel)
void ConfigStep(const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore)
TTimer * fCmdTimer
void StepMbsRevServSource(const char *stepname, const char *sourcename, int timeout, int port, int start=0, int stop=0, int interval=0)
Bool_t SetViewPanelName(ViewPanelHandle handle, const char *newname)
ViewPanelHandle GetActiveViewPanel()
void AnalysisAutoSave(const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite)
void ShutdownAnalysis()
TGo4AnalysisStepStatus * GetStepStatus(const char *stepname)
void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY)
TString fOMEditorsPath
void StepUserSource(const char *stepname, const char *sourcename, int timeout, int port, const char *expr)
ViewPanelHandle FindViewPanel(const char *name)
void StepMbsStreamSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
Bool_t fCmdFinished
void SubmitAnalysisConfig(int tmout=20)
void * ViewPanelHandle
virtual Bool_t HandleTimer(TTimer *timer)
TGo4AnalysisStatus * GetAnalStatus()
TString GetViewPanelName(ViewPanelHandle handle)
void AnalysisConfigName(const char *filename)
void StepMbsTransportSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
void WaitAnalysis(Int_t delay_sec)
void Message(const char *msg)
void RedrawItem(const char *itemname)
void ConnectAnalysis(const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=0)
string msg
Definition: go4init.py:11