Notes and Further References
To run loon you need a job macro that specifies what is to be done.
$MINOS_TUTORIAL_MACROS/loon_reco_job.Cis a typical example. The next tutorial, Writing ROOT Macros will go into more detail on the overall construction of these macros and how the JobControl package is used to assemble the job, so here we will gloss over this area and concentrate on the information that you need to provide.
The macro is broadly divided into the following phases:-
Loading a package is performed by sending a message directly to ROOT
This tells ROOT to load the DeMux library.
JobCModules used as the basis of the main event loop. A path is assembled by sending messages to the JobControl package e.g.:-
jc.Path.Create("Reco", "NoiseFilterModule::Ana " "RecordSetupModule::Get " ... "FitTrackSRListModule::Reco " "EventSRListModule::Reco " "RecordSetupModule::Reco " "Output::Put"); jc.Path.Create("Reco",....);This tells the JobControl package to create a
JobCPathfrom a series of
jc.Msg.SetLevel("Dbi","Info");sets the DatabaseInterface package messages to Info level.
jc.Path("Reco").Mod("DigitListModule").Set("ListsToMake=1");Configures the DigitListModule
acd.Set("DeMuxAlgConfig", "default"); acd.Set("NormalizeWeights", 1); // Normalize weights to 1 if non-zerotunes an individual
Algorithm configuration is the most complicated part of
the macro and will be dealt with in more detail below.
//Get Message Statistics
This tells a
JobCPath to run itself and give a report. Then the
MessageService is instructed to give message statistics..
Algorithms could be configured and this has lead to confusion in the past so there is now a policy on this matter. Unfortunately much of the code predates this policy and only some has been brought into line so far
Algorithms are the objects that actually carry out reconstruction and analysis tasks. In general
Algorithms have one or more tunable parameter. A complete, named, set is stored in an
Algorithmcomes ready to run, with one or more
AlgConfigs. If there is only one, it's name is "default", but if more than one, none will be so named. A job user can decide which
AlgConfigis used and can even fine tune the individual parameters in the selected
AlgConfig. This is done by operating on the
Registryfrom which the
JobCModules (which all inherit from
JobCModule) into a path to be executed in an event loop.
Algorithms and select which parts of the event object structure they operate on.
JobCModules are configurable and all have a default configuration so can operate "out of the box". As with
Algorithms, the user can fine tune the
JobCModule's parameters, normally via the Set(...) method.
JobCModules that adhere to our policy allow the user to change the
Algorithmit uses and the
Algorithmgets configured with. It may also allow the user to control other aspects such as which parts of the event object structure it is to operate on but must not tinker with individual parameters of the
The following lines show how the "SR" reconstruction chain
Algorithms they use for FD cosmics:-
//Configure Reconstruction Software for Far Det Cosmics data .
JobCModuleparameters that control the
Algorithmit uses and the
AlgConfigit is configured with are named
JobCModuleparameters, for example
AlgConfig. Given that a user can also directly do this, it's not hard to understand why this is banned.
Algorithmcan directly manipulate their
AlgConfigs, as shown by the following code:-
// Get the AlgFactory AlgFactory &af = AlgFactory::GetInstance(); // AlgDeMuxDigitList AlgConfig parameters AlgHandle ah = af.GetAlgHandle("AlgDeMuxDigitList", "default"); AlgConfig &acd = ah.GetAlgConfig(); acd.UnLockValues(); acd.Set("DeMuxAlgConfig", "default"); acd.Set("NormalizeWeights", 1); // Normalize weights to 1 if non-zero acd.Set("TrimHyps", 1); // Drop "0" weights if neg., or keep top N acd.LockValues();
JobCModulein the doxygen code at FNAL and check it's DefaultConfig method. This will tell you the names of all it's parameters and their default values. You can then use the Set method (inherited from
JobCModule) to change any of these.
JobCModuleuses them and then looking them up in WebDocs
Algorithmin the doxygen code at FNAL but this time look at the RunAlg(...) method and read through the code to see how they use the
AlgConfigthey have been passed.
See Configuration of JobCModules and Algorithms for the overall policy on the configuration.
For JobControl see the JobControl section of User Manual at Fnal .
For examples of other macros which we use in production, see the $SRT_PUBLIC_CONTEXT/Production directory tree.
See the following sections for configuring individual packages.
In this tutorial you will see how a script, called a ROOT macro and also called a job macro, is used to configure the off-line reconstruction job loon. Take a look and see if you can understand the macro by referring to the notes above.
Once the job ROOT macro has been assembled the loon job can be launched
loon -qb $MINOS_TUTORIAL_MACROS/loon_reco_job.C $MINOS_TUTORIAL_DATA/F00018143_0000.mdaq.root
See the overview Running the Standard Jobs for more details
about launch the loon job.
This script has been used for production work, so it's a realistic example and not
something trivial for a tutorial! Study the macro and see if you can identify
every line as one of the types listed above.
Make a local copy of $MINOS_TUTORIAL_MACROS/loon_reco_job.C and try making the following changes and rerunning the job:-
|Contact: Nick West <email@example.com>|
|Security, Privacy, Legal||