ATLAS Offline Software
Functions | Variables
python.provideTwikiSummary Namespace Reference

Functions

def readReleaseList ()
 
def cleanDiffRoot (ref, val, q, ftype, path)
 
def cleanLog (ref, val, path, log)
 
def execDiffs (ref, val, path=None)
 
def readLogFile (path, log)
 
def PrintTwiki (ref, chk, q221, q431)
 
def execute_all_steps (ref, val, path, log)
 
def writeManyFiles (release_list)
 

Variables

 parser
 
 usage
 
 type
 
 dest
 
 default
 
 None
 
 help
 
 options
 
 args
 
 release_list
 

Function Documentation

◆ cleanDiffRoot()

def python.provideTwikiSummary.cleanDiffRoot (   ref,
  val,
  q,
  ftype,
  path 
)

Definition at line 19 of file provideTwikiSummary.py.

19 def cleanDiffRoot(ref, val,q, ftype, path):
20  logfile = "%s/run_%s/diff-root-%s.%s.log" %(path,q,q,ftype)
21  outfile = "%s_vs_%s_diff-root-%s.%s.txt" %(ref,val,q,ftype)
22  if path:
23  outfile = "%s/%s_vs_%s/%s" %(path,ref,val,outfile)
24  command = 'cat %s | grep -v "diff= \\[" | grep -v "::sync-" > %s' %(logfile,outfile)
25  #print (command)
26  os.system(command)
27 
28 

◆ cleanLog()

def python.provideTwikiSummary.cleanLog (   ref,
  val,
  path,
  log 
)

Definition at line 29 of file provideTwikiSummary.py.

29 def cleanLog(ref, val, path, log):
30 #logfile = "/storage/users/mb1063/proc/checks_%s_vs_%s.log" %(ref,val)
31  logfile = "%s/%s" %(path,log)
32  outfile = "%s_vs_%s_RunTier0Test.txt" %(ref,val)
33  if path:
34  outfile = "%s/%s_vs_%s/%s" %(path,ref,val,outfile)
35  command = 'cat %s > %s' %(logfile,outfile)
36  #print (command)
37  os.system(command)
38 
39 

◆ execDiffs()

def python.provideTwikiSummary.execDiffs (   ref,
  val,
  path = None 
)

Definition at line 40 of file provideTwikiSummary.py.

40 def execDiffs(ref, val, path=None):
41  filename = "%s_vs_%s_tag-diff.txt" %(ref,val)
42  command1 = "get-tag-diff.py --ref=%s --chk=%s > %s/%s_vs_%s/%s" %(ref,val,path,ref,val,filename)
43  print (command1)
44  os.system(command1)
45 
46 
47 """
48  interprets log ATTENTION not all results with breaks T0 is really braking it, please double check
49 """

◆ execute_all_steps()

def python.provideTwikiSummary.execute_all_steps (   ref,
  val,
  path,
  log 
)

Definition at line 80 of file provideTwikiSummary.py.

80 def execute_all_steps(ref,val,path,log):
81  #path = "%s_vs_%s" %(ref,val)
82 
83  os.system("mkdir %s/%s_vs_%s" %(path,ref,val))
84  print ("INFO getting Tag diff of %s and %s" %(ref,val))
85  execDiffs(ref, val, path)
86  print ("INFO providing RunTier0Test log summary")
87  cleanLog(ref,val, path,log)
88  print ("INFO providing short q221 ESD diff-root summary")
89  cleanDiffRoot(ref,val,"q221","ESD", path)
90  print ("INFO providing short q221 AOD diff-root summary")
91  cleanDiffRoot(ref,val,"q221","AOD", path)
92  print ("INFO providing short q431 ESD diff-root summary")
93  cleanDiffRoot(ref,val,"q431","ESD", path)
94  print ("INFO providing short q431 AOD diff-root summary")
95  cleanDiffRoot(ref,val,"q431","AOD", path)
96 
97  q221, q431 = readLogFile(path,log)
98  PrintTwiki(ref, val, q221, q431)
99 
100 
101 """
102  execute diff for a list of releases to be compared
103 """

◆ PrintTwiki()

def python.provideTwikiSummary.PrintTwiki (   ref,
  chk,
  q221,
  q431 
)

Definition at line 64 of file provideTwikiSummary.py.

64 def PrintTwiki(ref, chk, q221, q431):
65  status = "%Y%"
66  if "break" in q221 or "break" in q431:
67  status = "%X%"
68  path = "https://twiki.cern.ch/twiki/pub/Atlas/Tier0CacheReleases"
69 
70  twiki = "| [[%s/%s_vs_%s_tag-diff.txt][%s vs %s]] | [[%s/%s_vs_%s_diff-root-q221.ESD.txt][ESD diff]] [[%s/%s_vs_%s_diff-root-q221.AOD.txt][AOD diff]] | [[%s/%s_vs_%s_diff-root-q431.ESD.txt][ESD diff]] [[%s/%s_vs_%s_diff-root-q431.AOD.txt][AOD diff]] | [[%s/%s_vs_%s_RunTier0Test.txt][%s/%s]] | %s | |" %(path,ref,chk,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,q221,q431,status)
71  print (twiki)
72  return 0
73 
74 
75 
76 
77 """
78 
79 """

◆ readLogFile()

def python.provideTwikiSummary.readLogFile (   path,
  log 
)

Definition at line 50 of file provideTwikiSummary.py.

50 def readLogFile(path,log):
51  q221 = "ok"
52  q431 = "ok"
53  f = open("%s/%s"%(path,log), 'r')
54  for line in f:
55  if "q221" in line and 'break' in line:
56  q221 = "breaks T0"
57  if "q431" in line and 'break' in line:
58  q431 = "breaks T0"
59  return q221, q431
60 
61 """
62  prints line for twiki table
63 """

◆ readReleaseList()

def python.provideTwikiSummary.readReleaseList ( )

Definition at line 7 of file provideTwikiSummary.py.

7 def readReleaseList():
8  release_list = []
9  f = open('releaseList.txt', 'r')
10  for line in f:
11  try:
12  release_list.append(line.split()[0])
13  except Exception:
14  pass
15  return release_list
16 
17 
18 

◆ writeManyFiles()

def python.provideTwikiSummary.writeManyFiles (   release_list)

Definition at line 104 of file provideTwikiSummary.py.

104 def writeManyFiles(release_list):
105  for idx,ref in enumerate(release_list):
106  try:
107  val = release_list[idx+1]
108  except Exception:
109  return 0
110  #print (rel, val)
111  execute_all_steps(ref,val)
112 

Variable Documentation

◆ args

python.provideTwikiSummary.args

Definition at line 121 of file provideTwikiSummary.py.

◆ default

python.provideTwikiSummary.default

Definition at line 116 of file provideTwikiSummary.py.

◆ dest

python.provideTwikiSummary.dest

Definition at line 116 of file provideTwikiSummary.py.

◆ help

python.provideTwikiSummary.help

Definition at line 116 of file provideTwikiSummary.py.

◆ None

python.provideTwikiSummary.None

Definition at line 116 of file provideTwikiSummary.py.

◆ options

python.provideTwikiSummary.options

Definition at line 121 of file provideTwikiSummary.py.

◆ parser

python.provideTwikiSummary.parser

Definition at line 115 of file provideTwikiSummary.py.

◆ release_list

python.provideTwikiSummary.release_list

Definition at line 125 of file provideTwikiSummary.py.

◆ type

python.provideTwikiSummary.type

Definition at line 116 of file provideTwikiSummary.py.

◆ usage

python.provideTwikiSummary.usage

Definition at line 115 of file provideTwikiSummary.py.

python.provideTwikiSummary.cleanDiffRoot
def cleanDiffRoot(ref, val, q, ftype, path)
Definition: provideTwikiSummary.py:19
python.provideTwikiSummary.execute_all_steps
def execute_all_steps(ref, val, path, log)
Definition: provideTwikiSummary.py:80
python.provideTwikiSummary.writeManyFiles
def writeManyFiles(release_list)
Definition: provideTwikiSummary.py:104
python.provideTwikiSummary.readLogFile
def readLogFile(path, log)
Definition: provideTwikiSummary.py:50
python.provideTwikiSummary.PrintTwiki
def PrintTwiki(ref, chk, q221, q431)
Definition: provideTwikiSummary.py:64
python.provideTwikiSummary.execDiffs
def execDiffs(ref, val, path=None)
Definition: provideTwikiSummary.py:40
python.provideTwikiSummary.cleanLog
def cleanLog(ref, val, path, log)
Definition: provideTwikiSummary.py:29
python.provideTwikiSummary.readReleaseList
def readReleaseList()
Definition: provideTwikiSummary.py:7
Trk::open
@ open
Definition: BinningType.h:40