GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4AccessWrapper.h
Go to the documentation of this file.
1 // $Id: TGo4AccessWrapper.h 1073 2013-12-05 12:21:46Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4ACCESSWRAPPER_H
15 #define TGO4ACCESSWRAPPER_H
16 
17 #include "TGo4Proxy.h"
18 
20  public:
22  virtual ~TGo4AccessWrapper() {}
23 
24  TObject* GetObject(const char* name = 0)
25  {
26  TGo4Access* proxy = ProvideAccess(name);
27  TObject* res = 0;
28  Bool_t owner = kFALSE;
29  if (proxy) proxy->GetObject(res, owner);
30  delete proxy;
31  return res;
32  }
33 
34  TClass* GetObjectClass(const char* name = 0)
35  {
36  TGo4Access* proxy = ProvideAccess(name);
37  TClass* res = proxy ? proxy->GetObjectClass() : 0;
38  delete proxy;
39  return res;
40  }
41 
42  const char* GetObjectClassName(const char* name = 0)
43  {
44  TGo4Access* proxy = ProvideAccess(name);
45  const char* res = proxy ? proxy->GetObjectClassName() : 0;
46  delete proxy;
47  return res;
48  }
49 
50  virtual TGo4Access* ProvideAccess(const char* name = 0) { return 0; }
51 
52 
54 };
55 
56 #endif
const char * GetObjectClassName(const char *name=0)
virtual TGo4Access * ProvideAccess(const char *name=0)
ClassDef(TGo4AccessWrapper, 1)
virtual ~TGo4AccessWrapper()
TObject * GetObject(const char *name=0)
TClass * GetObjectClass(const char *name=0)
virtual TClass * GetObjectClass() const
Definition: TGo4Proxy.cxx:36
virtual const char * GetObjectClassName() const
Definition: TGo4Proxy.cxx:41
virtual Bool_t GetObject(TObject *&obj, Bool_t &owner) const
Definition: TGo4Proxy.cxx:23