22 from ROOT
import Belle2
38 print(
"Python arguments:")
42 counting = counting + 1
44 fileNames = [
'eclBhabhaTCollector.root']
47 fileNames = glob(sys.argv[1])
48 algo.setInputFileNames(fileNames)
52 basePath = sys.argv[2] +
"/"
53 print(
"basePath = ", basePath)
58 algo.debugOutput =
True
59 algo.meanCleanRebinFactor = 3
61 algo.meanCleanCutMinFactor = 0.3
64 algo.debugFilenameBase =
"eclBhabhaTAlgorithm"
67 set_log_level(LogLevel.INFO)
70 exprun_vector = algo.getRunListFromAllData()
72 baseName =
"eclBhabhaTAlgorithm"
73 basePathAndName = basePath + baseName
74 algo.debugFilenameBase = basePathAndName
77 print(
"Combining all runs' histograms for a single calibration")
78 print(
"path = ", basePathAndName)
79 alg_result = algo.execute()
80 print(
"Calibration completion status", alg_result)
84 print(
"Calibrating each run individually")
85 runsWithoutEnoughData = []
86 for exprun
in exprun_vector:
87 iov_to_execute = ROOT.vector(
"std::pair<int,int>")()
88 iov_to_execute.push_back(exprun)
89 print(
"path = ", basePathAndName)
90 alg_result = algo.execute(iov_to_execute, 0)
91 print(
"Calibration success-result was", alg_result,
" (0=ok, 2=needs more data)")
96 print(
"Summary of possible calibration completion status values:")
97 print(
" c_OK = Finished successfuly = 0 in Python")
98 print(
" c_Iterate, = Needs iteration = 1 in Python")
99 print(
" c_NotEnoughData, = Needs more data = 2 in Python")
100 print(
" c_Failure, = Failed = 3 in Python")
101 print(
" c_Undefined = Not yet known (before execution) = 4 in Python")