Belle II Software development
DQMAnalysisKLM.py
1#!/usr/bin/env python3
2
3
10
11import basf2
12
13# Set log level.
14basf2.set_log_level(basf2.LogLevel.INFO)
15
16# Create main path.
17main = basf2.create_path()
18
19# Input module.
20main.add_module('DQMHistAnalysisInputRootFile',
21 Experiment=0,
22 RunList=[0],
23 EventsList=[1],
24 EventInterval=1,
25 FileList=['KLMDQM.root'],
26 SelectHistograms=['KLM/*', 'DAQ/*'])
27
28main.add_module("DQMHistAutoCanvas") # Plot all Histo from Input
29
30# KLM DQM analysis module.
31main.add_module('DQMHistAnalysisKLM')
32
33# Output module.
34main.add_module('DQMHistAnalysisOutputFile',
35 HistoFile='KLMDQMAnalysed.root',
36 SaveHistos=False,
37 SaveCanvases=True)
38
39# Process main path.
40basf2.process(main)
41
42# Print modules' statistics.
43print(basf2.statistics)