The Gaudi Framework
v30r3 (a5ef0a68)
|
Base class to handles to be used in lieu of naked pointers to various Gaudi components. More...
#include <GaudiKernel/GaudiHandle.h>
Public Types | |
using | PropertyType = GaudiHandleProperty |
Public Member Functions | |
std::string | typeAndName () const |
The full type and name: "type/name". More... | |
std::string | type () const |
The concrete component class name: the part before the '/'. More... | |
std::string | name () const |
The instance name: the part after the '/'. More... | |
bool | empty () const |
Check if the handle has been set to empty string (i.e. More... | |
void | setTypeAndName (std::string myTypeAndName) |
The component "type/name" string. More... | |
void | setName (const std::string &myName) |
Set the instance name (part after the '/') without changing the class type. More... | |
std::string | pythonPropertyClassName () const override |
Name of the componentType with "Handle" appended. More... | |
std::string | messageName () const |
name used for printing messages More... | |
std::string | pythonRepr () const override |
Python representation of handle, i.e. More... | |
Public Member Functions inherited from GaudiHandleInfo | |
virtual | ~GaudiHandleInfo ()=default |
virtual destructor so that derived class destructor is called. More... | |
const std::string & | componentType () const |
const std::string & | propertyName () const |
name as used in declareProperty(name,gaudiHandle) More... | |
void | setPropertyName (std::string propName) |
set name as used in declareProperty(name,gaudiHandle). More... | |
const std::string & | parentName () const |
The name of the parent. More... | |
Protected Member Functions | |
GaudiHandleBase (std::string myTypeAndName, std::string myComponentType, std::string myParentName) | |
Create a handle ('smart pointer') to a gaudi component. More... | |
Protected Member Functions inherited from GaudiHandleInfo | |
GaudiHandleInfo (std::string myComponentType, std::string myParentName) | |
Some basic information and helper functions shared between various handles/arrays. More... | |
void | setComponentType (const std::string &componentType) |
The component type. More... | |
void | setParentName (const std::string &parent) |
The name of the parent. More... | |
Private Attributes | |
std::string | m_typeAndName |
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
This allows better control through the framework of component loading, configuration and usage. This base class implements common features.
Definition at line 94 of file GaudiHandle.h.
Definition at line 152 of file GaudiHandle.h.
|
inlineprotected |
Create a handle ('smart pointer') to a gaudi component.
myTypeAndName | "MyType/MyName" ("MyType" is short for "MyType/MyType") 'MyType' is the name of the concrete class of the component 'MyName' is to distinguish several instances of the same concrete class |
myComponentType | string indicating what type of component the handle is pointing to. For example: "PublicTool", "PrivateTool", "Service". This is used for printout and on the python side for type checking. On the python side there are classes with these names with "Handle" appended: PublicToolHandle,PrivateToolHandle,ServiceHandle |
myParentName | Name of the parent that has this handle as a member. Used in printout. |
Definition at line 111 of file GaudiHandle.h.
|
inline |
Check if the handle has been set to empty string (i.e.
typeAndName string is empty).
Definition at line 131 of file GaudiHandle.h.
std::string GaudiHandleBase::messageName | ( | ) | const |
name used for printing messages
Definition at line 44 of file GaudiHandle.cpp.
std::string GaudiHandleBase::name | ( | ) | const |
The instance name: the part after the '/'.
Definition at line 23 of file GaudiHandle.cpp.
|
overridevirtual |
Name of the componentType with "Handle" appended.
Used as the python class name for the property in the genconf-generated configurables. The python class is defined in GaudiPython/python/GaudiHandles.py.
Implements GaudiHandleInfo.
Definition at line 42 of file GaudiHandle.cpp.
|
overridevirtual |
Python representation of handle, i.e.
python class name and argument. Can be used in the genconf-generated configurables. The corresponding python classes are defined in GaudiPython/GaudiHandles.py
Implements GaudiHandleInfo.
Definition at line 53 of file GaudiHandle.cpp.
void GaudiHandleBase::setName | ( | const std::string & | myName | ) |
Set the instance name (part after the '/') without changing the class type.
Definition at line 40 of file GaudiHandle.cpp.
void GaudiHandleBase::setTypeAndName | ( | std::string | myTypeAndName | ) |
std::string GaudiHandleBase::type | ( | ) | const |
The concrete component class name: the part before the '/'.
Definition at line 11 of file GaudiHandle.cpp.
|
inline |
|
private |
Definition at line 158 of file GaudiHandle.h.