GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
18#include "TString.h"
19
23class TTimer;
24
26 protected:
27 void ProcessEvents(Int_t timeout = -1) override;
28
29 public:
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
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;
172 Bool_t fCmdFinished{kFALSE};
173 TTimer *fCmdTimer{nullptr};
174 Int_t fWaitCounter{0};
175
176
178};
179
180#endif
void * ViewPanelHandle
Status of the analysis instance.
Status object of one analysis step.
void ProcessEvents(Int_t timeout=-1) override
void StepMbsRevServSource(const char *stepname, const char *sourcename, int timeout, int port, int start=0, int stop=0, int interval=0) override
Set MBS remote event server as step data source.
void StopAnalysis() override
Stop (suspend) analysis execution.
Bool_t SetViewPanelName(ViewPanelHandle handle, const char *newname) override
Change name of viewpanel.
void StepMbsTransportSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
Set MBS transport server as step data source.
void StepMbsFileSource(const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0) override
Set MBS file source as step data source.
void WaitAnalysis(Int_t delay_sec) override
Waits, until connection to analysis is established.
TString GetViewPanelName(ViewPanelHandle handle) override
Return name of viewpanel.
TGo4AnalysisStepStatus * GetStepStatus(const char *stepname)
void StepUserSource(const char *stepname, const char *sourcename, int timeout, int port, const char *expr) override
Set user data source as step data source.
void AnalysisConfigName(const char *filename) override
Configure name of file, where analysis configuration will be saved.
void RedrawItem(const char *itemname) override
Redraw item of given name on all viewpanels/editors.
ViewPanelHandle StartViewPanel() override
Create new view panel.
void Message(const char *msg) override
Display message in GUI status line.
void StepMbsEventServerSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
Set MBS event server as step data source.
void DisconnectAnalysis() override
Disconnects from running analysis.
void StepRandomSource(const char *stepname, const char *sourcename, int timeout) override
Set random generator as step data source.
void AnalysisAutoSave(const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite) override
Configure autosave properties of analysis.
void StepMbsStreamSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
Set MBS stream server as step data source.
ViewPanelHandle GetActiveViewPanel() override
Return handle of last active viewpanel.
void Wait(double tm_sec) override
Wait specified number of seconds.
TString fOMDataPath
void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY) override
Divide viewpanel on subpads.
TString fOMBrowserPath
Bool_t HandleTimer(TTimer *timer) override
TGo4AnalysisStatus * GetAnalStatus()
void ConfigStep(const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore) override
Set basic step properties.
TTimer * fCmdTimer
TGo4Interface(const TGo4Interface &)
void StepFileStore(const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000) override
Set file as step data storage.
void HotStart(const char *filename) override
Executes hotstart file, generated in go4 GUI.
TPad * SelectPad(ViewPanelHandle panel, Int_t number=0) override
Set active pad on viewpanel.
void StartAnalysis() override
Starts (resume) analysis execution.
TGo4AnalysisProxy * AddAnalysisProxy(Bool_t isserver)
void ShutdownAnalysis() override
Shutdown running analysis.
virtual ~TGo4Interface()
void StepBackStore(const char *stepname, const char *storename, int bufsize, int splitlevel) override
Set back store as step data storage.
void SubmitAnalysisConfig(int tmout=20) override
Submit configuration to analysis.
void RedrawPanel(ViewPanelHandle panel) override
Forces of panel redraw.
TGo4RootBrowserProxy * fRootBrowser
void StepUserStore(const char *stepname, const char *storename) override
Set user store as step data storage.
void StepFileSource(const char *stepname, const char *sourcename, int timeout) override
Set file source as step data source.
ViewPanelHandle FindViewPanel(const char *name) override
Return handle on viewpanel with specified name.
TString fOMEditorsPath
void ConnectAnalysis(const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=nullptr) override
Connect to running analysis server.
void RefreshNamesList(int tmout=10) override
Sends new request to the analysis and waits for new names list.
void LaunchAnalysis() override
Launch analysis in client mode, using default configuration.
Bool_t DrawItem(const char *itemname, ViewPanelHandle panel=nullptr, const char *drawopt=nullptr) override
Draw browser item on specified viewpanel.
ClassDefOverride(TGo4Interface, 0)
Picture cconfiguration in Go4.
Definition TGo4Picture.h:40