ATLAS Offline Software
|
the base class for the python configuration of any asg::AsgComponent More...
#include <PythonConfigBase.h>
Public Member Functions | |
PythonConfigBase () | |
standard constructor More... | |
PythonConfigBase (const std::string &val_typeAndName) | |
initializing constructor More... | |
virtual | ~PythonConfigBase ()=default |
Virtual destructor, to make PyROOT happy. More... | |
bool | empty () const noexcept |
whether all properties are unset More... | |
const std::string & | type () const noexcept |
the type of the component More... | |
void | setType (const std::string &val_type) |
set the value of type More... | |
const std::string & | name () const noexcept |
the name of the component More... | |
void | setName (const std::string &val_name) |
set the value of name More... | |
std::string | typeAndName () const |
get type and name at the same time More... | |
void | setTypeAndName (const std::string &val_typeAndName) |
set type and name at the same time More... | |
template<typename T > | |
StatusCode | setProperty (const std::string &name, const T &value) |
set the given property More... | |
void | setPropertyFromString (const std::string &name, const std::string &value) |
set a given property from a string value More... | |
StatusCode | createPrivateTool (const std::string &name, const std::string &toolType) |
create a private tool of the given name and type More... | |
StatusCode | addPrivateTool (const std::string &name, AsgComponentConfig toolConfig) |
add a private tool from the given configuration More... | |
std::string | createPrivateToolInArray (const std::string &name, const std::string &toolType) |
the array version of createPrivateTool More... | |
std::string | addPrivateToolInArray (const std::string &name, AsgComponentConfig toolConfig) |
the array version of addPrivateTool More... | |
StatusCode | configureComponentExpert (const std::string &prefix, bool nestedNames) const |
add component configuration to configuration service (expert only) More... | |
const std::string & | componentType () const noexcept |
the actual component type to create More... | |
void | setComponentType (const std::string &val_componentType) |
Private Member Functions | |
StatusCode | checkTypeName (bool nestedNames) const |
check that the type and name members have the correct format More... | |
AccessSubtoolData | accessSubtool (const std::string &name, std::size_t split) |
AccessSubtoolData | accessSubtool (const std::string &name, std::size_t split) |
AccessSubtoolData | accessSubtool (const std::string &name, std::size_t split) |
AccessSubtoolData | accessSubtool (const std::string &name, std::size_t split) |
AccessSubtoolData | accessSubtool (const std::string &name, std::size_t split) |
AccessSubtoolData | accessSubtool (const std::string &name, std::size_t split) |
Private Attributes | |
std::string | m_componentType |
the value of componentType More... | |
std::string | m_type |
the value of type More... | |
std::string | m_name |
the value of name More... | |
std::map< std::string, details::AsgComponentPrivateToolConfig > | m_privateTools |
the map of (private) tools to create More... | |
std::map< std::string, std::vector< std::string > > | m_toolArrays |
the map of (private) tool handle arrays to manage, and the tools they contain More... | |
std::map< std::string, std::string > | m_propertyValues |
the map of property values More... | |
the base class for the python configuration of any asg::AsgComponent
Most of the functionality is provided by asg::AsgComponentConfig, with this class mostly adding one extra member that allows to the the component type. Another benefit of this class is that this is its own type, meaning overload resolution can tell that an object got set from python.
Definition at line 35 of file PythonConfigBase.h.
EL::PythonConfigBase::PythonConfigBase | ( | ) |
standard constructor
Definition at line 21 of file PythonConfigBase.cxx.
|
explicit |
initializing constructor
Definition at line 27 of file PythonConfigBase.cxx.
|
virtualdefault |
|
privateinherited |
Definition at line 239 of file AsgComponentConfig.cxx.
|
inherited |
add a private tool from the given configuration
This will ignore the name set in toolConfig
and use whatever name
is given instead.
Definition at line 167 of file AsgComponentConfig.cxx.
|
inherited |
the array version of addPrivateTool
This will ignore the name set in toolConfig
and use whatever name
is given instead.
Definition at line 188 of file AsgComponentConfig.cxx.
|
privateinherited |
check that the type and name members have the correct format
Definition at line 213 of file AsgComponentConfig.cxx.
|
noexcept |
the actual component type to create
Definition at line 34 of file PythonConfigBase.cxx.
|
inherited |
add component configuration to configuration service (expert only)
In Athena we are not creating components (we leave that to the proper Athena services), but instead we load the configuration values up first, then ask for the component to be created the normal way. This makes sure that if we dump the configuration it will include this component, and as a bonus it avoids the whole issue of having to deal with Athena factory functions.
Definition at line 364 of file AsgComponentConfig.cxx.
|
inherited |
create a private tool of the given name and type
This is the only way you can configure tool properties through AsgComponentConfig: You need to add it the tool to the component configuration and then you can set individual properties on the tool, using the property name "tool.property".
If you want to add a subtool for a tool, you can do this by calling it "tool.subtool". Note that you will have to create both the tool and the subtool this way, i.e. you can't configure a subtool without also configuring the tool that owns it.
You can apply this to tools held by either ToolHandle or asg::AnaToolHandle, but if you configure a tool held by an AnaToolHandle this way it will completely replace teh tool configuration done in the component itself.
The calling convention is somewhat inverted compared to setTypeAndName() calls, but otherwise they would be inverted compared to the setProperty() calls. :(
Definition at line 149 of file AsgComponentConfig.cxx.
|
inherited |
the array version of createPrivateTool
This returns the actual name of the tool to allow setting properties on it.
Definition at line 158 of file AsgComponentConfig.cxx.
|
noexceptinherited |
whether all properties are unset
Definition at line 63 of file AsgComponentConfig.cxx.
|
noexceptinherited |
void EL::PythonConfigBase::setComponentType | ( | const std::string & | val_componentType | ) |
Definition at line 42 of file PythonConfigBase.cxx.
|
inherited |
set the value of name
Definition at line 97 of file AsgComponentConfig.cxx.
|
inherited |
set the given property
|
inherited |
set a given property from a string value
Definition at line 132 of file AsgComponentConfig.cxx.
|
inherited |
set the value of type
Definition at line 81 of file AsgComponentConfig.cxx.
|
inherited |
set type and name at the same time
Definition at line 115 of file AsgComponentConfig.cxx.
|
noexceptinherited |
|
inherited |
|
private |
the value of componentType
Definition at line 87 of file PythonConfigBase.h.
|
privateinherited |
the value of name
Definition at line 278 of file AsgComponentConfig.h.
|
privateinherited |
the map of (private) tools to create
Definition at line 281 of file AsgComponentConfig.h.
|
privateinherited |
the map of property values
Definition at line 288 of file AsgComponentConfig.h.
|
privateinherited |
the map of (private) tool handle arrays to manage, and the tools they contain
Definition at line 285 of file AsgComponentConfig.h.
|
privateinherited |
the value of type
Definition at line 275 of file AsgComponentConfig.h.