ATLAS Offline Software
FakeProxy.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: FakeProxy.h 487276 2012-03-08 11:04:56Z krasznaa $
8 #ifndef D3PDMAKERROOT_FAKEPROXY_H
9 #define D3PDMAKERROOT_FAKEPROXY_H
10 
11 // ROOT include(s):
12 #include <TMethodCall.h>
13 
14 // Forward declaration(s):
15 class TClass;
16 
17 namespace D3PD {
18 
33  class FakeProxy {
34 
35  public:
37  FakeProxy( void* object, const std::type_info& ti );
39  ~FakeProxy();
40 
42  void clear();
43 
45  static ::TClass* getClass( const std::type_info& ti );
47  static void* newPrimitive( const std::type_info& ti );
49  static void deletePrimitive( void* ptr, const std::type_info& ti );
50 
51  private:
53 
58  enum ClearType {
60  ZERO,
61  CLEAR
62  };
64 
65  void* m_object;
66  const std::type_info& m_type;
67  ::TMethodCall m_clear;
68  ::TClass* m_dict;
69 
70  }; // class FakeProxy
71 
72 } // namespace D3PD
73 
74 #endif // D3PDMAKERROOT_FAKEPROXY_H
D3PD::FakeProxy::m_object
void * m_object
The owned object.
Definition: FakeProxy.h:65
D3PD::FakeProxy
Proxy class for storing any kind of object.
Definition: FakeProxy.h:33
D3PD::FakeProxy::m_dict
::TClass * m_dict
Dictionary for class types.
Definition: FakeProxy.h:68
D3PD::FakeProxy::CLEAR
@ CLEAR
Clear the variable by calling clear() on it.
Definition: FakeProxy.h:61
D3PD::FakeProxy::FakeProxy
FakeProxy(void *object, const std::type_info &ti)
Constructor taking ownership of an object.
Definition: FakeProxy.cxx:28
D3PD::FakeProxy::ClearType
ClearType
Variable clearing method.
Definition: FakeProxy.h:58
D3PD::FakeProxy::UNKNOWN
@ UNKNOWN
Can't clear the variable.
Definition: FakeProxy.h:59
D3PD::FakeProxy::deletePrimitive
static void deletePrimitive(void *ptr, const std::type_info &ti)
Delete a primitive.
Definition: FakeProxy.cxx:140
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
D3PD::FakeProxy::getClass
::TClass * getClass(const std::type_info &ti)
Access the dictionary of a specific object.
Definition: FakeProxy.cxx:79
D3PD::FakeProxy::ZERO
@ ZERO
Clear the variable by filling it with zeroes.
Definition: FakeProxy.h:60
D3PD::FakeProxy::newPrimitive
static void * newPrimitive(const std::type_info &ti)
Create a new instance of a primitive.
Definition: FakeProxy.cxx:101
D3PD::FakeProxy::~FakeProxy
~FakeProxy()
Destructor deleting the encapsulated object.
Definition: FakeProxy.cxx:48
D3PD::FakeProxy::clear
void clear()
Clear the contents of this variable.
Definition: FakeProxy.cxx:61
D3PD::FakeProxy::m_type
const std::type_info & m_type
The type of the owned object.
Definition: FakeProxy.h:66
D3PD::FakeProxy::m_clear
::TMethodCall m_clear
Method calling clear on the object.
Definition: FakeProxy.h:67
D3PD::FakeProxy::m_clearType
ClearType m_clearType
The variable clearing type for this object.
Definition: FakeProxy.h:63