Public Member Functions | |
def | __init__ |
def | addStages |
Configure Stages for "pull mode" simulation.
Definition at line 3 of file Configure.py.
def Configure::Configure::Configure::__init__ | ( | self, | ||
stages = [] | ||||
) |
Configure given stages. Resulting object will have one data member named after each Stage that holds the configurable for that stage. Each stage will be configured with a GaudiSequencer named with the stage name prepended to "Sequence". The sequencer is also available as a data member. If "ordered" is True, then connect up the stages in the order given in "stages".
Definition at line 6 of file Configure.py.
00009 : 00010 ''' 00011 Configure given stages. 00012 00013 Resulting object will have one data member named after each 00014 Stage that holds the configurable for that stage. Each stage 00015 will be configured with a GaudiSequencer named with the stage 00016 name prepended to "Sequence". The sequencer is also available 00017 as a data member. If "ordered" is True, then connect up the 00018 stages in the order given in "stages". 00019 ''' 00020 00021 self.stages = [] self.addStages(stages)
def Configure::Configure::Configure::addStages | ( | self, | ||
stages | ||||
) |
Definition at line 22 of file Configure.py.
00025 : 00026 00027 from StageConf import Stage 00028 from GaudiAlg.GaudiAlgConf import GaudiSequencer 00029 00030 from Gaudi.Configuration import ToolSvc 00031 toolSvc = ToolSvc() 00032 00033 for cnf in stages: 00034 if type(cnf) == str: # convert from name to configureable if needed 00035 cnf = Stage(cnf) 00036 00037 stage = cnf.name() # get name before adding seq to toolsvc 00038 toolSvc += cnf 00039 seqName = stage + 'Sequence' 00040 if seqName.find("ToolSvc.") != -1: 00041 seqName = seqName.replace ( 'ToolSvc.', '' ) 00042 seq = GaudiSequencer(seqName) 00043 cnf.Sequencer = seqName 00044 print 'Adding stage named',cnf.name(),'seq named',seq.name() 00045 self.__dict__[stage] = cnf 00046 self.__dict__[seqName] = seq 00047 continue 00048 00049 self.stages += stages 00050 return