ATLAS Offline Software
AnaAlgSequence.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 # System import(s):
4 import copy
5 import unittest
6 
7 # ATLAS import(s):
8 from AnaAlgorithm.AlgSequence import AlgSequence
9 from AnaAlgorithm.AnaAlgorithmMeta import AnaAlgorithmMeta
10 from AnaAlgorithm.DualUseConfig import createAlgorithm, isAthena
11 
12 def getFullName(comp):
13  return f"{comp.getType()}/{comp.getName()}"
14 
16  """Analysis algorithm sequence
17 
18  This is a thin layer above a generic algorithm sequence, which helps
19  with setting up the analysis algorithms for the job.
20 
21  Note that this class is specifically meant for setting up the algorithms
22  provided centrally for analysis. The private analysis algorithms of the
23  users do not need to use this sequence type.
24  """
25 
26  __slots__ = (
27  "_algorithmMeta",
28  "_metaConfigDefault",
29  "_isGaudiConfig2",
30  "_gaudiConfig2Algorithms",
31  "_gaudiConfig2PublicTools",
32  "_algToDecorToolMap",
33  )
34 
35  def __init__( self, name = "AnalysisSequence" ):
36  """Analysis algorithm sequence constructor
37 
38  Nothing special, it just initialises the base class, and taking the
39  name of the input container of the sequence.
40 
41  Keyword arguments:
42  name -- The name of the analysis algorithm sequence
43  """
44 
45  # Initialise the base class:
46  super( AnaAlgSequence, self ).__init__( name )
47 
48  print("WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING")
49  print("WARNING!!!!! Usage of AnaAlgSequence is deprecated, please use ConfigBlocks instead")
50  print("WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING")
51 
52  # Set up the sequence's member variables:
53  self._algorithmMeta = []
55  # Special members for GaudiConfig2 types
56  self._isGaudiConfig2 = False
59  # For tools that need to be aware of their parent's
60  # input/output properties (for DecorHandle management)
62 
63  return
64 
65  # Special method to add Gaudi2 algorithms to a stand-alone list to avoid type clashes
66  def addGaudiConfig2Algorithm(self,alg):
67  self._isGaudiConfig2 = True
69  return
70 
71  # Special method to add Gaudi2 public tools to a stand-alone list to avoid type clashes
73  self._isGaudiConfig2 = True
75  return
76 
77  # Access Gaudi2 algorithms
79  return self._gaudiConfig2Algorithms
80 
81  # Access Gaudi2 public tools
83  return self._gaudiConfig2PublicTools
84 
85  # Some tools (e.g. IJetDecorator instances) hold a container name to handle
86  # Read/WriteDecorHandles correctly
87  # These need to receive the corresponding input/output properties that
88  # their parents do, so add in a map from parent to child and propagate
89  def addDecorAwareTool(self, tool, parent, inputPropName=None, outputPropName=None):
90  assert inputPropName or outputPropName, "Either input or output name should be provided for decor-aware tools"
91  self._algToDecorToolMap[getFullName(parent)] = (tool, inputPropName, outputPropName)
92 
93  def configure( self, inputName, outputName,
94  hiddenLayerPrefix = "" ):
95  """Perform a post-configuration on the analysis algorithm sequence
96 
97  This function needs to be called once the sequence is configured to
98  hold the right algorithms, in the right order, with the right settings.
99  It sets the I/O properties of the algorithms to make sure that they
100  receive the input object(s) specified, and produce the output object(s)
101  requested.
102 
103  The arguments can either be simple string names, or dictionaries in the
104  form of { "type" : "key", ... }. The latter is used to describe multiple
105  inputs/outputs to/from a sequence. See the descriptions of the various
106  analysis algorithm sequence setup functions on how their created
107  sequences should be configured by this function.
108 
109  Keyword arguments:
110  inputName -- The name(s) of the input object(s)/container(s) to
111  process
112  outputName -- The name(s) of the output object(s)/container(s) to
113  produce
114  hiddenLayerPrefix -- Possible unique string prefix for
115  object(s)/container(s) in "hidden layers" of the
116  algorithm sequence. To avoid name clashes when
117  scheduling multiple instances of the sequence.
118  """
119 
120  # To handle the case where the components are GaudiConfig2, such that the algs
121  # are not actually attached to the sequence, rather than looping directly over the
122  # sequence the contents are copied into a list so that it works for both cases
123  listOfAlgs = []
124  if self._isGaudiConfig2:
125  listOfAlgs = self._gaudiConfig2Algorithms
126  else:
127  for alg in self: listOfAlgs.append(alg)
128 
129  # Make sure that all internal variables are of the same size:
130  # Count either the sequence elements (non-GaudiConfig2) or the standalone list (GaudiConfig2)
131  nAlgs = len(listOfAlgs)
132  if len( self._algorithmMeta ) != nAlgs:
133  raise RuntimeError( 'Analysis algorithm sequence is in an ' \
134  'inconsistent state' )
135 
136  # do the dynamic configuration based on meta-information
137  metaConfig = {}
138  for name, value in self._metaConfigDefault.items() :
139  metaConfig[name] = value[:]
140  pass
141  for alg, meta in zip( listOfAlgs, self._algorithmMeta ):
142  for var, func in meta.dynConfig.items() :
143  # if this is a subtool, find the subtool
144  obj = alg
145  while '.' in var :
146  obj = getattr (alg, var[:var.find('.')])
147  var = var[var.find('.')+1:]
148  pass
149  # set the property on the algorithm/tool
150  setattr (obj, var, func (metaConfig))
151  pass
152  for name, value in meta.metaConfig.items() :
153  if name not in metaConfig :
154  raise RuntimeError ("metaConfig value " + name + " for algorithm " + alg.name() + " not registered, did you forget to call addMetaConfigDefault?")
155  metaConfig[name] += value[:]
156  pass
157  pass
158 
159  # Make the inputs and outputs dictionaries. Allowing simple sequences to
160  # be configured using simple string names.
161  if isinstance( inputName, dict ):
162  inputNameDict = inputName
163  else:
164  inputNameDict = { "default" : inputName }
165  pass
166  if isinstance( outputName, dict ):
167  outputNameDict = outputName
168  else:
169  outputNameDict = { "default" : outputName }
170  pass
171 
172  # Iterate over the algorithms:
173  currentInputs = copy.deepcopy( inputNameDict )
174  tmpIndex = {}
175  for alg, meta in zip( listOfAlgs, self._algorithmMeta ):
176 
177  # If there is no input defined for the algorithm (because it may
178  # be a public tool), then skip doing anything with it:
179  if not meta.inputPropName:
180  continue
181 
182  # Set the input name(s):
183  for inputLabel, inputPropName in meta.inputPropName.items():
184  if inputLabel not in currentInputs:
185  continue
186  setattr( alg, inputPropName, currentInputs[ inputLabel ] )
187 
188  if getFullName(alg) in self._algToDecorToolMap:
189  tool, inputPropName, outputPropName = self._algToDecorToolMap[getFullName(alg)]
190  if inputPropName:
191  setattr( tool, inputPropName, currentInputs[ inputLabel ].replace('%SYS%','NOSYS') )
192  pass
193 
194  # Set up the output name(s):
195  if meta.outputPropName:
196 
197  # Loop over the outputs of the algorithm.
198  for outputLabel, outputPropName in meta.outputPropName.items():
199  if outputLabel not in tmpIndex:
200  tmpIndex[ outputLabel ] = 1
201  pass
202  if outputLabel in outputNameDict:
203  currentInputs[ outputLabel ] = \
204  '%s_tmp%i' % ( outputNameDict[ outputLabel ],
205  tmpIndex[ outputLabel ] )
206  else:
207  currentInputs[ outputLabel ] = \
208  '%s%s_tmp%i' % ( hiddenLayerPrefix, outputLabel,
209  tmpIndex[ outputLabel ] )
210  pass
211 
212  tmpIndex[ outputLabel ] += 1
213  setattr( alg, outputPropName, currentInputs[ outputLabel ] )
214 
215  if getFullName(alg) in self._algToDecorToolMap:
216  tool, inputPropName, outputPropName = self._algToDecorToolMap[getFullName(alg)]
217  if outputPropName:
218  setattr( tool, outputPropName, currentInputs[ outputLabel ].replace('%SYS%','NOSYS') )
219 
220  pass
221  pass
222 
223  pass
224 
225  # Set the output name(s) of the last algorithm (that provides output)
226  # to the requested value:
227  currentOutputs = copy.deepcopy( outputNameDict )
228  for alg, meta in reversed( list( zip( listOfAlgs, self._algorithmMeta ) ) ):
229 
230  # Stop the loop if we're already done.
231  if len( currentOutputs ) == 0:
232  break
233 
234  # If the algorithm has (an) output(s), set them up appropriately.
235  # Remembering which "final" output still needs to be set.
236  if meta.outputPropName:
237  for outputLabel, outputKey in meta.outputPropName.items():
238  if outputLabel in currentOutputs:
239  setattr( alg, outputKey, currentOutputs[ outputLabel ] )
240 
241  if getFullName(alg) in self._algToDecorToolMap:
242  tool, inputPropName, outputPropName = self._algToDecorToolMap[getFullName(alg)]
243  if outputPropName:
244  setattr( tool, outputPropName, currentInputs[ outputLabel ].replace('%SYS%','NOSYS') )
245 
246  del currentOutputs[ outputLabel ]
247  pass
248  pass
249  pass
250 
251  # Set up the input name(s) of the algorithm correctly, in case this
252  # is needed...
253  if meta.inputPropName :
254  for inputLabel, inputKey in meta.inputPropName.items():
255  if inputLabel in currentOutputs:
256  setattr( alg, inputKey, currentOutputs[ inputLabel ] )
257 
258  if getFullName(alg) in self._algToDecorToolMap:
259  tool, inputPropName, outputPropName = self._algToDecorToolMap[getFullName(alg)]
260  if inputPropName:
261  setattr( tool, inputPropName, currentInputs[ inputLabel ].replace('%SYS%','NOSYS') )
262 
263  pass
264 
265  return
266 
267  def append( self, alg, inputPropName, outputPropName = None,
268  stageName = 'undefined',
269  metaConfig = {},
270  dynConfig = {}):
271  """Add one analysis algorithm to the sequence
272 
273  This function is specifically meant for adding one of the centrally
274  provided analysis algorithms to the sequence.
275 
276  Keyword arguments:
277  alg -- The algorithm to add (an Athena configurable, or an
278  EL::AnaAlgorithmConfig instance)
279  inputPropName -- The name of the property setting the input
280  object/container name for the algorithm
281  outputPropName -- The name of the property setting the output
282  object/container name for the algorithm [optional]
283  stageName -- name of the current processing stage [optional]
284  """
285 
286  meta = AnaAlgorithmMeta( stageName=stageName, inputPropName=inputPropName, outputPropName=outputPropName, metaConfig=metaConfig, dynConfig=dynConfig )
287  # This makes sure that a GaudiConfig2 alg isn't attached to an old-style sequence
288  if 'GaudiConfig2' in str(type(alg)):
289  self.addGaudiConfig2Algorithm(alg)
290  else:
291  self += alg
292  self._algorithmMeta.append( meta )
293  return self
294 
295  def insert( self, index, alg, inputPropName, outputPropName = None,
296  stageName = 'undefined',
297  metaConfig = {},
298  dynConfig = {} ):
299  """Insert one analysis algorithm into the sequence
300 
301  This function is specifically meant for adding one of the centrally
302  provided analysis algorithms to the sequence, in a user defined
303  location.
304 
305  Keyword arguments:
306  index -- The index to insert the algorithm at
307  alg -- The algorithm to add (an Athena configurable, or an
308  EL::AnaAlgorithmConfig instance)
309  inputPropName -- The name of the property setting the input
310  object/container name for the algorithm
311  outputPropName -- The name of the property setting the output
312  object/container name for the algorithm [optional]
313  stageName -- name of the current processing stage [optional]
314  """
315 
316  meta = AnaAlgorithmMeta( stageName=stageName, inputPropName=inputPropName, outputPropName=outputPropName, metaConfig=metaConfig, dynConfig=dynConfig )
317  super( AnaAlgSequence, self ).insert( index, alg )
318  self._algorithmMeta.insert( index, meta )
319  return self
320 
321  def addPublicTool( self, tool, stageName = 'undefined' ):
322  """Add a public tool to the job
323 
324  This function is here to provide a uniform interface with which
325  analysis algorithm sequences can declare the public tools that they
326  need. In Athena mode the function doesn't do anything. But in EventLoop
327  mode it remembers the EL::AnaAlgorithmConfig object that it receives,
328  which describes the public tool.
329 
330  Keyword arguments:
331  tool -- The tool object to add to the sequence/job
332  """
333 
334  if not isAthena:
335  # We're not in Athena, so let's remember this as a "normal" algorithm:
336  self.append( tool, inputPropName = None, stageName = stageName )
337  else:
338  if 'GaudiConfig2' in str(type(tool)):
339  self.addGaudiConfig2PublicTool(tool)
340  return
341 
342  def __delattr__( self, name ):
343  """Remove one algorithm/sequence from this sequence, by name
344 
345  This is to allow removing algorithms (or even sequences) from this
346  sequence in case that would be needed.
347 
348  Keyword arguments:
349  name -- The name of the algorithm/sequence to delete from the
350  sequence
351  """
352 
353  # Figure out the algorithm's index:
354  algIndex = -1
355  index = 0
356  for alg in self:
357  if alg.name() == name:
358  algIndex = index
359  break
360  index += 1
361  pass
362 
363  # Check if we were successful:
364  if algIndex == -1:
365  raise AttributeError( 'Algorithm/sequence with name "%s" was not ' \
366  'found' % name )
367 
368  # Remove the element from the base class:
369  super( AnaAlgSequence, self ).__delattr__( name )
370 
371  # Now remove the elements from the member lists of this class:
372  del self._algorithmMeta[ algIndex ]
373  pass
374 
375  def removeStage( self, stageName ):
376  """Remove all algorithms for the given stage
377 
378  Keyword arguments:
379  stageName -- name of the processing stage to remove
380  """
381 
382  if stageName not in self.allowedStageNames() :
383  raise ValueError ('unknown stage name ' + stageName + ' allowed stage names are ' + ', '.join(self.allowedStageNames()))
384 
385  # safety check that we actually know the stages of all
386  # algorithms
387  if stageName != "undefined" :
388  for meta in self._algorithmMeta :
389  if meta.stageName == "undefined" :
390  raise ValueError ("can not remove stages from an algorithm sequence if some algorithms belong to an undefined stage")
391  pass
392  pass
393 
394  names = []
395  for alg in self:
396  names.append (alg.name())
397  pass
398  iter = 0
399  while iter < len( self ):
400  if self._algorithmMeta[iter].stageName == stageName :
401  super( AnaAlgSequence, self ).__delattr__( names[iter] )
402  del names[iter]
403  del self._algorithmMeta[ iter ]
404  pass
405  else :
406  iter = iter + 1
407  pass
408  pass
409  pass
410 
411 
412 
413  def addMetaConfigDefault (self, name, value) :
414  """add a default value for the given meta-configuration entry
415 
416  This will both register name as a valid meta-configuration
417  value and set its default value, or add to its default value,
418  if that name is already known."""
419 
420  if name in self._metaConfigDefault :
421  self._metaConfigDefault[name] += value
422  pass
423  else :
424  self._metaConfigDefault[name] = value
425  pass
426  pass
427 
428 
429 
430  def getMetaConfig (self, name) :
431  """get the value for the given meta-configuration entry"""
432 
433  if name not in self._metaConfigDefault :
434  raise RuntimeError ("metaConfig value " + name + " not registered, did you forget to call addMetaConfigDefault?")
435  result = self._metaConfigDefault[name][:]
436  for meta in self._algorithmMeta :
437  if name in meta.metaConfig :
438  result += meta.metaConfig[name]
439  pass
440  pass
441  return result
442 
443 
444 
445  @staticmethod
447  return AnaAlgorithmMeta.allowedStageNames ()
448 
449  pass
450 
451 #
452 # Declare some unit tests for the code
453 #
454 
455 
456 class TestAnaAlgSeqSingleContainer( unittest.TestCase ):
457 
458 
459  def setUp( self ):
460  self.seq = AnaAlgSequence( 'SingleContainerSeq' )
461  alg = createAlgorithm( 'CalibrationAlg', 'Calibration' )
462  self.seq.append( alg, inputPropName = 'electrons',
463  outputPropName = 'electronsOut',
464  stageName = 'calibration' )
465  alg = createAlgorithm( 'EfficiencyAlg', 'Efficiency' )
466  self.seq.append( alg, inputPropName = 'egammas',
467  outputPropName = 'egammasOut',
468  stageName = 'efficiency' )
469  alg = createAlgorithm( 'SelectionAlg', 'Selection' )
470  self.seq.insert( 1, alg, inputPropName = 'particles',
471  outputPropName = 'particlesOut',
472  stageName = 'selection' )
473  alg = createAlgorithm( 'DummyAlgorithm', 'Dummy' )
474  self.seq.append( alg, inputPropName = None )
475  del self.seq.Dummy
476  self.seq.configure( inputName = 'Electrons',
477  outputName = 'AnalysisElectrons_%SYS%' )
478  return
479 
480 
481  def test_basics( self ):
482  self.assertEqual( len( self.seq ), 3 )
483  return
484 
485 
486  def test_inputAndOutput( self ):
487  self.assertEqual( self.seq.Calibration.electrons, 'Electrons' )
488  self.assertEqual( self.seq.Efficiency.egammasOut,
489  'AnalysisElectrons_%SYS%' )
490  return
491 
492  pass
493 
494 
496 class TestAnaAlgSeqMultiInputContainer( unittest.TestCase ):
497 
498 
499  def setUp( self ):
500  self.seq = AnaAlgSequence( 'MultiInputContainerSeq' )
501  alg = createAlgorithm( 'SelectionAlg', 'ElectronSelection' )
502  self.seq.append( alg, inputPropName = { 'electrons' : 'particles' },
503  outputPropName = { 'electrons' : 'particlesOut' } )
504  alg = createAlgorithm( 'SelectionAlg', 'MuonSelection' )
505  self.seq.append( alg, inputPropName = { 'muons' : 'particles' },
506  outputPropName = { 'muons' : 'particlesOut' } )
507  alg = createAlgorithm( 'ZCreatorAlg', 'ElectronZCreator' )
508  self.seq.append( alg, inputPropName = { 'electrons' : 'particles' },
509  outputPropName = { 'electronZs' : 'zCandidates' } )
510  alg = createAlgorithm( 'ZCreatorAlg', 'MuonZCreator' )
511  self.seq.append( alg, inputPropName = { 'muons' : 'particles' },
512  outputPropName = { 'muonZs' : 'zCandidates' } )
513  alg = createAlgorithm( 'ZCombinerAlg', 'ZCombiner' )
514  self.seq.append( alg, inputPropName = { 'electronZs' : 'container1',
515  'muonZs' : 'container2' },
516  outputPropName = { 'Zs' : 'output' } )
517  alg = createAlgorithm( 'ZCalibratorAlg', 'ZCalibrator' )
518  self.seq.append( alg, inputPropName = { 'Zs' : 'input' },
519  outputPropName = 'output' )
520  self.seq.configure( inputName = { 'electrons' : 'AnalysisElectrons_%SYS%',
521  'muons' : 'AnalysisMuons_%SYS%' },
522  outputName = 'ZCandidates_%SYS%' )
523  return
524 
525 
526  def test_inputAndOutput( self ):
527  self.assertEqual( self.seq.ElectronSelection.particles,
528  'AnalysisElectrons_%SYS%' )
529  self.assertEqual( self.seq.MuonSelection.particles,
530  'AnalysisMuons_%SYS%' )
531  self.assertEqual( self.seq.ZCalibrator.output,
532  'ZCandidates_%SYS%' )
533  return
534 
535 
537 class TestAnaAlgSeqMultiOutputContainer( unittest.TestCase ):
538 
539 
540  def setUp( self ):
541  self.seq = AnaAlgSequence( 'MultiOutputContainerSeq' )
542  alg = createAlgorithm( 'CalibrationAlg', 'Calibration' )
543  self.seq.append( alg, inputPropName = 'particles',
544  outputPropName = 'particlesOut' )
545  alg = createAlgorithm( 'ParticleSplitterAlg', 'ParticleSplitter' )
546  self.seq.append( alg, inputPropName = 'particles',
547  outputPropName = { 'goodObjects' : 'goodParticles',
548  'badObjects' : 'badParticles' } )
549  alg = createAlgorithm( 'ParticleTrimmerAlg', 'GoodParticleTrimmer' )
550  self.seq.append( alg, inputPropName = { 'goodObjects' : 'particles' },
551  outputPropName = { 'goodObjects' : 'particlesOut' } )
552  alg = createAlgorithm( 'ParticleTriggerAlg', 'BadParticleTrimmer' )
553  self.seq.append( alg, inputPropName = { 'badObjects' : 'particles' },
554  outputPropName = { 'badObjects' : 'particlesOut' } )
555  self.seq.configure( inputName = 'Electrons',
556  outputName = { 'goodObjects' : 'GoodElectrons_%SYS%',
557  'badObjects' : 'BadElectrons_%SYS%' } )
558  return
559 
560 
561  def test_inputAndOutput( self ):
562  self.assertEqual( self.seq.Calibration.particles, 'Electrons' )
563  self.assertEqual( self.seq.GoodParticleTrimmer.particlesOut,
564  'GoodElectrons_%SYS%' )
565  self.assertEqual( self.seq.BadParticleTrimmer.particlesOut,
566  'BadElectrons_%SYS%' )
567  return
568 
569 
571 class TestAnaAlgSeqMultiInputOutputContainer( unittest.TestCase ):
572 
573 
574  def setUp( self ):
575  self.seq = AnaAlgSequence( 'MultiInputOutputContainerSeq' )
576  alg = createAlgorithm( 'ElectronSelectionAlg', 'ElectronSelection' )
577  self.seq.append( alg, inputPropName = { 'electrons' : 'particles' },
578  outputPropName = { 'electrons' : 'particlesOut' } )
579  alg = createAlgorithm( 'MuonSelectionAlg', 'MuonSelection' )
580  self.seq.append( alg, inputPropName = { 'muons' : 'particles' },
581  outputPropName = { 'muons' : 'particlesOut' } )
582  alg = createAlgorithm( 'OverlapRemovalAlg', 'OverlapRemoval' )
583  self.seq.append( alg, inputPropName = { 'electrons' : 'electrons',
584  'muons' : 'muons' },
585  outputPropName = { 'electrons' : 'electronsOut',
586  'muons' : 'muonsOut' } )
587  self.seq.configure( inputName = { 'electrons' : 'AnalysisElectrons_%SYS%',
588  'muons' : 'AnalysisMuons_%SYS%' },
589  outputName = { 'electrons' : 'FinalElectrons_%SYS%',
590  'muons' : 'FinalMuons_%SYS%' } )
591  return
592 
593 
594  def test_inputAndOutput( self ):
595  self.assertEqual( self.seq.ElectronSelection.particles,
596  'AnalysisElectrons_%SYS%' )
597  self.assertEqual( self.seq.MuonSelection.particles,
598  'AnalysisMuons_%SYS%' )
599  self.assertEqual( self.seq.OverlapRemoval.electronsOut,
600  'FinalElectrons_%SYS%' )
601  self.assertEqual( self.seq.OverlapRemoval.muonsOut,
602  'FinalMuons_%SYS%' )
603  return
python.AnaAlgSequence.AnaAlgSequence.insert
def insert(self, index, alg, inputPropName, outputPropName=None, stageName='undefined', metaConfig={}, dynConfig={})
Definition: AnaAlgSequence.py:295
python.AnaAlgSequence.TestAnaAlgSeqMultiInputOutputContainer
Test case for a sequence starting from multiple containers, and producing multiple new ones.
Definition: AnaAlgSequence.py:571
python.AnaAlgSequence.AnaAlgSequence.getMetaConfig
def getMetaConfig(self, name)
Definition: AnaAlgSequence.py:430
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
python.AnaAlgSequence.TestAnaAlgSeqMultiInputContainer.test_inputAndOutput
def test_inputAndOutput(self)
Test the input/output containers set up for the sequence.
Definition: AnaAlgSequence.py:526
python.AnaAlgSequence.TestAnaAlgSeqSingleContainer.setUp
def setUp(self)
Set up the sequence that we'll test.
Definition: AnaAlgSequence.py:459
python.AnaAlgSequence.TestAnaAlgSeqMultiOutputContainer.test_inputAndOutput
def test_inputAndOutput(self)
Test the input/output containers set up for the sequence.
Definition: AnaAlgSequence.py:561
configure
bool configure(asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > &tool, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronEffToolsHandles, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronSFToolsHandles, ToolHandleArray< CP::IMuonTriggerScaleFactors > &muonToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonEffToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonSFToolsHandles, const std::string &triggers, const std::map< std::string, std::string > &legsPerTool, unsigned long nToys, bool debug)
Definition: TrigGlobEffCorrValidation.cxx:514
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
python.AnaAlgSequence.AnaAlgSequence.allowedStageNames
def allowedStageNames()
Definition: AnaAlgSequence.py:446
python.AnaAlgSequence.TestAnaAlgSeqMultiInputOutputContainer.setUp
def setUp(self)
Set up the sequence that we'll test.
Definition: AnaAlgSequence.py:574
python.AnaAlgSequence.AnaAlgSequence.getGaudiConfig2PublicTools
def getGaudiConfig2PublicTools(self)
Definition: AnaAlgSequence.py:82
python.AnaAlgSequence.AnaAlgSequence
Definition: AnaAlgSequence.py:15
python.AnaAlgSequence.AnaAlgSequence._algToDecorToolMap
_algToDecorToolMap
Definition: AnaAlgSequence.py:61
python.AnaAlgSequence.TestAnaAlgSeqSingleContainer.seq
seq
Definition: AnaAlgSequence.py:460
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.AnaAlgSequence.AnaAlgSequence.addGaudiConfig2Algorithm
def addGaudiConfig2Algorithm(self, alg)
Definition: AnaAlgSequence.py:66
python.AnaAlgSequence.AnaAlgSequence.getGaudiConfig2Algorithms
def getGaudiConfig2Algorithms(self)
Definition: AnaAlgSequence.py:78
python.AnaAlgSequence.AnaAlgSequence._gaudiConfig2PublicTools
_gaudiConfig2PublicTools
Definition: AnaAlgSequence.py:58
python.AnaAlgSequence.AnaAlgSequence.addPublicTool
def addPublicTool(self, tool, stageName='undefined')
Definition: AnaAlgSequence.py:321
python.AnaAlgSequence.AnaAlgSequence.addDecorAwareTool
def addDecorAwareTool(self, tool, parent, inputPropName=None, outputPropName=None)
Definition: AnaAlgSequence.py:89
python.DualUseConfig.createAlgorithm
def createAlgorithm(typeName, instanceName)
Definition: DualUseConfig.py:56
python.AnaAlgSequence.TestAnaAlgSeqMultiInputContainer
Test case for a sequence receiving multiple containers, and producing just one.
Definition: AnaAlgSequence.py:496
python.AnaAlgSequence.AnaAlgSequence.removeStage
def removeStage(self, stageName)
Definition: AnaAlgSequence.py:375
python.AnaAlgSequence.AnaAlgSequence._metaConfigDefault
_metaConfigDefault
Definition: AnaAlgSequence.py:54
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.AnaAlgSequence.AnaAlgSequence.__init__
def __init__(self, name="AnalysisSequence")
Definition: AnaAlgSequence.py:35
python.AnaAlgSequence.AnaAlgSequence.addMetaConfigDefault
def addMetaConfigDefault(self, name, value)
Definition: AnaAlgSequence.py:413
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.AnaAlgSequence.AnaAlgSequence._isGaudiConfig2
_isGaudiConfig2
Definition: AnaAlgSequence.py:56
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.AnaAlgSequence.TestAnaAlgSeqMultiInputContainer.setUp
def setUp(self)
Set up the sequence that we'll test.
Definition: AnaAlgSequence.py:499
python.AnaAlgSequence.AnaAlgSequence.append
def append(self, alg, inputPropName, outputPropName=None, stageName='undefined', metaConfig={}, dynConfig={})
Definition: AnaAlgSequence.py:267
python.AnaAlgSequence.AnaAlgSequence.addGaudiConfig2PublicTool
def addGaudiConfig2PublicTool(self, alg)
Definition: AnaAlgSequence.py:72
python.AnaAlgSequence.TestAnaAlgSeqMultiOutputContainer
Test case for a sequence starting from a single container, producing multiple ones.
Definition: AnaAlgSequence.py:537
python.AnaAlgSequence.TestAnaAlgSeqMultiOutputContainer.seq
seq
Definition: AnaAlgSequence.py:541
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.AnaAlgSequence.TestAnaAlgSeqMultiInputContainer.seq
seq
Definition: AnaAlgSequence.py:500
python.AnaAlgSequence.AnaAlgSequence.configure
def configure(self, inputName, outputName, hiddenLayerPrefix="")
Definition: AnaAlgSequence.py:93
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
python.AnaAlgSequence.TestAnaAlgSeqSingleContainer.test_basics
def test_basics(self)
Test some very basic properties of the sequence.
Definition: AnaAlgSequence.py:481
python.AnaAlgSequence.TestAnaAlgSeqMultiInputOutputContainer.seq
seq
Definition: AnaAlgSequence.py:575
python.AnaAlgSequence.AnaAlgSequence.__delattr__
def __delattr__(self, name)
Definition: AnaAlgSequence.py:342
str
Definition: BTagTrackIpAccessor.cxx:11
python.AnaAlgSequence.TestAnaAlgSeqMultiOutputContainer.setUp
def setUp(self)
Set up the sequence that we'll test.
Definition: AnaAlgSequence.py:540
python.AnaAlgSequence.getFullName
def getFullName(comp)
Definition: AnaAlgSequence.py:12
python.AnaAlgSequence.AnaAlgSequence._algorithmMeta
_algorithmMeta
Definition: AnaAlgSequence.py:53
python.AnaAlgSequence.TestAnaAlgSeqSingleContainer
Test case for a sequence handling a single container.
Definition: AnaAlgSequence.py:456
python.AnaAlgSequence.TestAnaAlgSeqMultiInputOutputContainer.test_inputAndOutput
def test_inputAndOutput(self)
Test the input/output containers set up for the sequence.
Definition: AnaAlgSequence.py:594
python.AnaAlgSequence.AnaAlgSequence._gaudiConfig2Algorithms
_gaudiConfig2Algorithms
Definition: AnaAlgSequence.py:57
python.AnaAlgSequence.TestAnaAlgSeqSingleContainer.test_inputAndOutput
def test_inputAndOutput(self)
Test the input/output containers set up for the sequence.
Definition: AnaAlgSequence.py:486