Belle II Software development
runSVDDQM_rawData.py
1#!/usr/bin/env python3
2
3
10
11
21
22import basf2 as b2
23from basf2 import conditions as b2conditions
24import tracking as trk
25import rawdata as raw
26import daqdqm.commondqm as cdqm
27
28# needed for some temporary issues with BKLMDisplacement payload
29b2conditions.override_globaltags()
30b2conditions.globaltags = ['data_reprocessing_prompt', 'online_bucket10', 'Reco_master_patch_rel5', 'online']
31# b2conditions.globaltags = ['online']
32
33# main main
34main = b2.create_path()
35
36# RAW
37files = ['/group/belle2/dataprod/Data/PromptSkim/e0012/4S/r02874/skim/hadron/raw/sub00/physics.*.root']
38
39# no SVD raw data in this file:
40# files = ['/gpfs/group/belle2/fast_lane/inbox/debug.0012.01304.HLT3.f00010.root']
41
42
43# read input rootfile
44# -> can be overwritten with the -i option
45main.add_module("RootInput", inputFileNames=files)
46
47# register the HistoManager and specify output file
48main.add_module("HistoManager", histoFileName="SVDRawDQMOutput.root")
49
50# nee to know SVD geometry to create histograms
51main.add_module('Gearbox')
52main.add_module('Geometry')
53
54# unpack
55raw.add_unpackers(main, components=['PXD', 'SVD', 'CDC', 'TRG'])
56# uncomment to unpack simulating the 3-samples DAQ mode!
57# raw.add_unpackers(main, components=['PXD', 'CDC', 'TRG'])
58# svd.add_svd_unpacker_simulate3sampleAcquisitionMode(main)
59
60trk.add_tracking_reconstruction(main, components=['SVD', 'CDC'])
61
62# add DQM
63cdqm.add_common_dqm(main, components=['SVD'])
64
65# == Show progress
66main.add_module('Progress')
67
68b2.print_path(main)
69
70# Process events
71b2.process(main)
72
73print(b2.statistics)