00001 // $Id: TGo4ObjectProxy.h 560 2010-01-28 10:28:14Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4OBJECTPROXY_H 00015 #define TGO4OBJECTPROXY_H 00016 00017 #include "TGo4Proxy.h" 00018 00019 class TGo4ObjectAccess : public TGo4Access { 00020 public: 00021 TGo4ObjectAccess(TObject* obj); 00022 virtual Bool_t CanGetObject() const; 00023 virtual Bool_t GetObject(TObject* &obj, Bool_t &owner) const; 00024 virtual TClass* GetObjectClass() const; 00025 virtual const char* GetObjectName() const; 00026 virtual const char* GetObjectClassName() const; 00027 00028 private: 00029 TObject* fObject; 00030 }; 00031 00032 // ************************************************************** 00033 00034 class TGo4ObjectProxy : public TGo4Proxy { 00035 public: 00036 TGo4ObjectProxy(); 00037 TGo4ObjectProxy(TObject* obj, Bool_t owner = kFALSE); 00038 virtual ~TGo4ObjectProxy(); 00039 00040 virtual void Initialize(TGo4Slot* slot); 00041 virtual void Finalize(TGo4Slot* slot); 00042 virtual Bool_t RemoveRegisteredObject(TObject* obj); 00043 00044 virtual TGo4Access* MakeProxy(const char* name); 00045 virtual TGo4LevelIter* MakeIter() { return 0; } 00046 00047 virtual Int_t GetObjectKind(); 00048 virtual const char* GetContainedClassName(); 00049 virtual const char* GetContainedObjectInfo(); 00050 virtual Int_t GetObjectSizeInfo(); 00051 00052 virtual void WriteData(TGo4Slot* slot, TDirectory* dir, Bool_t onlyobjs); 00053 virtual void ReadData(TGo4Slot* slot, TDirectory* dir); 00054 00055 virtual Bool_t IsAcceptObject(TClass* cl); 00056 virtual Bool_t AssignObject(TGo4Slot* slot, TObject* obj, Bool_t owner); 00057 virtual TObject* GetAssignedObject(); 00058 00059 static Long_t DefineObjectSize(TObject* obj); 00060 00061 protected: 00062 00063 TObject* fObject; 00064 Bool_t fOwner; 00065 00066 ClassDef(TGo4ObjectProxy, 1); 00067 }; 00068 00069 #endif