ATLAS Offline Software
Functions
python.RunLumiConfigTools Namespace Reference

Functions

def condenseRunLumiInfoFragment (frag, filename="./RunDMCTriggerRunsInfo.py")
 

Function Documentation

◆ condenseRunLumiInfoFragment()

def python.RunLumiConfigTools.condenseRunLumiInfoFragment (   frag,
  filename = "./RunDMCTriggerRunsInfo.py" 
)
Condense the run lumi configuration into a simple list describing the number of events per run, for trigger reco trf.

Definition at line 3 of file RunLumiConfigTools.py.

3 def condenseRunLumiInfoFragment(frag,filename="./RunDMCTriggerRunsInfo.py"):
4  """ Condense the run lumi configuration into a simple list describing the number of events per run, for trigger reco trf.
5  """
6  condensed = []
7  for xDict in frag:
8  r = xDict['run']
9  e = xDict['evts']
10  if ((not condensed) or (condensed[-1]['run'] != r)): #new entry
11  condensed.append({'run':r,'evts':e})
12  else:
13  condensed[-1]['evts'] += e
14  pass
15  pass
16  with open( filename, 'w' ) as f:
17  f.write( "#Configuration describing nEvents for each run number in digi file.\nlistOfRunsEvents = %s" % condensed )
18  pass
19  return condensed
python.RunLumiConfigTools.condenseRunLumiInfoFragment
def condenseRunLumiInfoFragment(frag, filename="./RunDMCTriggerRunsInfo.py")
Definition: RunLumiConfigTools.py:3
Trk::open
@ open
Definition: BinningType.h:40