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><br />

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

Chapter 14<br />

Tools and ToolSvc<br />

14.1 Overview<br />

Tools are light weight objects whose purpose is to help other components perform their work. A<br />

framework service, the ToolSvc, is responsible for creating and managing Tools. An Algorithm<br />

requests the tools it needs to the ToolSvc, specifying if requesting a private instance by declaring<br />

itself as the parent. Since Tools are managed by the ToolSvc, any component 1 can request a tool.<br />

Only Algorithms and Services can declare themselves as Tools parents.<br />

In this chapter we first describe these objects and the difference between “private” and “shared” tools.<br />

We then look at the AlgTool base class and show how to write concrete Tools.<br />

In section 14.3 we describe the ToolSvc and show how a component can retrieve Tools via the<br />

service.<br />

Finally we describe Associators, common utility GaudiTools for which we provide the interface and<br />

base class.<br />

14.2 Tools and Services<br />

As mentioned elsewhere Algorithms make use of framework services to perform their work. In general<br />

the same instance of a service is used by many algorithms and Services are setup and initialized once at<br />

the beginning of the job by the framework. Algorithms also delegate some of their work to<br />

sub-algorithms. Creation and execution of sub-algorithms are the responsibilities of the parent<br />

1. In this chapter we will use an Algorithm as example component requesting tools.<br />

page 123

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

Saved successfully!

Ooh no, something went wrong!