The Gaudi Framework  master (d98a2936)
GaudiHandleInfo Class Referenceabstract

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/GaudiHandle.h>

Inheritance diagram for GaudiHandleInfo:
Collaboration diagram for GaudiHandleInfo:

Public Member Functions

virtual ~GaudiHandleInfo ()
 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...
 
virtual std::string pythonPropertyClassName () const =0
 The python class name for the property in the genconf-generated configurables. More...
 
virtual std::string pythonRepr () const =0
 Python representation of handle, i.e. More...
 

Protected Member Functions

 GaudiHandleInfo (std::string myComponentType, std::string myParentName)
 Some basic information and helper functions shared between various handles/arrays. More...
 
void setComponentType (std::string componentType)
 The component type. More...
 
void setParentName (std::string parent)
 The name of the parent. More...
 

Private Attributes

std::string m_componentType
 
std::string m_propertyName
 
std::string m_parentName
 

Friends

std::ostream & operator<< (std::ostream &os, const GaudiHandleInfo &handle)
 

Detailed Description

Definition at line 31 of file GaudiHandle.h.

Constructor & Destructor Documentation

◆ GaudiHandleInfo()

GaudiHandleInfo::GaudiHandleInfo ( std::string  myComponentType,
std::string  myParentName 
)
inlineprotected

Some basic information and helper functions shared between various handles/arrays.

Parameters
myComponentTypestring 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
myParentNameName of the parent that has this handle as a member. Used in printout.

Definition at line 41 of file GaudiHandle.h.

42  : m_componentType( std::move( myComponentType ) ), m_parentName( std::move( myParentName ) ) {}

◆ ~GaudiHandleInfo()

virtual GaudiHandleInfo::~GaudiHandleInfo ( )
inlinevirtual

virtual destructor so that derived class destructor is called.

Definition at line 49 of file GaudiHandle.h.

49 {}

Member Function Documentation

◆ componentType()

const std::string& GaudiHandleInfo::componentType ( ) const
inline

Definition at line 53 of file GaudiHandle.h.

53 { return m_componentType; }

◆ parentName()

const std::string& GaudiHandleInfo::parentName ( ) const
inline

The name of the parent.

Definition at line 62 of file GaudiHandle.h.

62 { return m_parentName; }

◆ propertyName()

const std::string& GaudiHandleInfo::propertyName ( ) const
inline

name as used in declareProperty(name,gaudiHandle)

Definition at line 56 of file GaudiHandle.h.

56 { return m_propertyName; }

◆ pythonPropertyClassName()

virtual std::string GaudiHandleInfo::pythonPropertyClassName ( ) const
pure virtual

The python class name for the property in the genconf-generated configurables.

The python class is defined in GaudiPython/python/GaudiHandles.py. To be implemented in derived class.

Implemented in GaudiHandleArrayBase, and GaudiHandleBase.

◆ pythonRepr()

virtual std::string GaudiHandleInfo::pythonRepr ( ) const
pure virtual

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. To be implemented in derived class.

Implemented in GaudiHandleArrayBase, and GaudiHandleBase.

◆ setComponentType()

void GaudiHandleInfo::setComponentType ( std::string  componentType)
inlineprotected

The component type.

Definition at line 81 of file GaudiHandle.h.

81 { m_componentType = std::move( componentType ); }

◆ setParentName()

void GaudiHandleInfo::setParentName ( std::string  parent)
inlineprotected

The name of the parent.

Definition at line 84 of file GaudiHandle.h.

84 { m_parentName = std::move( parent ); }

◆ setPropertyName()

void GaudiHandleInfo::setPropertyName ( std::string  propName)
inline

set name as used in declareProperty(name,gaudiHandle).

Used in printout.

Definition at line 59 of file GaudiHandle.h.

59 { m_propertyName = std::move( propName ); }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const GaudiHandleInfo handle 
)
friend

Definition at line 104 of file GaudiHandle.cpp.

104  {
105  std::string msg;
106  const auto& propName = handle.propertyName();
107  if ( !propName.empty() ) msg += propName + " = ";
108  msg += handle.pythonRepr();
109  os << msg;
110  return os;
111 }

Member Data Documentation

◆ m_componentType

std::string GaudiHandleInfo::m_componentType
private

Definition at line 90 of file GaudiHandle.h.

◆ m_parentName

std::string GaudiHandleInfo::m_parentName
private

Definition at line 92 of file GaudiHandle.h.

◆ m_propertyName

std::string GaudiHandleInfo::m_propertyName
private

Definition at line 91 of file GaudiHandle.h.


The documentation for this class was generated from the following file:
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:19
GaudiHandleInfo::componentType
const std::string & componentType() const
Definition: GaudiHandle.h:53
GaudiHandleInfo::m_parentName
std::string m_parentName
Definition: GaudiHandle.h:92
GaudiHandleInfo::propertyName
const std::string & propertyName() const
name as used in declareProperty(name,gaudiHandle)
Definition: GaudiHandle.h:56
GaudiHandleInfo::m_propertyName
std::string m_propertyName
Definition: GaudiHandle.h:91
GaudiHandleInfo::m_componentType
std::string m_componentType
Definition: GaudiHandle.h:90
GaudiHandleInfo::pythonRepr
virtual std::string pythonRepr() const =0
Python representation of handle, i.e.