User Tools

Site Tools


gaudi:removealgorithm

How to remove an Algorithm in an Options file

Problem

Suppose you want to remove an algorithm, for example the instance 'FitDownstream', which is a TrackEventFitter, in the sequence 'TrackDownstreamFitSeq'. For this, you write in your options file:

GaudiSequencer("TrackDownstreamFitSeq").Members.remove(TrackEventFitter("FitDownstream"))

But this may or may not work, as it is possible that these settings get overridden in furhter options file, which is called somewhere in the back.

Solution

One solution for this is to use the method called 'appendPostConfigAction'. Do something like:

def removeAlgo():
    GaudiSequencer("TrackDownstreamFitSeq").Members.remove(TrackEventFitter("FitDownstream"))

appendPostConfigAction( removeAlgo )

Note that 'removeAlgo' does not need any brackets at the end. With this command, the method 'removeAlgo' will be executed after all other methods defined in other option files.

gaudi/removealgorithm.txt · Last modified: 2009/10/31 11:03 by decianm