ATLAS Offline Software
Loading...
Searching...
No Matches
python.testIfMatch Namespace Reference

Functions

 getOutputDictFromAMI (tag)
 getTaskNamesFromCastor ()

Variables

 tag = sys.argv[1]
 outDict = getOutputDictFromAMI(tag)
 taskNames = getTaskNamesFromCastor()
 matrix = dict()
 end

Function Documentation

◆ getOutputDictFromAMI()

python.testIfMatch.getOutputDictFromAMI ( tag)

Definition at line 10 of file testIfMatch.py.

10def getOutputDictFromAMI(tag):
11 try:
12 from pyAMI.pyAMI import AMI
13 amires = AMI().execute(["ListConfigurationTag","-configTag=%s" % tag])
14 d = amires.getDict()['rowset_%s'%tag][tag]
15 outDict = eval(d.get('outputs','None'))
16 except Exception as e:
17 print ("Failed to get OutputDict from AMI")
18 print (e)
19 return None
20 return outDict
21
22

◆ getTaskNamesFromCastor()

python.testIfMatch.getTaskNamesFromCastor ( )

Definition at line 23 of file testIfMatch.py.

23def getTaskNamesFromCastor():
24 #cdirs=("/castor/cern.ch/grid/atlas/tzero/prod1/perm/data11_7TeV","/castor/cern.ch/grid/atlas/tzero/prod1/perm/data11_cos")
25 cdirs=("/castor/cern.ch/grid/atlas/tzero/prod1/perm/data11_hi","/castor/cern.ch/grid/atlas/tzero/prod1/perm/data11_7TeV")
26
27 tasknames=set()
28 for d in cdirs:
29 proj=d.split("/")[-1]
30 cmd="nsls "+d
31 (stat,out)=subprocess.getstatusoutput(cmd)
32 if stat!=0:
33 print ("ERROR, could not get list of streams from castor directory",d)
34 print (out)
35 return None
36 for stream in out.split(os.linesep):
37 tasknames.add(proj+".00000000."+stream+".merge.RAW")
38 return tasknames
39
40
41
STL class.

Variable Documentation

◆ end

python.testIfMatch.end

Definition at line 81 of file testIfMatch.py.

◆ matrix

python.testIfMatch.matrix = dict()

Definition at line 63 of file testIfMatch.py.

◆ outDict

python.testIfMatch.outDict = getOutputDictFromAMI(tag)

Definition at line 51 of file testIfMatch.py.

◆ tag

python.testIfMatch.tag = sys.argv[1]

Definition at line 48 of file testIfMatch.py.

◆ taskNames

python.testIfMatch.taskNames = getTaskNamesFromCastor()

Definition at line 57 of file testIfMatch.py.