Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Trigger
TrigAnalysis
TrigInDetAnalysisUser
share
TIDAparseGRL.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
__author__ =
"Callum Kilby"
4
5
import
sys
6
import
getopt
7
8
def
main
(filePath) :
9
"""A script that takes in and parses a GRL xml file, and outputs a list of good lumi blocks.
10
The lines are formatted: RUNNUMBER, STARTLUMIBLOCK, ENDLUMIBLOCK."""
11
GRLlist =
open
(filePath)
12
runNum = 0
13
for
line
in
GRLlist :
14
if
'<Run>'
in
line :
15
splitLine = line.split(
'<Run>'
)
16
splitLine = splitLine[1].
split
(
'</Run>'
)
17
runNum = splitLine[0]
18
19
if
'<LBRange Start="'
in
line :
20
line = line.replace(
'<LBRange Start="'
, runNum+
', '
)
21
line = line.replace(
'" End="'
,
', '
)
22
line = line.replace(
'"/>'
,
''
)
23
line = line.strip()
24
print
line
25
26
if
__name__ ==
"__main__"
:
27
usage =
"Usage: parseGRL.py [-h] <pathToGRLxmlFile>"
28
usage +=
"\n-h --help\tprints this help message"
29
30
try
:
31
opts, args = getopt.getopt(sys.argv[1:],
'h'
, [
'help'
])
32
except
getopt.GetoptError:
33
print
usage
34
sys.exit()
35
36
if
args == []:
37
print
usage
38
sys.exit()
39
40
for
opt, arg
in
opts :
41
if
opt == (
'-h'
or
'--help'
) :
42
print
usage
43
sys.exit()
44
45
filePathIn = args[0]
46
main
(filePathIn)
TIDAparseGRL.main
def main(filePath)
Definition:
TIDAparseGRL.py:8
Trk::open
@ open
Definition:
BinningType.h:40
Trk::split
@ split
Definition:
LayerMaterialProperties.h:38
Generated on Thu May 8 2025 21:19:11 for ATLAS Offline Software by
1.8.18