DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
dd4hep::sim::Geant4Handle< TYPE > Class Template Reference

Handle to Geant4 actions with built-in creation mechanism. More...

#include <Geant4Config.h>

Public Member Functions

 Geant4Handle ()=default
 Default constructor. More...
 
 Geant4Handle (TYPE *typ)
 Construction initialized with object pointer. More...
 
template<typename T >
 Geant4Handle (T *typ)
 Cross type initialization. More...
 
 Geant4Handle (const Geant4Handle &handle)
 Copy constructor. More...
 
 Geant4Handle (Geant4Handle &&handle)
 Move constructor. More...
 
 Geant4Handle (Geant4Kernel &, const char *type_name, bool shared=false)
 Initializing constructor. More...
 
 Geant4Handle (Geant4Kernel &, const std::string &type_name, bool shared=false)
 Initializing constructor. More...
 
 Geant4Handle (Geant4Kernel &ctxt, const std::string &type_name, const std::string &detector, bool shared=false)
 Constructor only implemented for sensitive objects. More...
 
 ~Geant4Handle ()
 Default destructor. More...
 
Propertyoperator[] (const std::string &property_name) const
 Property accessor. More...
 
Geant4Handleoperator= (const Geant4Handle &handle)
 Assignment operator. More...
 
Geant4Handleoperator= (Geant4Handle &&handle)
 Move assignment operator. More...
 
Geant4Handleoperator= (TYPE *ptr)
 Assignment operator. More...
 
bool operator! () const
 Validity check. More...
 
Geant4Actionaction () const
 Access to the underlying object. More...
 
TYPE * operator-> () const
 Access to the underlying object. More...
 
 operator TYPE * () const
 Conversion operator. More...
 
TYPE * get () const
 Access to the underlying object. More...
 
TYPE * release ()
 Release the underlying object. More...
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const char *type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const char *type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const char *type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const char *type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const char *type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const char *type_name, bool shared)
 
 Geant4Handle (Geant4Kernel &kernel, const std::string &type_name, const std::string &detector, bool)
 

Public Attributes

TYPE * value {nullptr}
 Pointer to referenced object. More...
 

Protected Member Functions

void checked_assign (TYPE *p)
 
TYPE * null ()
 

Detailed Description

template<typename TYPE>
class dd4hep::sim::Geant4Handle< TYPE >

Handle to Geant4 actions with built-in creation mechanism.

Author
M.Frank
Version
1.0

Definition at line 28 of file Geant4Config.h.

Constructor & Destructor Documentation

◆ Geant4Handle() [1/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( )
explicitdefault

Default constructor.

◆ Geant4Handle() [2/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( TYPE *  typ)

Construction initialized with object pointer.

Definition at line 54 of file Geant4Handle.cpp.

◆ Geant4Handle() [3/21]

template<typename TYPE >
template<typename T >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( T *  typ)
inline

Cross type initialization.

Definition at line 53 of file Geant4Handle.h.

◆ Geant4Handle() [4/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( const Geant4Handle< TYPE > &  handle)

Copy constructor.

Definition at line 59 of file Geant4Handle.cpp.

◆ Geant4Handle() [5/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( Geant4Handle< TYPE > &&  handle)

Move constructor.

Definition at line 65 of file Geant4Handle.cpp.

◆ Geant4Handle() [6/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared = false 
)

Initializing constructor.

Definition at line 138 of file Geant4Handle.cpp.

◆ Geant4Handle() [7/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared = false 
)

Initializing constructor.

Definition at line 133 of file Geant4Handle.cpp.

◆ Geant4Handle() [8/21]

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::Geant4Handle ( Geant4Kernel ctxt,
const std::string &  type_name,
const std::string &  detector,
bool  shared = false 
)

Constructor only implemented for sensitive objects.

◆ ~Geant4Handle()

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::~Geant4Handle

Default destructor.

Definition at line 142 of file Geant4Handle.cpp.

◆ Geant4Handle() [9/21]

dd4hep::sim::Geant4Handle< Geant4RunAction >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared 
)

Definition at line 236 of file Geant4Handle.cpp.

◆ Geant4Handle() [10/21]

dd4hep::sim::Geant4Handle< Geant4RunAction >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared 
)

Definition at line 241 of file Geant4Handle.cpp.

◆ Geant4Handle() [11/21]

dd4hep::sim::Geant4Handle< Geant4EventAction >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared 
)

Definition at line 247 of file Geant4Handle.cpp.

◆ Geant4Handle() [12/21]

dd4hep::sim::Geant4Handle< Geant4EventAction >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared 
)

Definition at line 252 of file Geant4Handle.cpp.

◆ Geant4Handle() [13/21]

dd4hep::sim::Geant4Handle< Geant4GeneratorAction >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared 
)

Definition at line 258 of file Geant4Handle.cpp.

◆ Geant4Handle() [14/21]

dd4hep::sim::Geant4Handle< Geant4GeneratorAction >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared 
)

Definition at line 263 of file Geant4Handle.cpp.

◆ Geant4Handle() [15/21]

dd4hep::sim::Geant4Handle< Geant4TrackingAction >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared 
)

Definition at line 269 of file Geant4Handle.cpp.

◆ Geant4Handle() [16/21]

dd4hep::sim::Geant4Handle< Geant4TrackingAction >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared 
)

Definition at line 274 of file Geant4Handle.cpp.

◆ Geant4Handle() [17/21]

dd4hep::sim::Geant4Handle< Geant4SteppingAction >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared 
)

Definition at line 280 of file Geant4Handle.cpp.

◆ Geant4Handle() [18/21]

dd4hep::sim::Geant4Handle< Geant4SteppingAction >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared 
)

Definition at line 285 of file Geant4Handle.cpp.

◆ Geant4Handle() [19/21]

dd4hep::sim::Geant4Handle< Geant4StackingAction >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
bool  shared 
)

Definition at line 291 of file Geant4Handle.cpp.

◆ Geant4Handle() [20/21]

dd4hep::sim::Geant4Handle< Geant4StackingAction >::Geant4Handle ( Geant4Kernel kernel,
const char *  type_name,
bool  shared 
)

Definition at line 296 of file Geant4Handle.cpp.

◆ Geant4Handle() [21/21]

dd4hep::sim::Geant4Handle< Geant4Sensitive >::Geant4Handle ( Geant4Kernel kernel,
const std::string &  type_name,
const std::string &  detector,
bool   
)

Definition at line 301 of file Geant4Handle.cpp.

Member Function Documentation

◆ action()

template<typename TYPE >
Geant4Action * dd4hep::sim::Geant4Handle< TYPE >::action

Access to the underlying object.

Definition at line 183 of file Geant4Handle.cpp.

◆ checked_assign()

template<typename TYPE >
void dd4hep::sim::Geant4Handle< TYPE >::checked_assign ( TYPE *  p)
protected

Definition at line 154 of file Geant4Handle.cpp.

◆ get()

template<typename TYPE >
TYPE * dd4hep::sim::Geant4Handle< TYPE >::get

Access to the underlying object.

Definition at line 175 of file Geant4Handle.cpp.

◆ null()

template<typename TYPE >
TYPE* dd4hep::sim::Geant4Handle< TYPE >::null ( )
inlineprotected

Definition at line 44 of file Geant4Handle.h.

◆ operator TYPE *()

template<typename TYPE >
dd4hep::sim::Geant4Handle< TYPE >::operator TYPE *

Conversion operator.

Definition at line 167 of file Geant4Handle.cpp.

◆ operator!()

template<typename TYPE >
bool dd4hep::sim::Geant4Handle< TYPE >::operator!

Validity check.

Definition at line 171 of file Geant4Handle.cpp.

◆ operator->()

template<typename TYPE >
TYPE * dd4hep::sim::Geant4Handle< TYPE >::operator->

Access to the underlying object.

Definition at line 179 of file Geant4Handle.cpp.

◆ operator=() [1/3]

template<typename TYPE >
Geant4Handle< TYPE > & dd4hep::sim::Geant4Handle< TYPE >::operator= ( const Geant4Handle< TYPE > &  handle)

Assignment operator.

Definition at line 188 of file Geant4Handle.cpp.

◆ operator=() [2/3]

template<typename TYPE >
Geant4Handle< TYPE > & dd4hep::sim::Geant4Handle< TYPE >::operator= ( Geant4Handle< TYPE > &&  handle)

Move assignment operator.

Assignment move operator.

Definition at line 199 of file Geant4Handle.cpp.

◆ operator=() [3/3]

template<typename TYPE >
Geant4Handle< TYPE > & dd4hep::sim::Geant4Handle< TYPE >::operator= ( TYPE *  ptr)

Assignment operator.

Definition at line 206 of file Geant4Handle.cpp.

◆ operator[]()

template<typename TYPE >
Property & dd4hep::sim::Geant4Handle< TYPE >::operator[] ( const std::string &  property_name) const

Property accessor.

Definition at line 162 of file Geant4Handle.cpp.

◆ release()

template<typename TYPE >
TYPE * dd4hep::sim::Geant4Handle< TYPE >::release

Release the underlying object.

Definition at line 148 of file Geant4Handle.cpp.

Member Data Documentation

◆ value

template<typename TYPE >
TYPE* dd4hep::sim::Geant4Handle< TYPE >::value {nullptr}
mutable

Pointer to referenced object.

Definition at line 47 of file Geant4Handle.h.


The documentation for this class was generated from the following files: