23.05.2014 Views

Athena Developer Guide

Athena Developer Guide

Athena Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Athena</strong> Chapter 14 Tools and ToolSvc Version/Issue: 2.0.0<br />

Declaring Properties - A set of methods for declaring properties similarly to Algorithms is<br />

provided. This allows tuning of data members used by the Tools via JobOptions files. The ToolSvc<br />

takes care of calling the setProperties() method of the AlgTool base class after having<br />

instantiated a tool. Properties need to be declared in the constructor of a Tool. The property<br />

outputLevel is declared in the base class and is identically set to that of the parent component. For<br />

details on Properties see section 13.3.1.<br />

Constructor - The base class has a single constructor which takes three arguments. The first is the type<br />

(i.e. the class) of the Tool object being instantiated, the second is the full name of the object and the<br />

third is a pointer to the IInterface of the parent component. The name is used for the identification<br />

of the tool instance as described below.The parent interface is used by the tool to access for example the<br />

outputLevel of the parent.<br />

IAlgTool Interface - It consists of three accessor methods for the identification and managment of<br />

the tools: type(), name() and parent(). These methods are all implemented by the base class<br />

and should not be overridden.<br />

14.2.2.2 Tools identification<br />

A tool instance is identified by its full name. The name consist of the concatenation of the parent name,<br />

a dot, and a tool dependent part. The tool dependent part can be specified by the user, when not<br />

specified the tool type (i.e. the class) is automatically taken as the tool dependent part of the name.<br />

Examples of tool names are RecPrimaryVertex.VertexSmearer (a private tool) and<br />

ToolSvc.AddFourMom (a shared tool). The full name of the tool has to be used in the jobOptions file to<br />

set its properties.<br />

14.2.2.3 Concrete tools classes<br />

Operational functionalities of tools must be provided in the derived tool classes. A concrete tool class<br />

must inherit directly or indirectly from the AlgTool base class to ensure that it has the predefined<br />

behaviour needed for management by the ToolSvc. The inheritance structure of derived tools is<br />

shown in Figure 14.1. ConcreteTool1 implements one additional abstract interface while<br />

page 126

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!