ATLAS Offline Software
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 
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 
21 if __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 
31  outDict=getOutputDictFromAMI(tag)
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)
python.showOutput.getOutputDictFromAMI
def getOutputDictFromAMI(tag)
Definition: showOutput.py:8
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20