ATLAS Offline Software
Public Member Functions | List of all members
top::ToolLoaderBase Class Referenceabstract

This allows user libraries (and TopEventSelectionTools and TopEventReconstructionTools) to supply event selection-like tools to the main top-xaod executable. More...

#include <ToolLoaderBase.h>

Inheritance diagram for top::ToolLoaderBase:
Collaboration diagram for top::ToolLoaderBase:

Public Member Functions

 ToolLoaderBase ()
 Constructor doesn't do anything. More...
 
virtual ~ToolLoaderBase ()
 Destructor doesn't do anything. More...
 
virtual top::EventSelectorBaseinitTool (const std::string &name, const std::string &line, TFile *outputFile, std::shared_ptr< top::TopConfig > config, EL::Worker *wk=nullptr)=0
 If you make a new library and you want it to contain some event selection tools you must implement this method. More...
 
 ClassDef (top::ToolLoaderBase, 0)
 

Detailed Description

This allows user libraries (and TopEventSelectionTools and TopEventReconstructionTools) to supply event selection-like tools to the main top-xaod executable.

To add one of these to your own library you must inherit from this class and implement initTool. The source code for this (or the getting started twiki) should act as a good reference. Basically you want an if (blah == "mytool") then new MyTool().

Definition at line 33 of file ToolLoaderBase.h.

Constructor & Destructor Documentation

◆ ToolLoaderBase()

top::ToolLoaderBase::ToolLoaderBase ( )
inline

Constructor doesn't do anything.

Definition at line 36 of file ToolLoaderBase.h.

36 {}

◆ ~ToolLoaderBase()

virtual top::ToolLoaderBase::~ToolLoaderBase ( )
inlinevirtual

Destructor doesn't do anything.

Definition at line 39 of file ToolLoaderBase.h.

39 {}

Member Function Documentation

◆ ClassDef()

top::ToolLoaderBase::ClassDef ( top::ToolLoaderBase  ,
 
)

◆ initTool()

virtual top::EventSelectorBase* top::ToolLoaderBase::initTool ( const std::string &  name,
const std::string &  line,
TFile *  outputFile,
std::shared_ptr< top::TopConfig config,
EL::Worker wk = nullptr 
)
pure virtual

If you make a new library and you want it to contain some event selection tools you must implement this method.

This is the only important method for this class and is loaded at the start of top-xaod when constructor the event selection.

Parameters
nameThe name of the event selection used when saving histograms.
lineThis should be a line of text like "JET_N 25000 >= 2". The exact format of the line depends on which tool you are trying to setup.
outputFileSome of the tools (histograms for example) need access to the output file.
wkUsed by EventLoop, try not to worry about it too much.
Returns
Always a valid, configured tool or a nullptr if a tool matching the name was not found (since this might not be the only tool loader in the program).

Implemented in top::TopEventSelectionToolsLoader, and top::TopEventReconstructionToolsLoader.


The documentation for this class was generated from the following file: