Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4AnalysisProxy.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4ANALYSISPROXY_H
00017 #define TGO4ANALYSISPROXY_H
00018 
00019 #include "TGo4Proxy.h"
00020 
00021 #include "TObjArray.h"
00022 
00023 class TGo4AnalysisObjectNames;
00024 class TGo4AnalysisDummySlot;
00025 class TFolder;
00026 class TGo4AnalysisObjectAccess;
00027 class TGo4Status;
00028 class TGo4Display;
00029 
00030 class TGo4AnalysisProxy : public TGo4Proxy {
00031    public:
00032       TGo4AnalysisProxy(Bool_t isserver = kFALSE);
00033       virtual ~TGo4AnalysisProxy();
00034 
00035       // proxy functionality
00036 
00037       virtual void Initialize(TGo4Slot* slot);
00038       virtual void Finalize(TGo4Slot* slot);
00039 
00040       virtual Bool_t HasSublevels() const;
00041 
00042       virtual TGo4LevelIter* MakeIter();
00043 
00044       virtual TGo4Access* MakeProxy(const char* name);
00045 
00046       virtual void WriteData(TGo4Slot* slot, TDirectory* dir, Bool_t onlyobjs);
00047       virtual void ReadData(TGo4Slot* slot, TDirectory* dir);
00048 
00049       virtual const char* GetContainedObjectInfo();
00050       virtual Int_t GetObjectKind() { return TGo4Access::kndFolder; }
00051       virtual const char* GetContainedClassName() { return ClassName(); }
00052       virtual TObject* GetAssignedObject() { return this; }
00053 
00054       virtual void Update(TGo4Slot* slot, Bool_t strong);
00055 
00056       TGo4Slot* ParentSlot() { return fxParentSlot; }
00057       TGo4Slot* SettingsSlot();
00058       TGo4Slot* RatemeterSlot();
00059       TGo4Slot* LoginfoSlot();
00060       TGo4Slot* UpdateObjectSlot();
00061 
00062       // communication with analysis functionality
00063 
00064       Bool_t IsAnalysisServer() const { return fIsServer; }
00065       Bool_t IsConnected();
00066       Int_t ConnectorPort();
00067       Int_t GetRole();
00068       Bool_t IsViewer();
00069       Bool_t IsController();
00070       Bool_t IsAdministrator();
00071 
00072       void SetAnalysisReady(Bool_t on = kTRUE) { fbAnalysisReady = on; }
00073       Bool_t IsAnalysisReady() const { return fbAnalysisReady; }
00074 
00075       void SetAnalysisSettingsReady(Bool_t on = kTRUE) { fbAnalysisSettingsReady = on ; }
00076       Bool_t IsAnalysisSettingsReady() const { return fbAnalysisSettingsReady; }
00077 
00078       Bool_t IsAnalysisRunning() const { return fbAnalysisRunning; }
00079 
00080       void RefreshNamesList();
00081       void DelayedRefreshNamesList(Int_t delay_sec);
00082       Bool_t NamesListReceived();
00083 
00084       void ReceiveObject(TNamed* obj);
00085       void ReceiveStatus(TGo4Status* status);
00086       Bool_t SubmitProxy(TGo4AnalysisObjectAccess* proxy);
00087 
00088       void LoadConfigFile(const char* fname);
00089       void SaveConfigFile(const char* fname);
00090       void WriteAutoSave(const char* fname,
00091                          Int_t complevel,
00092                          Bool_t overwrite);
00093       void StartAnalysis();
00094       void StopAnalysis();
00095       void ExecuteLine(const char* line);
00096 
00097       void RequestAnalysisSettings();
00098       void SubmitAnalysisSettings();
00099 
00100       void RequestObjectStatus(const char* objectname, TGo4Slot* tgtslot);
00101       void RequestEventStatus(const char* evname, Bool_t astree, TGo4Slot* tgtslot);
00102       void RemoteTreeDraw(const char* treename,
00103                           const char* varexp,
00104                           const char* cutcond,
00105                           const char* hname);
00106       void RemotePrintEvent(const char* evname,
00107                             Int_t evnumber,
00108                             Int_t subid,
00109                             Bool_t ishex,
00110                             Bool_t islong);
00111 
00112       Bool_t UpdateAnalysisObject(const char* fullpath, TObject* obj);
00113 
00114       void ClearAnalysisObject(const char* fullpath);
00115       void ChageObjectProtection(const char* fullpath, const char* flags);
00116       void RemoveObjectFromAnalysis(const char* fullpath, TClass* cl = 0);
00117 
00118       void PrintDynListEntry(const char* fullpath);
00119 
00120       static Int_t NumberOfWaitingProxyes() { return fNumberOfWaitingProxyes; }
00121 
00122       Bool_t LaunchAsClient(TString& launchcmd,
00123                             TString& killcmd,
00124                             Bool_t usessh,
00125                             Int_t konsole,
00126                             const char* name,
00127                             const char* remotehost,
00128                             const char* remotedir,
00129                             const char* remoteexe);
00130 
00131       static Bool_t LaunchAsServer(TString& launchcmd,
00132                                    TString& killcmd,
00133                                    Bool_t usessh,
00134                                    Int_t konsole,
00135                                    const char* name,
00136                                    const char* remotehost,
00137                                    const char* remotedir,
00138                                    const char* remoteexe);
00139 
00140       Bool_t ConnectToServer(const char* remotehost,
00141                              Int_t remoteport,
00142                              Int_t ascontroller, // 0 - observer, 1 - controller, 2 - administrator
00143                              const char* accesspass);
00144 
00145       Bool_t WaitForConnection(Int_t seconds);
00146 
00151       void DisconnectAnalysis(Int_t waittime = 30, Bool_t servershutdown = kFALSE);
00152 
00153       void DisplayDeleted(TGo4Display* displ);
00154 
00155       void DisplayDisconnected(TGo4Display* displ);
00156 
00157       virtual Bool_t HandleTimer(TTimer* timer);
00158 
00159    protected:
00160 
00161       static Bool_t GetLaunchString(TString& launchcmd,
00162                                     TString& killcmd,
00163                                     Bool_t server,
00164                                     Bool_t usessh,
00165                                     Int_t konsole,
00166                                     const char* name,
00167                                     const char* remotehost,
00168                                     const char* remotedir,
00169                                     const char* remoteexe,
00170                                     Int_t guiport);
00171 
00172       TGo4AnalysisObjectAccess* FindSubmittedProxy(const char* pathname, const char* objname);
00173       void DeleteSubmittedProxy(TGo4AnalysisObjectAccess* proxy);
00174 
00175       void AssignNewNamesList(TGo4AnalysisObjectNames* objnames);
00176 
00177       void CallSlotUpdate();
00178 
00179       Bool_t                    fIsServer;  
00180       TGo4AnalysisDummySlot*    fDummySlot;        
00181       TGo4AnalysisObjectNames*  fAnalysisNames;    
00182       TGo4Slot*                 fxParentSlot;      
00183       TObjArray                 fxSubmittedProxy;  
00184       Bool_t                    fbNamesListReceived; 
00185       Bool_t                    fbAnalysisReady;     
00186       Bool_t                    fbAnalysisSettingsReady; 
00187       Bool_t                    fbAnalysisRunning;    
00188       Int_t                     fDisconectCounter; 
00189       TGo4Display*              fxDisplay;          
00190       TString                   fInfoStr;           
00191       Int_t                     fActualRole;        
00192       TTimer*                   fxRefreshTimer;     
00193       TTimer*                   fxConnectionTimer;     
00194       static Int_t              fNumberOfWaitingProxyes;  
00195 
00196    ClassDef(TGo4AnalysisProxy, 1);
00197 };
00198 
00199 
00200 
00201 #endif
00202 
00203 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:27 2008 for Go4-v3.04-1 by  doxygen 1.4.2