ATLAS Offline Software
Functions | Variables
python.HLT.CalibCosmicMon.GenerateBeamspotChainDefs Namespace Reference

Functions

def generateChainConfigs (flags, chainDict)
 

Variables

 log
 

Function Documentation

◆ generateChainConfigs()

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

Definition at line 15 of file GenerateBeamspotChainDefs.py.

15 def 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

Definition at line 10 of file GenerateBeamspotChainDefs.py.

python.HLT.CalibCosmicMon.GenerateBeamspotChainDefs.generateChainConfigs
def generateChainConfigs(flags, chainDict)
Definition: GenerateBeamspotChainDefs.py:15
ChainDictTools.splitChainDict
def splitChainDict(chainDict)
Definition: ChainDictTools.py:104
ChainMerging.mergeChainDefs
def mergeChainDefs(listOfChainDefs, chainDict, perSig_lengthOfChainConfigs=None)
Definition: ChainMerging.py:15