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 TGO4OBJECTPROXY_H 00017 #define TGO4OBJECTPROXY_H 00018 00019 #include "TGo4Proxy.h" 00020 00021 class TGo4ObjectAccess : public TGo4Access { 00022 public: 00023 TGo4ObjectAccess(TObject* obj); 00024 virtual Bool_t CanGetObject() const; 00025 virtual Bool_t GetObject(TObject* &obj, Bool_t &owner) const; 00026 virtual TClass* GetObjectClass() const; 00027 virtual const char* GetObjectName() const; 00028 virtual const char* GetObjectClassName() const; 00029 00030 private: 00031 TObject* fObject; 00032 }; 00033 00034 // ************************************************************** 00035 00036 class TGo4ObjectProxy : public TGo4Proxy { 00037 public: 00038 TGo4ObjectProxy(); 00039 TGo4ObjectProxy(TObject* obj, Bool_t owner = kFALSE); 00040 virtual ~TGo4ObjectProxy(); 00041 00042 virtual void Initialize(TGo4Slot* slot); 00043 virtual void Finalize(TGo4Slot* slot); 00044 virtual Bool_t RemoveRegisteredObject(TObject* obj); 00045 00046 virtual TGo4Access* MakeProxy(const char* name); 00047 virtual TGo4LevelIter* MakeIter() { return 0; } 00048 00049 virtual Int_t GetObjectKind(); 00050 virtual const char* GetContainedClassName(); 00051 virtual const char* GetContainedObjectInfo(); 00052 virtual Int_t GetObjectSizeInfo(); 00053 00054 virtual void WriteData(TGo4Slot* slot, TDirectory* dir, Bool_t onlyobjs); 00055 virtual void ReadData(TGo4Slot* slot, TDirectory* dir); 00056 00057 virtual Bool_t IsAcceptObject(TClass* cl); 00058 virtual Bool_t AssignObject(TGo4Slot* slot, TObject* obj, Bool_t owner); 00059 virtual TObject* GetAssignedObject(); 00060 00061 protected: 00062 00063 TObject* fObject; 00064 Bool_t fOwner; 00065 00066 ClassDef(TGo4ObjectProxy, 1); 00067 }; 00068 00069 #endif 00070 00071 //----------------------------END OF GO4 SOURCE FILE ---------------------