ATLAS Offline Software
handi.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 
6 import DataQualityUtils.handimod as mod
7 
8 import sys
9 
10 import getopt
11 
12 def handi( name, resultsFile, htmlDir, browserMenu=False, allDirsScriptLoc="https://atlasdqm.cern.ch/static/js/" ):
13 
14 
15 
16 
17  compare = False
18  javaScriptLoc =""
19  HjavaScriptLoc =""
20  runListLoc = ""
21 
22 
27 
28  mod.handiWithComparisons( name, resultsFile, htmlDir, runListLoc, compare, browserMenu, allDirsScriptLoc )
29 
30 
31 def usage():
32  cmdi = sys.argv[0].rfind("/")
33  cmd = sys.argv[0][cmdi+1:]
34  print("Usage: ", cmd, "[-m|--browser-menu] [-s|--script-loc=<URL>] <name_of_system> <results_file_name> <html_output_directory>")
35 
36 
37 
40 
41 short_options = "hms:"
42 long_options = ["help","browser-menu","script-loc="]
43 
44 if __name__ == "__main__":
45 
46  # Default
47  browserMenu = False
48  allDirsScriptLoc = ""
49 
50  try:
51  opts, args = getopt.getopt(sys.argv[1:], short_options, long_options)
52  except getopt.GetoptError:
53  usage()
54  sys.exit(1)
55  for cmd, arg in opts:
56  if(cmd in ('--help',) or cmd in ('-h',)):
57  usage()
58  sys.exit(0)
59  if (cmd in ('--browser-menu',) or cmd in ('-m',)):
60  browserMenu = True
61  if (cmd in ('--script-loc',) or cmd in ('-s',)):
62  allDirsScriptLoc = arg
63 
64  if len(args) != 3:
65  usage()
66  sys.exit(0)
67 
68  # Input
69  name = args[0] # name of the subdetector
70  resultsFile = args[1] # root file with output
71  html_dir = args[2] # destination directory for html files
72  handi( name, resultsFile, html_dir, browserMenu, allDirsScriptLoc )
handi
Definition: handi.py:1
handi.usage
def usage()
Definition: handi.py:31
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
handi.handi
def handi(name, resultsFile, htmlDir, browserMenu=False, allDirsScriptLoc="https://atlasdqm.cern.ch/static/js/")
Definition: handi.py:12
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567