ATLAS Offline Software
Loading...
Searching...
No Matches
HLTCFComponents.CFGroup Class Reference
Inheritance diagram for HLTCFComponents.CFGroup:
Collaboration diagram for HLTCFComponents.CFGroup:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 __init__ (self, ChainStep, FilterAlg)
 createCFSequence (self, ChainStep, FilterAlg)
 addStepLeg (self, newstep, chainName)
 connect (self, connections)
 createHypoTools (self, flags)

Public Attributes

list stepDicts = []
list chains = []
list comboToolConfs = []
 sequenceCA = CFSequence(ChainStep, FilterAlg)

Detailed Description

Class to store the Step + its Filter (CFSequence) plus the chains and dictionaries of the legs using that step   

Definition at line 168 of file HLTCFComponents.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

HLTCFComponents.CFGroup.__init__ ( self,
ChainStep,
FilterAlg )

Definition at line 170 of file HLTCFComponents.py.

170 def __init__(self, ChainStep, FilterAlg):
171 self.stepDicts = [] # will become a list of lists
172 self.chains = []
173 self.comboToolConfs = []
174 self.createCFSequence(ChainStep, FilterAlg)
175 log.debug("CFGroup.__init: created for %s ",ChainStep.name)
176

Member Function Documentation

◆ addStepLeg()

HLTCFComponents.CFGroup.addStepLeg ( self,
newstep,
chainName )

Definition at line 183 of file HLTCFComponents.py.

183 def addStepLeg(self, newstep, chainName):
184 self.stepDicts.append(newstep.stepDicts) # one dict per leg
185 self.chains.append(chainName)
186 self.comboToolConfs.append(newstep.comboToolConfs)
187
188

◆ connect()

HLTCFComponents.CFGroup.connect ( self,
connections )
Connect filter to ChainStep (and all its sequences) through these connections (which are sets of filter outputs)
if a ChainStep contains the same sequence multiple times (for multi-leg chains),
the filter is connected only once (to avoid multiple DH links)

Definition at line 189 of file HLTCFComponents.py.

189 def connect(self, connections):
190 """Connect filter to ChainStep (and all its sequences) through these connections (which are sets of filter outputs)
191 if a ChainStep contains the same sequence multiple times (for multi-leg chains),
192 the filter is connected only once (to avoid multiple DH links)
193 """
194 if log.isEnabledFor(logging.DEBUG):
195 log.debug("CFGroup: connect Filter %s with %d menuSequences of step %s, using %d connections", self.sequenceCA.filterNode.Alg.name, len(self.sequenceCA.step.sequences), self.sequenceCA.step.name, len(connections))
196 log.debug(" --- sequences: ")
197 for seq in self.sequenceCA.step.sequences:
198 log.debug(seq)
199
200 if len(connections) == 0:
201 log.error("No filter outputs are set!")
202
203 if len(self.sequenceCA.step.sequences):
204 # check whether the number of filter outputs are the same as the number of sequences in the step
205 if len(connections) != len(self.sequenceCA.step.sequences):
206 log.error("CFGroup: Found %d connections and %d MenuSequences in Step %s", len(connections), len(self.sequenceCA.step.sequences), self.sequenceCA.step.name)
207 raise Exception("[CFGroup] Connections and sequences do not match, this must be fixed!")
208
209 for nseq, seq in enumerate(self.sequenceCA.step.sequences):
210 filter_out = connections[nseq]
211 log.debug("CFGroup: Found input %s to sequence::%s from Filter::%s", filter_out, seq.name, self.sequenceCA.filterNode.Alg.name)
212 seq.connectToFilter( filter_out )
213 else:
214 log.debug("This CFGroup has no sequences: outputs are the Filter outputs, which are %d", len(self.sequenceCA.decisions))
215

◆ createCFSequence()

HLTCFComponents.CFGroup.createCFSequence ( self,
ChainStep,
FilterAlg )
This creates the CAs for the menu sequences, if fastMenu style, and the CFSequence

Definition at line 177 of file HLTCFComponents.py.

177 def createCFSequence(self, ChainStep, FilterAlg):
178 '''This creates the CAs for the menu sequences, if fastMenu style, and the CFSequence'''
179 log.debug("CFGroup.creating CFSEquence")
180 self.sequenceCA = CFSequence(ChainStep, FilterAlg)
181 return self.sequenceCA
182

◆ createHypoTools()

HLTCFComponents.CFGroup.createHypoTools ( self,
flags )
 set and create HypoTools accumulated on the self.step from an input step configuration

Definition at line 216 of file HLTCFComponents.py.

216 def createHypoTools(self, flags):
217 """ set and create HypoTools accumulated on the self.step from an input step configuration
218 """
219 if self.sequenceCA.step.combo is None:
220 return
221
222 log.debug("CFGroup.createHypoTools for Step %s", self.sequenceCA.step.name)
223 for sdict in self.stepDicts:
224 for seq, onePartChainDict in zip(self.sequenceCA.step.sequences, sdict):
225 log.debug(' seq: %s, onePartChainDict:', seq.name)
226 log.debug(' %s', onePartChainDict)
227 if not isinstance(seq, EmptyMenuSequence):
228 hypoToolConf=seq.getHypoToolConf()
229 if hypoToolConf is None: # avoid empty sequences
230 log.error("HypoToolConf not found ", seq.name)
231 hypoToolConf.setConf( onePartChainDict )
232 hypo = HypoAlgNode(Alg = self.sequenceCA.ca.getEventAlgo(seq.hypo.Alg.getName()))
233 hypoToolAcc = hypo.addHypoTool(flags, hypoToolConf) #this creates the HypoTools
234 if isinstance(hypoToolAcc, ComponentAccumulator):
235 self.sequenceCA.ca.merge(hypoToolAcc)
236
237 for chain,conf in zip(self.chains, self.comboToolConfs):
238 chainDict = HLTMenuConfig.getChainDictFromChainName(chain)
239 self.sequenceCA.step.combo.createComboHypoTools(flags, chainDict, conf)

Member Data Documentation

◆ chains

HLTCFComponents.CFGroup.chains = []

Definition at line 172 of file HLTCFComponents.py.

◆ comboToolConfs

HLTCFComponents.CFGroup.comboToolConfs = []

Definition at line 173 of file HLTCFComponents.py.

◆ sequenceCA

HLTCFComponents.CFGroup.sequenceCA = CFSequence(ChainStep, FilterAlg)

Definition at line 180 of file HLTCFComponents.py.

◆ stepDicts

list HLTCFComponents.CFGroup.stepDicts = []

Definition at line 171 of file HLTCFComponents.py.


The documentation for this class was generated from the following file: