add AsgToolConfig class
As discussed at the AMG meeting two(?) weeks ago, I now added an AsgToolConfig
class that is available in both AnalysisBase and Athena, and that allows to configure and create public and private tools in a dual-use manner.
There are a couple of goals here:
- allow tools to be created/used in dual-use unit tests (as a replacement for
AnaToolHandle
) - provide a more direct way to configure public tools for EventLoop
- simplify/streamline the creation/handling of private tools in
AsgComponentConfig
- allow components to create private tools at run-time if the user didn't configure them (as a replacement for
AnaToolHandle
) Only the first is (sort of) implemented/convenient in the current iteration/interface, but this seems like a good point for review before I continue on.
The basic way tools are created (for now) is:
asg::AsgToolConfig config ("ToolType/name");
// configure `config` object
std::shared_ptr<void> cleanup;
ToolHandle<IToolType> tool;
ASSERT_SUCCESS (config.makeTool (tool, cleanup));
There are a couple of better ways the cleanup could be handled, but that's for another MR.