ATLAS Offline Software
hancool.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.hancoolmod as mod
7 
8 import sys
9 
10 
11 def usage():
12  cmdi = sys.argv[0].rfind("/")
13  cmd = sys.argv[0][cmdi+1:]
14  print("")
15  print("Usage: ", cmd, "<runnumber> <path> <dbConnection> <detstatus> <dbtag>")
16  print("or")
17  print("Usage: ", cmd, "(picking up default settings)")
18  print("")
19 
20 
21 if __name__ == "__main__":
22 
23  if (not ((len(sys.argv) == 1) or (len(sys.argv) == 5) or (len(sys.argv) == 6))):
24  usage()
25  sys.exit(0)
26 
27  runNumber = -1
28  filePath = ""
29  dbConnection = ""
30  dqmfOfl = ""
31  db_tag = ""
32 
33  if (len(sys.argv) == 6):
34  runNumber = int(sys.argv[1]) # run number
35  filePath = sys.argv[2] # histograms file path
36  dbConnection = sys.argv[3] # COOL db connection string
37  dqmfOfl = sys.argv[4] # dqmfOfl
38  db_tag = sys.argv[5] # COOL db folder tag
39 
40  elif (len(sys.argv) == 5):
41  runNumber = int(sys.argv[1]) # run number
42  filePath = sys.argv[2] # histograms file path
43  dbConnection = sys.argv[3] # COOL db connection string
44  dqmfOfl = sys.argv[4] # dqmfOfl
45  db_tag = "HEAD"
46 
47  else: # set to defaults
48  runNumber = 52280
49  filePath = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/han_results/tier0/FDR2a/1/physics_Express/"
50  dbConnection = "sqlite://;schema=MyCOOL_histo.db;dbname=CONDBR2"
51  dqmfOfl = "/GLOBAL/DETSTATUS/DQMFOFL"
52  db_tag = "HEAD"
53 
54  mod.hancool(runNumber,filePath,dbConnection)
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
hancool.usage
def usage()
Definition: hancool.py:11