ATLAS Offline Software
Loading...
Searching...
No Matches
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
5import re
6import sys
7
9 try:
10 from pyAMI.pyAMI import AMI
11 amires = AMI().execute(["ListConfigurationTag","-configTag=%s" % tag])
12 d = amires.getDict()['rowset_%s'%tag][tag]
13 outDict = eval(d.get('outputs','None'))
14 except Exception as e:
15 print ("Failed to get OutputDict from AMI")
16 print (e)
17 return None
18 return outDict
19
20
21if __name__=='__main__':
22 if len(sys.argv)!=3:
23 print ("Syntax:")
24 print (sys.argv[0],"<ami-tag> <input dataset name>")
25 sys.exit(-1)
26
27 tag=sys.argv[1]
28 dsname=sys.argv[2]
29 print ("Getting output for",dsname,"with AMI configuration tag",tag )
30
32 if outDict is None:
33 sys.exit(-1)
34
35 print ("Outputs:")
36
37 for name,outDef in outDict.items():
38 if 'ifMatch' in outDef:
39 if re.match(outDef['ifMatch'],dsname):
40 print ("\t",name)
getOutputDictFromAMI(tag)
Definition showOutput.py:8