6 from __future__
import print_function
11 logging.basicConfig(level=logging.INFO)
18 os.environ[
'TDAQ_ERS_NO_SIGNAL_HANDLERS'] =
'1'
21 sys.argv.append(
'-b-' )
26 from ROOT
import gSystem
29 from DataQualityUtils.DQWebDisplayMod
import DQWebDisplay
32 from DataQualityConfigurations
import getmodule
33 print(
'getting configuration', modname)
37 cmdi = sys.argv[0].rfind(
"/")
38 cmd = sys.argv[0][cmdi+1:]
40 print(
"Usage: ", cmd,
"<data_file> <config> <processing_version> [run_accumulating [conditions_string]]")
42 print(
"This is a production utility; use TEST config for development and testing.")
44 print(
"Processing version is an integer, starting from 1 (not 0)")
47 if __name__ ==
"__main__":
49 if len(sys.argv) < 5
or len(sys.argv) > 7:
53 inputFile = sys.argv[1]
54 runAccumulating =
False
55 if len(sys.argv)
in (6,7):
56 if sys.argv[4] ==
"True" or sys.argv[4] ==
"1":
57 runAccumulating =
True
59 if len(sys.argv) == 7:
60 print(
'Setting condition', sys.argv[5])
61 ROOT.gSystem.Load(
'libDataQualityInterfaces')
62 ROOT.dqi.ConditionsSingleton.getInstance().setCondition(sys.argv[5])
66 if sys.argv[2] ==
"TEST":
67 configModule =
"TestDisplay"
68 elif sys.argv[2] ==
"RTT":
69 configModule =
"RTTDisplay"
70 elif sys.argv[2] ==
"TCT":
71 configModule =
"TCTDisplay"
72 elif sys.argv[2] ==
"FDR1":
73 configModule =
"fdr08_run1"
74 elif sys.argv[2] ==
"FDR2" or sys.argv[2] ==
"FDR2a" or sys.argv[2] ==
"FDR2b" or sys.argv[2] ==
"FDR2c":
75 configModule =
"fdr08_run2"
76 elif sys.argv[2] ==
"Cosmics08":
77 configModule =
"data08_cos"
78 elif sys.argv[2] ==
"SingleBeam08":
79 configModule =
"data08_1beam"
81 configModule = sys.argv[2]
85 except Exception
as e:
86 print(
"Could not import configuration module \'" + configModule +
"\'")
90 config = cmod.dqconfig
91 except Exception
as e:
92 print(
"Configuration object 'dqconfig' not defined in module \'" + configModule +
"\'")