19from ROOT
import Belle2
22b2.set_log_level(b2.LogLevel.INFO)
25b2.use_database_chain()
31if input_files.empty():
32 print(
'Please specify input file(s). Example usage:',
33 'basf2 perfect_match.py -i input.sroot')
35if input_files.front().endswith(
".sroot"):
36 root_input = b2.register_module(
'SeqRootInput')
38 root_input = b2.register_module(
'RootInput')
40unpacker = b2.register_module(
'CDCUnpacker')
41unpacker.param(
'enableStoreCDCRawHit',
True)
43output = b2.register_module(
'RootOutput')
44output.param(
'outputFileName',
'UnpackerOutput.root')
45output.param(
'branchNames', [
'CDCHits',
'CDCRawHits'])
55 set CDCHits and EventMetaData
64 Print TRG time of an event
66 b2.B2INFO(f'Event {self.event_info.getEvent()}:')
68 cdc_raw_hit = hit.getRelatedTo(
'CDCRawHits')
69 b2.B2INFO(f
'Trigger time: {cdc_raw_hit.getTriggerTime()}')
73main = b2.create_path()
76main.add_module(root_input)
77main.add_module(unpacker)
static Environment & Instance()
Static method to get a reference to the Environment instance.
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.