ATLAS Offline Software
Tools
PROCTools
python
showOutput.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4
5
import
re
6
import
sys
7
import
six
8
9
def
getOutputDictFromAMI
(tag):
10
try
:
11
from
pyAMI.pyAMI
import
AMI
12
amires = AMI().
execute
([
"ListConfigurationTag"
,
"-configTag=%s"
% tag])
13
d = amires.getDict()[
'rowset_%s'
%tag][tag]
14
outDict = eval(d.get(
'outputs'
,
'None'
))
15
except
Exception
as
e:
16
print
(
"Failed to get OutputDict from AMI"
)
17
print
(e)
18
return
None
19
return
outDict
20
21
22
if
__name__==
'__main__'
:
23
if
len(sys.argv)!=3:
24
print
(
"Syntax:"
)
25
print
(sys.argv[0],
"<ami-tag> <input dataset name>"
)
26
sys.exit(-1)
27
28
tag=sys.argv[1]
29
dsname=sys.argv[2]
30
print
(
"Getting output for"
,dsname,
"with AMI configuration tag"
,tag )
31
32
outDict=
getOutputDictFromAMI
(tag)
33
if
outDict
is
None
:
34
sys.exit(-1)
35
36
print
(
"Outputs:"
)
37
38
for
name,outDef
in
six.iteritems (outDict):
39
if
'ifMatch'
in
outDef:
40
if
re.match(outDef[
'ifMatch'
],dsname):
41
print
(
"\t"
,name)
python.showOutput.getOutputDictFromAMI
def getOutputDictFromAMI(tag)
Definition:
showOutput.py:9
LArG4FSStartPointFilterLegacy.execute
execute
Definition:
LArG4FSStartPointFilterLegacy.py:20
Generated on Thu Nov 7 2024 21:26:00 for ATLAS Offline Software by
1.8.18