ATLAS Offline Software
Loading...
Searching...
No Matches
python.HLT.CalibCosmicMon.GenerateBeamspotChainDefs Namespace Reference

Functions

 generateChainConfigs (flags, chainDict)

Variables

 log = logging.getLogger(__name__)

Function Documentation

◆ generateChainConfigs()

python.HLT.CalibCosmicMon.GenerateBeamspotChainDefs.generateChainConfigs ( flags,
chainDict )

Definition at line 15 of file GenerateBeamspotChainDefs.py.

15def generateChainConfigs(flags, chainDict):
16
17 if log.isEnabledFor(logging.DEBUG): # pprint.pformat is expensive
18 log.debug('dictionary is: %s\n', pprint.pformat(chainDict))
19
20 listOfChainDicts = splitChainDict(chainDict)
21 log.debug("Will generate Config for chain: %s", chainDict['chainName'])
22
23 listOfChainDefs = []
24
25 #streamers will never have more than one chainPart but this is still
26 #needed to move to the correct format [{}]->{}
27 for subChainDict in listOfChainDicts:
28
29 if subChainDict['chainParts'][0]['beamspotChain'] != '':
30
31 log.debug("Jet tracking based beamspot chain")
32 log.debug("chainDict %s", chainDict)
33
34 jetConfig = JetChainConfiguration(chainDict)
35 jetConfig.prepareDataDependencies(flags)
36 jetName = jetConfig.jetName
37 log.debug("Jet name %s", jetConfig.jetName)
38 jet = jetConfig.assembleChain(flags)
39 log.debug('Input jet collection name is %s \n', jetName)
40
41 Beamspot = BeamspotChainConfiguration(subChainDict, jetName).assembleChain(flags)
42 jet.append_step_to_jet(Beamspot.steps)
43
44 listOfChainDefs += [ jet ]
45 log.debug('length of chaindefs %s', len(listOfChainDefs) )
46
47 else:
48 log.debug("Traditional beamspot chain")
49 Beamspot = BeamspotChainConfiguration(subChainDict).assembleChain(flags)
50
51 listOfChainDefs += [Beamspot]
52 log.debug('length of chaindefs %s', len(listOfChainDefs) )
53
54
55 if len(listOfChainDefs)>1:
56 log.warning("This is a chain with more than one chainPart, is this really intended?")
57 theChainDef = mergeChainDefs(listOfChainDefs, chainDict)
58 else:
59 theChainDef = listOfChainDefs[0]
60
61 log.debug("theChainDef %s" , theChainDef)
62
63 return theChainDef

Variable Documentation

◆ log

python.HLT.CalibCosmicMon.GenerateBeamspotChainDefs.log = logging.getLogger(__name__)

Definition at line 10 of file GenerateBeamspotChainDefs.py.