ATLAS Offline Software
hancool_histo.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 import DataQualityUtils.hancool_histo_mod as mod
7 
8 import sys
9 
10 
11 
12 
13 def usage():
14  cmdi = sys.argv[0].rfind("/")
15  cmd = sys.argv[0][cmdi+1:]
16  print("")
17  print("Usage: ", cmd, "<runnumber> <path> <dbConnection> <detstatus> <dbtag>")
18  print("or")
19  print("Usage: ", cmd, "(picking up default settings)")
20  print("")
21 
22 
23 
26 
27 if __name__ == "__main__":
28 
29  if (not ((len(sys.argv) == 1) or (len(sys.argv) == 6) or (len(sys.argv) == 3))):
30  usage()
31  sys.exit(0)
32 
33  inputFilePath = ""
34  input_run = -1
35  dbConnectionHisto = ""
36  dqmfOflHisto = ""
37  dbTagName = ""
38 
39  # Input
40 
41  if (len(sys.argv) == 6):
42  inputFilePath=sys.argv[1] # path name
43  input_run = sys.argv[2] # run number
44  dbConnectionHisto = sys.argv[3] # COOL db connection string
45  dqmfOflHisto = sys.argv[4] # dqmfOfl
46  dbTagName = sys.argv[5] # dbTagName
47 
48  elif (len(sys.argv) == 3):
49  inputFilePath=sys.argv[1] # path name
50  input_run = sys.argv[2] # run number
51 # dbConnectionHisto = "sqlite://;schema=/afs/cern.ch/user/a/atlasdqm/w0/users/onofrio/DQMFTutorial_2/14.0.0/WorkArea/MyCOOL_histo_FDR2b.db;dbname=OFLP200"
52  dbConnectionHisto = "sqlite://;schema=/afs/cern.ch/user/a/atlasdqm/w0/users/onofrio/DQMF_08112008/14.2.10/WorkArea/python/MyCOOL_histo_FDR2c.db;dbname=OFLP200"
53  dqmfOflHisto = "/GLOBAL/DETSTATUS/DQMFOFLH"
54  dbTagName = "DetStatusDQMFOFLH-FDR2-01"
55 
56  else: # set to defaults
57  input_run = 52280
58  inputFilePath = "/afs/cern.ch/user/a/atlasdqm/dqmdisk1/han_results/tier0/FDR2b/1/physics_Express/"
59 # dbConnectionHisto = "sqlite://;schema=/afs/cern.ch/user/a/atlasdqm/w0/users/onofrio/DQMFTutorial_2/14.0.0/WorkArea/MyCOOL_histo_FDR2b.db;dbname=OFLP200"
60  dbConnectionHisto = "sqlite://;schema=/afs/cern.ch/user/a/atlasdqm/w0/users/onofrio/DQMF_08112008/14.2.10/WorkArea/python/MyCOOL_histo_FDR2c.db;dbname=OFLP200"
61  dqmfOflHisto = "/GLOBAL/DETSTATUS/DQMFOFLH"
62  dbTagName = "DetStatusDQMFOFLH-FDR2-02"
63 
64  mod.hancool_histo( inputFilePath, input_run, dbConnectionHisto,dqmfOflHisto, dbTagName)
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
hancool_histo.usage
def usage()
Definition: hancool_histo.py:13