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

TGo4AbstractInterface.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 TGO4ABSTRACTINTERFACE_H
00017 #define TGO4ABSTRACTINTERFACE_H
00018 
00019 #include "TObject.h"
00020 
00021 #include "TString.h"
00022 #include "TList.h"
00023 
00024 class TGo4ObjectManager;
00025 class TGo4BrowserProxy;
00026 class TGo4AnalysisProxy;
00027 class TPad;
00028 class TGo4Picture;
00029 
00030 typedef void* ViewPanelHandle;
00031 
00032 
00076 class TGo4AbstractInterface : public TObject {
00077    protected:
00079       TGo4AbstractInterface();
00080 
00081       static TGo4AbstractInterface* fgInstance;
00082 
00083       void Initialize(TGo4ObjectManager* om, TGo4BrowserProxy* br);
00084 
00085       virtual void ProcessEvents(Int_t timeout = -1) = 0;
00086 
00087       Bool_t LoadHotStart(const char* filename);
00088       Bool_t IsHotStart();
00089       const char* NextHotStartCmd();
00090       void FreeHotStartCmds();
00091 
00092    public:
00093 
00095       virtual ~TGo4AbstractInterface();
00096 
00100       static TGo4AbstractInterface* Instance();
00101 
00103       static void DeleteInstance();
00104 
00108       TGo4ObjectManager* OM() const { return fOM; }
00109 
00114       TGo4BrowserProxy* Browser() const { return fBrowser; }
00115 
00119       TGo4AnalysisProxy* Analysis();
00120 
00125       virtual void HotStart(const char* filename) = 0;
00126 
00127       // general purpose
00128 
00130       virtual void LoadLibrary(const char* fname);
00131 
00134       virtual void OpenFile(const char* fname);
00135 
00140       virtual TString FindItem(const char* objname);
00141 
00144       virtual Bool_t CopyItem(const char* itemname);
00145 
00148       virtual Bool_t DeleteItem(const char* itemname);
00149 
00157       virtual void FetchItem(const char* itemname, Int_t wait_time = 2000);
00158 
00168       virtual TObject* GetObject(const char* itemname, Int_t updatelevel = 1);
00169 
00178       virtual TString SaveToMemory(const char* path, TObject* obj, Bool_t ownership = kFALSE);
00179 
00186       virtual Bool_t SaveToFile(const char* itemname,
00187                                 const char* filename,
00188                                 const char* filetitle = 0);
00189 
00202       virtual Bool_t ExportToFile(const char* itemname,
00203                                   const char* dirpath,
00204                                   const char* format,
00205                                   const char* filetitle = 0);
00206 
00216       virtual void ConnectHServer(const char* servername,
00217                           Int_t portnumber,
00218                           const char* basename,
00219                           const char* userpass,
00220                           const char* filter);
00221 
00225       virtual void Wait(double tm_sec) {}
00226 
00228       virtual void Message(const char* msg) {}
00229 
00230       // analysis start and configuration
00231 
00234       virtual void LaunchAnalysis() {}
00235 
00244       virtual void LaunchAnalysis(const char* ClientName,
00245                           const char* ClientDir,
00246                           const char* ClientExec,
00247                           const char* ClientNode,
00248                           Int_t ShellMode =  2,      // 1 = rsh  2 = ssh
00249                           Int_t TermMode = 1)  {}     // 1 = Qt   2 = Xterm 3 = konsole
00250 
00257       virtual void ConnectAnalysis(const char* ServerNode,
00258                            Int_t ServerPort,
00259                            Int_t UserMode,  // 0 - obsrver, 1- controller, 2 - administrator
00260                            const char* password = 0)  {}
00261 
00267       virtual void WaitAnalysis(Int_t delay_sec) {}
00268 
00270       virtual Bool_t IsAnalysisConnected();
00271 
00274       virtual void DisconnectAnalysis() {}
00275 
00279       virtual void ShutdownAnalysis() {}
00280 
00285       virtual void ExecuteLine(const char* remotecmd);
00286 
00288       virtual void RequestAnalysisConfig();
00289 
00311       virtual void SubmitAnalysisConfig() {}
00312 
00314       virtual void StartAnalysis() {}
00315 
00317       virtual void StopAnalysis() {}
00318 
00322       virtual void SetAnalysisTerminalMode(int mode) {}
00323 
00327       virtual void SetAnalysisConfigMode(int mode) {}
00328 
00332       virtual void MonitorItem(const char* itemname, Bool_t on = kTRUE);
00333 
00337       virtual void StartMonitoring(Int_t period = 10);
00338 
00340       virtual void StopMonitoring();
00341 
00343       virtual void AnalysisAutoSave(const char* filename,
00344                             Int_t interval,
00345                             Int_t compression,
00346                             Bool_t enabled,
00347                             Bool_t overwrite) {}
00348 
00350       virtual void AnalysisConfigName(const char* filename) {}
00351 
00352       // steps configuration
00353 
00355       virtual void ConfigStep(const char* stepname,
00356                       Bool_t enableprocess,
00357                       Bool_t enablesource,
00358                       Bool_t enablestore) {}
00359 
00361       virtual void StepFileSource(const char* stepname,
00362                           const char* sourcename,
00363                           int timeout) {}
00364 
00366       virtual void StepMbsFileSource(const char* stepname,
00367                              const char* sourcename,
00368                              int timeout,
00369                              const char* TagFile,
00370                              int start,
00371                              int stop,
00372                              int interval) {}
00373 
00375       virtual void StepMbsStreamSource(const char* stepname,
00376                                const char* sourcename,
00377                                int timeout) {}
00378 
00380       virtual void StepMbsTransportSource(const char* stepname,
00381                                   const char* sourcename,
00382                                   int timeout) {}
00383 
00385       virtual void StepMbsEventServerSource(const char* stepname,
00386                                     const char* sourcename,
00387                                     int timeout) {}
00388 
00390       virtual void StepMbsRevServSource(const char* stepname,
00391                                 const char* sourcename,
00392                                 int timeout,
00393                                 int port) {}
00394 
00396       virtual void StepRandomSource(const char* stepname,
00397                             const char* sourcename,
00398                             int timeout) {}
00399 
00401       virtual void StepUserSource(const char* stepname,
00402                           const char* sourcename,
00403                           int timeout,
00404                           int port,
00405                           const char* expr) {}
00406 
00408       virtual void StepFileStore(const char* stepname,
00409                          const char* storename,
00410                          bool overwrite,
00411                          int bufsize,
00412                          int splitlevel,
00413                          int compression) {}
00414 
00416       virtual void StepBackStore(const char* stepname,
00417                          const char* storename,
00418                          int bufsize,
00419                          int splitlevel) {}
00420 
00421       // windows management
00422 
00426       virtual ViewPanelHandle StartViewPanel() { return 0; }
00427 
00438       virtual ViewPanelHandle StartViewPanel(int x, int y, int width, int height, int mode = 1, TGo4Picture* pic = 0) { return 0; }
00439 
00441       virtual TString GetViewPanelName(ViewPanelHandle panel) { return TString(); }
00442 
00444       virtual ViewPanelHandle FindViewPanel(const char* name) { return 0; }
00445 
00447       virtual Bool_t SetViewPanelName(ViewPanelHandle panel, const char* newname) { return kFALSE; }
00448 
00450       virtual ViewPanelHandle GetActiveViewPanel() { return 0; }
00451 
00453       virtual void RedrawPanel(ViewPanelHandle panel) {}
00454 
00456       virtual void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY) {}
00457 
00462       virtual TPad* SelectPad(ViewPanelHandle panel, Int_t number = 0) { return 0; }
00463 
00465       virtual void SetSuperimpose(ViewPanelHandle panel, Bool_t on = kTRUE) {}
00466 
00472       virtual Bool_t DrawItem(const char* itemname, ViewPanelHandle panel = 0, const char* drawopt = 0) { return kFALSE; }
00473 
00477       virtual void RedrawItem(const char* itemname);
00478 
00479    private:
00480       TGo4ObjectManager* fOM;
00481       TGo4BrowserProxy* fBrowser;
00482       TList  fxCommands;
00483 
00484    ClassDef(TGo4AbstractInterface, 1);
00485 };
00486 
00487 
00488 #endif
00489 
00490 //----------------------------END OF GO4 SOURCE FILE ---------------------

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