ATLAS Offline Software
Functions | Variables
CreatePhysValWebPage Namespace Reference

Functions

def row_major (alist, sublen)
 
def col_major (alist, sublen)
 
def html_table (lol)
 
def list_to_html_table (alist, sublength, column_major=False)
 

Variables

 parser = argparse.ArgumentParser(description='Create the Physics Validation web page:', usage='%(prog)s -i ROC/ ')
 
 help
 
 default
 
 args = parser.parse_args()
 
 folder = os.path.abspath(args.input_dir)
 
 format = args.format
 
 nHisto = int(args.number_of_histo)
 
 files = glob.glob(format)
 
def my_htm_page = list_to_html_table(files, nHisto)
 
 hs = open("FTAG_PhysValWebPage.html", 'w')
 
string folder_eff = folder+"/eff_vs_Lxy"
 
string folder_pt = folder+"/eff_vs_pt_ttbar"
 
int is_ttbar = 1
 
string mypage = "<html><table>"
 

Function Documentation

◆ col_major()

def CreatePhysValWebPage.col_major (   alist,
  sublen 
)

Definition at line 25 of file CreatePhysValWebPage.py.

25 def col_major(alist, sublen):
26  numrows = (len(alist)+sublen-1) // sublen
27  return [alist[i::sublen] for i in range(numrows)]
28 
29 #example:
30 #L = ['one','two','three','four','five','six','seven','eight','nine']
31 #for r in row_major(L, 3): print r
32 #for r in col_major(L, 3): print r
33 #for r in row_major(L, 4): print r
34 

◆ html_table()

def CreatePhysValWebPage.html_table (   lol)

Definition at line 35 of file CreatePhysValWebPage.py.

35 def html_table(lol):
36  string = '<html><table>'
37  for sublist in lol:
38  string += '<tr><th> '
39  #print (sublist)
40  list_len = len(sublist)
41 
42  #First the headers
43  for file in sublist:
44  idx = sublist.index(file)
45  print("Histo: " + sublist[idx])
46  list_end = list_len - idx
47  if list_end != 1:
48  next_idx = idx + 1
49  string += '<p style=\"color:#0000FF\";>'+ str(file)+ '<p> </th><th>'
50  else:
51  #print("End Of List!")
52  string += '<p style=\"color:#0000FF\";>'+ str(file)+ '<p> </th></tr> '
53 
54  #Then the plots
55  string += '<tr><td> '
56  for file in sublist:
57  idx = sublist.index(file)
58  list_end = list_len - idx
59  if list_end != 1:
60  next_idx = idx + 1
61  string += '<a href="'+str(file)+'"> <img alt="'+str(file)+'" src="'+str(file)+'" width="400" height="300"></a> </td><th>'
62  else:
63  string += '<a href="'+str(file)+'"> <img alt="'+str(file)+'" src="'+str(file)+'" width="400" height="300"></a> </td><tr>'
64 
65  #print("string= "+string)
66  #print(".........")
67  string += '</table></html>'
68  return string
69 

◆ list_to_html_table()

def CreatePhysValWebPage.list_to_html_table (   alist,
  sublength,
  column_major = False 
)

Definition at line 70 of file CreatePhysValWebPage.py.

70 def list_to_html_table(alist, sublength, column_major=False):
71  if column_major:
72  lol = col_major(alist, sublength)
73  else:
74  lol = row_major(alist, sublength)
75  return(html_table(lol))

◆ row_major()

def CreatePhysValWebPage.row_major (   alist,
  sublen 
)

Definition at line 22 of file CreatePhysValWebPage.py.

22 def row_major(alist, sublen):
23  return [alist[i:i+sublen] for i in range(0, len(alist), sublen)]
24 

Variable Documentation

◆ args

CreatePhysValWebPage.args = parser.parse_args()

Definition at line 80 of file CreatePhysValWebPage.py.

◆ default

CreatePhysValWebPage.default

Definition at line 15 of file CreatePhysValWebPage.py.

◆ files

CreatePhysValWebPage.files = glob.glob(format)

Definition at line 97 of file CreatePhysValWebPage.py.

◆ folder

CreatePhysValWebPage.folder = os.path.abspath(args.input_dir)

Definition at line 81 of file CreatePhysValWebPage.py.

◆ folder_eff

string CreatePhysValWebPage.folder_eff = folder+"/eff_vs_Lxy"

Definition at line 112 of file CreatePhysValWebPage.py.

◆ folder_pt

string CreatePhysValWebPage.folder_pt = folder+"/eff_vs_pt_ttbar"

Definition at line 125 of file CreatePhysValWebPage.py.

◆ format

CreatePhysValWebPage.format = args.format

Definition at line 88 of file CreatePhysValWebPage.py.

◆ help

CreatePhysValWebPage.help

Definition at line 15 of file CreatePhysValWebPage.py.

◆ hs

CreatePhysValWebPage.hs = open("FTAG_PhysValWebPage.html", 'w')

Definition at line 107 of file CreatePhysValWebPage.py.

◆ is_ttbar

int CreatePhysValWebPage.is_ttbar = 1

Definition at line 126 of file CreatePhysValWebPage.py.

◆ my_htm_page

def CreatePhysValWebPage.my_htm_page = list_to_html_table(files, nHisto)

Definition at line 105 of file CreatePhysValWebPage.py.

◆ mypage

string CreatePhysValWebPage.mypage = "<html><table>"

Definition at line 151 of file CreatePhysValWebPage.py.

◆ nHisto

CreatePhysValWebPage.nHisto = int(args.number_of_histo)

Definition at line 89 of file CreatePhysValWebPage.py.

◆ parser

CreatePhysValWebPage.parser = argparse.ArgumentParser(description='Create the Physics Validation web page:', usage='%(prog)s -i ROC/ ')

Definition at line 14 of file CreatePhysValWebPage.py.

CreatePhysValWebPage.html_table
def html_table(lol)
Definition: CreatePhysValWebPage.py:35
CreatePhysValWebPage.col_major
def col_major(alist, sublen)
Definition: CreatePhysValWebPage.py:25
CreatePhysValWebPage.row_major
def row_major(alist, sublen)
Definition: CreatePhysValWebPage.py:22
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
CreatePhysValWebPage.list_to_html_table
def list_to_html_table(alist, sublength, column_major=False)
Definition: CreatePhysValWebPage.py:70
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
str
Definition: BTagTrackIpAccessor.cxx:11