******************************************************************************* * * 'Physisics do not like it, * * * physisics do not need it, * * * physisics do not use it' * * * **************************** * Usage: * * * * from gaudimodule import SUCCESS * * from GaudiAlgs import GaudiAlgo * * * * class MyClass(GaudiAlgo) : * * ' My specific Algorithm, derived from GaudiAlgo base class ' * * def __init__( self , name ) : * * 'Constructor from algorithm instance name' * * #invoke the constructor of base class * * GaudiAlgo.__init__(self , name ) * * * * def initialize ( self ) : * * 'Algorithm initialization' * * # initialize the base class * * status = GaudiAlgo.initialize( self ) * * if status.isFailure() : return status * * * * # locate the services and tools * * * * # locate some tool: * * extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') * * * * # locate the service * * rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') * * * * return SUCCESS * * * * * * def execute ( self ) : * * 'Major method (from IAlgorithm interface)' * * * * # get some data from Transient Event Store * * tracks = self.get('/Event/Rec/Tracks') * * * * # use counters * * c1 = self.counter('#Tracks') * * c2 = self.counter('No Tracks') * * if tracks.empty : * * c2+=1 * * c1 += tracks->size() * * * * if 1000 < tracks.size() : * * return self.Error('The event is *VERY* busy') * * * * return SUCCESS * * * *******************************************************************************
Definition at line 496 of file GaudiAlgs.py.