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

TGo4ObjectManager.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 TGO4OBJECTMANAGER_H
00017 #define TGO4OBJECTMANAGER_H
00018 
00019 #include "TGo4Slot.h"
00020 #include "TGo4AccessWrapper.h"
00021 
00022 #include "TObjArray.h"
00023 
00024 class TFile;
00025 class TDirectory;
00026 class TTree;
00027 class TFolder;
00028 
00029 class TGo4ObjectManager : public TGo4Slot, public TGo4AccessWrapper, public TGo4ObjectReceiver {
00030    public:
00031       TGo4ObjectManager();
00032 
00033       TGo4ObjectManager(const char* name, const char* title);
00034 
00035       virtual ~TGo4ObjectManager();
00036 
00037       virtual void ProduceFullName(TString& name, TGo4Slot* toparent = 0);
00038       virtual TGo4ObjectManager* GetOM() const;
00039 
00040       void MakeFolder(const char* pathname);
00041 
00042       TGo4Slot* Add(const char* pathname, TObject* obj, Bool_t owner = kFALSE, Bool_t canrename = kFALSE);
00043 
00044       TGo4Slot* MakeObjSlot(const char* foldername, const char* name = 0, const char* title = 0);
00045 
00046       TGo4Slot* AddLink(TGo4Slot* source, const char* pathname, const char* linkname, const char* linktitle);
00047 
00048       TGo4Slot* AddLink(TGo4Slot* source, const char* pathname);
00049 
00050       TGo4Slot* AddLink(const char* sourcename, const char* pathname);
00051 
00052       TGo4Slot* GetLinked(TGo4Slot* link);
00053 
00054       void AddFile(const char* pathname, const char* filename);
00055 
00056       void CloseFiles(const char* pathname);
00057 
00058       void AddDir(const char* pathname, TDirectory* dir, Bool_t owner = kFALSE, Bool_t readright = kFALSE);
00059 
00060       void AddTree(const char* pathname, TTree* tree, Bool_t owner = kFALSE);
00061 
00062       void AddFolder(const char* pathname, TFolder* folder, Bool_t owner = kFALSE);
00063 
00064       void AddROOTFolder(const char* pathname, const char* foldername);
00065 
00066       void AddROOTFolders(const char* pathname, Bool_t selected = kTRUE);
00067 
00068       void AddProxy(const char* pathname, TGo4Proxy* cont, const char* name, const char* title = "title");
00069       TGo4Proxy* GetProxy(const char* name);
00070 
00071       void DeleteSlot(const char* pathname);
00072 
00073       void SaveDataToFile(TFile* f, Bool_t onlyobjs = kFALSE, TGo4Slot* startslot = 0);
00074 
00075       void ReadDataFromFile(TFile* f);
00076 
00077       void RegisterLink(TGo4Slot* source, TGo4Slot* target, Bool_t exapndchilds = kFALSE);
00078       void UnregisterLink(TGo4Slot* target);
00079 
00080       virtual TGo4Access* ProvideAccess(const char* name = 0)
00081           { return ProvideSlotAccess(name); }
00082 
00083       virtual void Event(TGo4Slot* source, Int_t id, void* param = 0);
00084       void RetranslateEvent(TGo4Slot* source, Int_t id, void* param = 0);
00085       void RegisterObjectWith(TObject* obj, TGo4Slot* slot);
00086       void UnregisterObject(TObject* obj, TGo4Slot* slot);
00087 
00088       void PrintSlots();
00089 
00090       Int_t IterateSlots();
00091 
00092       Int_t RequestObject(const char* source, const char* targetslot, Int_t waittime_millisec = 0);
00093 
00094       virtual void RecursiveRemove(TObject* obj);
00095 
00096    protected:
00097 
00098       virtual Bool_t AssignObject(const char* path, TObject* obj, Bool_t ownership);
00099 
00100       void RemoveFromLinks(const TGo4Slot* slot);
00101 
00102       TObjArray  fLinks;     
00103 
00104       TObjArray  fCleanups;  
00105 
00106    ClassDef(TGo4ObjectManager,1);  // Object manager of all Go4 GUI objects
00107 };
00108 
00109 #endif
00110 
00111 //----------------------------END OF GO4 SOURCE FILE ---------------------

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