|
| file |
| Output ROOT file.
|
|
| tree |
| TTree for output data.
|
|
| data |
| Instance of EventData class.
|
|
This module writes its output to a ROOT tree.
Adapted from pxd/validation/PXDValidationTTreeSimHit.py
Definition at line 46 of file pid_ttree_writer.py.
◆ __init__()
Initialize the module
Definition at line 53 of file pid_ttree_writer.py.
54 """Initialize the module"""
56 super(TreeWriterModule, self).__init__()
59 self.file = ROOT.TFile(
'PID_TTree.root',
'recreate')
61 self.tree = ROOT.TTree(
'tree',
'')
63 self.data = TreeStruct()
64 """ Declare tree branches """
65 for key
in TreeStruct.__dict__.keys():
68 if isinstance(self.data.__getattribute__(key), int):
70 self.tree.Branch(key, AddressOf(self.data, key), key + formstring)
◆ event()
◆ terminate()
The documentation for this class was generated from the following file: