User Tools

Site Tools


brunel:retrievetool

How to retrieve a tool

General syntax

To retrieve a tool called myTool, which uses the Interface ImyTool, do the following:

ImyTool myTool = tool<ImyTool>("myTool", this);

Most of the time you'll want to do this in the initialize() of your algorithm, i.e. you declare your tool as a member variable.

  • Note: The this in the above code is not absolutely necessary, but by leaving it away, you won't be able to change properties of the tool in the options-file.

If the tool is included using the explicit syntax for namepaces a name must be specified.

IJetMaker jetMaker = tool<IJetMaker>( "LoKi::FastJetMaker","LoKi__FastJetMaker", this );

Otherwise It can't be configured in python.

brunel/retrievetool.txt · Last modified: 2010/12/20 11:07 by bursche