ATLAS Offline Software
|
an object that can create a AnaAlgorithm More...
#include <AnaAlgorithmConfig.h>
Public Member Functions | |
AnaAlgorithmConfig () | |
standard constructor More... | |
AnaAlgorithmConfig (const std::string &val_typeAndName) | |
initializing constructor More... | |
AnaAlgorithmConfig (const AsgComponentConfig &val_config) | |
initializing constructor More... | |
virtual | ~AnaAlgorithmConfig ()=default |
Virtual destructor, to make PyROOT happy. More... | |
bool | useXAODs () const noexcept |
whether we use XAODs More... | |
void | setUseXAODs (bool val_useXAODs) noexcept |
set the value of useXAODs More... | |
bool | isPublicTool () const noexcept |
whether we are really a public tool More... | |
void | setIsPublicTool (bool val_isPublicTool) noexcept |
set the value of isPublicTool More... | |
::StatusCode | makeAlgorithm (std::unique_ptr< AnaAlgorithm > &algorithm, const AlgorithmWorkerData &workerData) const |
make an algorithm from this configuration 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 | |
bool | m_useXAODs = true |
the value of useXAODs More... | |
bool | m_isPublicTool {false} |
the value of isPublicTool 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... | |
an object that can create a AnaAlgorithm
Definition at line 28 of file AnaAlgorithmConfig.h.
EL::AnaAlgorithmConfig::AnaAlgorithmConfig | ( | ) |
standard constructor
Definition at line 26 of file AnaAlgorithmConfig.cxx.
|
explicit |
initializing constructor
Definition at line 33 of file AnaAlgorithmConfig.cxx.
|
explicit |
initializing constructor
Definition at line 41 of file AnaAlgorithmConfig.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.
|
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.
|
noexcept |
whether we are really a public tool
Definition at line 65 of file AnaAlgorithmConfig.cxx.
StatusCode EL::AnaAlgorithmConfig::makeAlgorithm | ( | std::unique_ptr< AnaAlgorithm > & | algorithm, |
const AlgorithmWorkerData & | workerData | ||
) | const |
make an algorithm from this configuration
Note that generally users won't call this function. The typical workflow is to fully configure this object and then hand it over to EventLoop which will take care of creating the actual algorithm.
An exception may be unit tests. If this turns out to be too cumbersome for unit testing we may need to revisit it at that point. For now it is unclear whether we'll even be able to do algorithm unit testing either way.
Definition at line 81 of file AnaAlgorithmConfig.cxx.
|
noexceptinherited |
|
noexcept |
set the value of isPublicTool
Definition at line 73 of file AnaAlgorithmConfig.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.
|
noexcept |
|
noexceptinherited |
|
inherited |
|
noexcept |
|
private |
the value of isPublicTool
Definition at line 131 of file AnaAlgorithmConfig.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.
|
private |
the value of useXAODs
Definition at line 127 of file AnaAlgorithmConfig.h.