00001 // $Id: TGo4AccessWrapper.h 1073 2013-12-05 12:21:46Z 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 TGO4ACCESSWRAPPER_H 00015 #define TGO4ACCESSWRAPPER_H 00016 00017 #include "TGo4Proxy.h" 00018 00019 class TGo4AccessWrapper { 00020 public: 00021 TGo4AccessWrapper() {} 00022 virtual ~TGo4AccessWrapper() {} 00023 00024 TObject* GetObject(const char* name = 0) 00025 { 00026 TGo4Access* proxy = ProvideAccess(name); 00027 TObject* res = 0; 00028 Bool_t owner = kFALSE; 00029 if (proxy) proxy->GetObject(res, owner); 00030 delete proxy; 00031 return res; 00032 } 00033 00034 TClass* GetObjectClass(const char* name = 0) 00035 { 00036 TGo4Access* proxy = ProvideAccess(name); 00037 TClass* res = proxy ? proxy->GetObjectClass() : 0; 00038 delete proxy; 00039 return res; 00040 } 00041 00042 const char* GetObjectClassName(const char* name = 0) 00043 { 00044 TGo4Access* proxy = ProvideAccess(name); 00045 const char* res = proxy ? proxy->GetObjectClassName() : 0; 00046 delete proxy; 00047 return res; 00048 } 00049 00050 virtual TGo4Access* ProvideAccess(const char* name = 0) { return 0; } 00051 00052 00053 ClassDef(TGo4AccessWrapper,1); 00054 }; 00055 00056 #endif