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