ATLAS Offline Software
|
an object that stores the configuration for an AsgComponent and is able to create one from it More...
#include <AsgComponentConfig.h>
Classes | |
struct | AccessSubtoolData |
access the configuration for the given subtool More... | |
Public Member Functions | |
AsgComponentConfig ()=default | |
standard constructor More... | |
AsgComponentConfig (const std::string &val_typeAndName) | |
initializing constructor 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... | |
Private Member Functions | |
StatusCode | checkTypeName (bool nestedNames) const |
check that the type and name members have the correct format More... | |
Private Attributes | |
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... | |
an object that stores the configuration for an AsgComponent and is able to create one from it
Definition at line 33 of file AsgComponentConfig.h.
|
default |
standard constructor
|
explicit |
initializing constructor
Definition at line 55 of file AsgComponentConfig.cxx.
|
private |
Definition at line 239 of file AsgComponentConfig.cxx.
StatusCode asg::AsgComponentConfig::addPrivateTool | ( | const std::string & | name, |
AsgComponentConfig | toolConfig | ||
) |
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.
std::string asg::AsgComponentConfig::addPrivateToolInArray | ( | const std::string & | name, |
AsgComponentConfig | toolConfig | ||
) |
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.
|
private |
check that the type and name members have the correct format
Definition at line 213 of file AsgComponentConfig.cxx.
StatusCode asg::AsgComponentConfig::configureComponentExpert | ( | const std::string & | prefix, |
bool | nestedNames | ||
) | const |
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.
StatusCode asg::AsgComponentConfig::createPrivateTool | ( | const std::string & | name, |
const std::string & | toolType | ||
) |
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.
std::string asg::AsgComponentConfig::createPrivateToolInArray | ( | const std::string & | name, |
const std::string & | toolType | ||
) |
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.
|
noexcept |
whether all properties are unset
Definition at line 63 of file AsgComponentConfig.cxx.
|
noexcept |
void asg::AsgComponentConfig::setName | ( | const std::string & | val_name | ) |
set the value of name
Definition at line 97 of file AsgComponentConfig.cxx.
StatusCode asg::AsgComponentConfig::setProperty | ( | const std::string & | name, |
const T & | value | ||
) |
set the given property
void asg::AsgComponentConfig::setPropertyFromString | ( | const std::string & | name, |
const std::string & | value | ||
) |
set a given property from a string value
Definition at line 132 of file AsgComponentConfig.cxx.
void asg::AsgComponentConfig::setType | ( | const std::string & | val_type | ) |
set the value of type
Definition at line 81 of file AsgComponentConfig.cxx.
void asg::AsgComponentConfig::setTypeAndName | ( | const std::string & | val_typeAndName | ) |
set type and name at the same time
Definition at line 115 of file AsgComponentConfig.cxx.
|
noexcept |
std::string asg::AsgComponentConfig::typeAndName | ( | ) | const |
|
private |
the value of name
Definition at line 278 of file AsgComponentConfig.h.
|
private |
the map of (private) tools to create
Definition at line 281 of file AsgComponentConfig.h.
|
private |
the map of property values
Definition at line 288 of file AsgComponentConfig.h.
|
private |
the map of (private) tool handle arrays to manage, and the tools they contain
Definition at line 285 of file AsgComponentConfig.h.
|
private |
the value of type
Definition at line 275 of file AsgComponentConfig.h.