GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4ServerProxy.h
Go to the documentation of this file.
1 // $Id: TGo4ServerProxy.h 1692 2015-07-09 15:56:55Z linev $
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 TGO4SERVERPROXY_H
15 #define TGO4SERVERPROXY_H
16 
17 #include "TGo4Proxy.h"
18 #include "TString.h"
19 
22 class TGo4ServerProxy : public TGo4Proxy {
23  protected:
25  Bool_t fbAnalysisReady; // true if analysis is connected and get first info
26  Bool_t fbAnalysisSettingsReady; // true when settings are specified
28 
29  TString fNodeName; // name of remote node
30  TString fInfoStr;
31  public:
33  virtual ~TGo4ServerProxy();
34 
35  virtual void Initialize(TGo4Slot* slot) { fxParentSlot = slot; }
36 
42 
43  virtual const char* GetServerName() const { return fNodeName.Data(); }
44  virtual const char* GetUserName() const { return ""; }
45  virtual const char* GetContainedObjectInfo();
46 
47  virtual TString FindCommand(const char* name) { return ""; }
48  virtual Int_t NumCommandArgs(const char* name) { return -1; }
49  virtual Bool_t SubmitCommand(const char* name, Int_t waitres = -1, const char* arg1 = 0, const char* arg2 = 0, const char* arg3 = 0) { return kFALSE; }
50 
51  virtual Bool_t IsGo4Analysis() const { return kFALSE; }
52  virtual Bool_t IsAnalysisServer() const { return kFALSE; }
53 
54  virtual Bool_t IsConnected() { return kFALSE; }
55  virtual Bool_t IsViewer() { return kFALSE; }
56  virtual Bool_t IsController() { return kFALSE; }
57  virtual Bool_t IsAdministrator() { return kFALSE; }
58 
59  virtual Bool_t NamesListReceived() { return kFALSE; }
60  virtual Bool_t RefreshNamesList() { return kFALSE; }
61  virtual Bool_t DelayedRefreshNamesList(Int_t delay_sec) { return kFALSE; }
62 
63  void SetAnalysisLaunched(Int_t on = 1) { fAnalysisLaunched = on; }
64  Int_t IsAnalysisLaunched() const { return fAnalysisLaunched; }
65 
66  void SetAnalysisReady(Bool_t on = kTRUE) { fbAnalysisReady = on; }
67  Bool_t IsAnalysisReady() const { return fbAnalysisReady; }
68 
69  void SetAnalysisSettingsReady(Bool_t on = kTRUE) { fbAnalysisSettingsReady = on ; }
71 
72  virtual Bool_t CanSubmitObjects() { return kFALSE; }
73  virtual void RequestAnalysisSettings() {}
74  virtual void SubmitAnalysisSettings() {}
75  virtual void CloseAnalysisSettings() {}
76 
77  virtual Bool_t IsAnalysisRunning() const { return kFALSE; }
78  virtual void StartAnalysis() {}
79  virtual void StopAnalysis() {}
80 
81  virtual Bool_t RequestObjectStatus(const char* objectname, TGo4Slot* tgtslot) { return kFALSE; }
82 
83  virtual Bool_t UpdateAnalysisObject(const char* objectname, TObject* obj) { return kFALSE; }
84 
85  virtual void ClearAllAnalysisObjects() {}
86  virtual void ClearAnalysisObject(const char* fullpath) {}
87 
88  virtual void RemoteTreeDraw(const char* treename,
89  const char* varexp,
90  const char* cutcond,
91  const char* hname) {}
92 
93  virtual void RequestEventStatus(const char* evname, Bool_t astree, TGo4Slot* tgtslot) {}
94 
95  virtual void RemotePrintEvent(const char* evname,
96  Int_t evnumber,
97  Int_t subid,
98  Bool_t ishex,
99  Bool_t islong) {}
100 
101  virtual void ChageObjectProtection(const char* fullpath, const char* flags) {}
102 
103  virtual void RemoveObjectFromAnalysis(const char* fullpath) {}
104 
105  virtual void ExecuteLine(const char* line) {}
106 
107  virtual void PrintDynListEntry(const char* fullpath) {}
108 
109  virtual void LoadConfigFile(const char* fname) {}
110  virtual void SaveConfigFile(const char* fname) {}
111 
112  virtual void WriteAutoSave(const char* fname,
113  Int_t complevel,
114  Bool_t overwrite) {}
115 
116  virtual Int_t NumberOfWaitingProxyes() { return 0; }
117 
118  virtual void ResetDebugOutputRequests() {}
119 
124  virtual void DisconnectAnalysis(Int_t waittime = 30, Bool_t servershutdown = kFALSE) {}
125 
126 
127  static Bool_t GetLaunchString(TString& launchcmd,
128  TString& killcmd,
129  Int_t serverkind, // 0 - client, 1 - go4 socket, 2 - http
130  Int_t shellkind, // 0 - exec, 1 - rsh, 2 - ssh
131  Int_t konsole, // 1 - qtwindow, 2 - xterm, 3 - konsole
132  const char* name,
133  const char* remotehost,
134  const char* remotedir,
135  const char* remoteexe,
136  Int_t guiport,
137  Int_t exe_kind = 0, // 0 - executable, 1 - user library
138  const char* exeargs = 0);
139 
141 };
142 
143 
144 #endif
Bool_t IsAnalysisSettingsReady() const
virtual void WriteAutoSave(const char *fname, Int_t complevel, Bool_t overwrite)
virtual Bool_t IsViewer()
Bool_t IsAnalysisReady() const
virtual Bool_t IsConnected()
virtual Bool_t IsAdministrator()
virtual void ChageObjectProtection(const char *fullpath, const char *flags)
TGo4Slot * LoginfoSlot()
virtual const char * GetUserName() const
virtual void SaveConfigFile(const char *fname)
virtual Int_t NumCommandArgs(const char *name)
virtual void RemoveObjectFromAnalysis(const char *fullpath)
virtual ~TGo4ServerProxy()
virtual Bool_t IsAnalysisRunning() const
virtual Bool_t IsGo4Analysis() const
virtual void CloseAnalysisSettings()
void SetAnalysisLaunched(Int_t on=1)
virtual Bool_t RefreshNamesList()
virtual void RequestAnalysisSettings()
virtual Bool_t RequestObjectStatus(const char *objectname, TGo4Slot *tgtslot)
virtual void ClearAnalysisObject(const char *fullpath)
virtual void StartAnalysis()
virtual void Initialize(TGo4Slot *slot)
TGo4Slot * RatemeterSlot()
void SetAnalysisReady(Bool_t on=kTRUE)
virtual void PrintDynListEntry(const char *fullpath)
virtual void ExecuteLine(const char *line)
TGo4Slot * DebugOutputSlot()
virtual void ResetDebugOutputRequests()
virtual const char * GetContainedObjectInfo()
Int_t IsAnalysisLaunched() const
TGo4Slot * SettingsSlot()
virtual Bool_t IsAnalysisServer() const
virtual void RemoteTreeDraw(const char *treename, const char *varexp, const char *cutcond, const char *hname)
void SetAnalysisSettingsReady(Bool_t on=kTRUE)
ClassDef(TGo4ServerProxy, 1)
TGo4Slot * fxParentSlot
virtual Bool_t IsController()
virtual Bool_t UpdateAnalysisObject(const char *objectname, TObject *obj)
static Bool_t GetLaunchString(TString &launchcmd, TString &killcmd, Int_t serverkind, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, const char *remotedir, const char *remoteexe, Int_t guiport, Int_t exe_kind=0, const char *exeargs=0)
virtual Bool_t NamesListReceived()
Bool_t fbAnalysisSettingsReady
TGo4Slot * ParentSlot()
virtual void ClearAllAnalysisObjects()
virtual Bool_t CanSubmitObjects()
virtual void SubmitAnalysisSettings()
virtual void RequestEventStatus(const char *evname, Bool_t astree, TGo4Slot *tgtslot)
TString fNodeName
0 - not launched, 1 - external shell, 2 - in qt shell
virtual void StopAnalysis()
virtual Bool_t DelayedRefreshNamesList(Int_t delay_sec)
virtual const char * GetServerName() const
virtual TString FindCommand(const char *name)
virtual Int_t NumberOfWaitingProxyes()
virtual Bool_t SubmitCommand(const char *name, Int_t waitres=-1, const char *arg1=0, const char *arg2=0, const char *arg3=0)
virtual void DisconnectAnalysis(Int_t waittime=30, Bool_t servershutdown=kFALSE)
virtual void RemotePrintEvent(const char *evname, Int_t evnumber, Int_t subid, Bool_t ishex, Bool_t islong)
virtual void LoadConfigFile(const char *fname)