78 The event loop: Store the statistics as a new row in the TTree.
87 module_stats = basf2.statistics.modules
101 if ROOT.Belle2.ProcHandler.parallelProcessingUsed()
and not ROOT.Belle2.ProcHandler.isOutputProcess():
102 basf2.B2FATAL(
"PerEventStatisticsGetterModule can only be used in single processing mode or in the output process")
104 self.
ttree_inputs = np.zeros(len(module_stats), dtype=float)
105 self.
last_time_sum = np.zeros(len(module_stats), dtype=float)
107 for i, stat
in enumerate(module_stats):
110 module_name = f
"{ROOT.Belle2.MakeROOTCompatible.makeROOTCompatible(stat.name)}_{i}"
112 ttree.Branch(module_name, self.
ttree_inputs[i:], f
"{module_name}/D")
117 time_sum = np.array([m.time_sum(basf2.statistics.EVENT)
for m
in module_stats], dtype=float)
128 ROOT.gDirectory = old