Skip to content
Snippets Groups Projects

Remove last traces of AthAnalysisSequencer

Merged Stewart Martin-Haugh requested to merge smh/athena:old_sequencers into master
1 file
+ 0
66
Compare changes
  • Side-by-side
  • Inline
@@ -103,72 +103,6 @@ if hasattr(GaudiSequencerConf, 'AthRetrySequencer'):
pass # monkey-patching AthRetrySequencer
### AthAnalysisSequencer ----------------------------------------------------------
if hasattr(GaudiSequencerConf, 'AthAnalysisSequencer'):
# create a new base class type to replace the old configurable
class AthAnalysisSequencer( GaudiSequencerConf.AthAnalysisSequencer ):
"""Sequence of Gaudi algorithms"""
def __init__( self, name = "AthAnalysisSequencer", **kwargs ):
# call base class __init__ to pass new name
super( AthAnalysisSequencer, self ).__init__( name, **kwargs )
def getProperties( self ):
## call base class
props = super( AthAnalysisSequencer, self ).getProperties()
## correctly display the value of 'Members' by gathering children
if 'Members' in props:
props['Members'] = [ c.getFullName() for c in self.getChildren() ]
return props
def insert( self, index, item ):
self.__iadd__( item, index = index )
def filterHistogramTools( self, cutname):
tools = []
for tool in self.HistToolList:
if not tool.OnlyAtCutStages or cutname in tool.OnlyAtCutStages:
tools.append(tool)
return tools
def setup( self ):
## it is the defining property of the AthAnalysisSequener
## that it adds a HistAlg to each and every algorithm to
## produce some histograms this is achieved by the
## following lines
try:
from HistogramUtils.HistogramUtilsConf import HistAlg
for i in xrange(len(self.getChildren())-1,-1,-1):
oldName = self.getChildren()[i].name()
newName = oldName+"_histogram"
self.insert(i+1,HistAlg(newName, HistToolList = self.filterHistogramTools(oldName)))
except ImportError:
print("WARNING: unable to import package HistogramUtils for usage in AthAnalysisSequencer - auto-booking of histograms will not work!")
## synchronize the list of Members with our Configurable children
self.Members = [ c.getFullName() for c in self.getChildren() ]
import Logging
msg = Logging.logging.getLogger( "AthAnalysisSequencer" )
msg.debug( 'setup of sequence: %s', self.getName() )
if msg.isEnabledFor( Logging.logging.VERBOSE ):
# call of __repr__ is relatively expensive
msg.verbose( 'layout of sequence: %s\n%s', self.getName(), str(self) )
## delegate to base class...
super( AthAnalysisSequencer, self ).setup()
pass # AthAnalysisSequencer
# store the new AthAnalysisSequencer into CfgMgr to make it available
import CfgMgr
setattr( CfgMgr, 'AthAnalysisSequencer', AthAnalysisSequencer )
del CfgMgr
pass # monkey-patching AthAnalysisSequencer
### sequence of Gaudi configurables
class AlgSequence( AthSequencer ):
__slots__ = ()
Loading