ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
RunDependentSim
RunDependentSimComps
python
RunLumiConfigTools.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
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
condenseRunLumiInfoFragment(frag, filename="./RunDMCTriggerRunsInfo.py")
Definition
RunLumiConfigTools.py:3
Generated on
for ATLAS Offline Software by
1.17.0