13 from rawdata
import add_unpackers
14 from ROOT
import Belle2
26 print(
"usage: basf2", argvs[0],
"globalTag -i <inputFileName> -o <outputFileName>")
34 ''' select events according to given trigger types '''
37 ''' event processing '''
41 if not trg_summary.isValid():
42 basf2.B2ERROR(
'No TRGSummary available - event ignored')
45 for trgType
in trigTypes:
46 if trg_summary.getTimType() == trgType:
52 basf2.conditions.prepend_globaltag(globalTag)
55 main = basf2.create_path()
56 emptypath = basf2.create_path()
59 main.add_module(
'RootInput')
62 main.add_module(
'Gearbox')
65 main.add_module(
'Geometry')
68 main.add_module(
'TRGGDLUnpacker')
69 main.add_module(
'TRGGDLSummary')
72 main.add_module(
'Progress')
76 main.add_module(selector)
77 selector.if_false(emptypath)
81 components=[
'PXD',
'SVD',
'CDC',
'ECL',
'TOP',
'ARICH',
'KLM'])
84 main.add_module(
'KLMDigitTimeShifter')
87 main.add_module(
'TRGECLUnpacker')
88 main.add_module(
'TRGECLBGTCHit')
91 compress = basf2.register_module(
'ECLCompressBGOverlay')
92 main.add_module(compress, CompressionAlgorithm=3)
93 compress.if_false(emptypath)
96 output = basf2.register_module(
'RootOutput')
97 output.param(
'branchNames', [
'EventLevelTriggerTimeInfo',
'PXDDigits',
'SVDShaperDigits',
'CDCHits',
'TOPDigits',
98 'ARICHDigits',
'ECLWaveforms',
'KLMDigits',
'TRGECLBGTCHits'])
99 main.add_module(output)
105 print(basf2.statistics)
a (simplified) python wrapper for StoreObjPtr.