|
| 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 50 of file pid_ttree_writer.py.
◆ __init__()
Initialize the module
Definition at line 57 of file pid_ttree_writer.py.
58 """Initialize the module"""
60 super(TreeWriterModule, self).__init__()
63 self.file = ROOT.TFile(
'PID_TTree.root',
'recreate')
65 self.tree = ROOT.TTree(
'tree',
'')
67 self.data = TreeStruct()
68 """ Declare tree branches """
69 for key
in TreeStruct.__dict__.keys():
72 if isinstance(self.data.__getattribute__(key), int):
74 self.tree.Branch(key, AddressOf(self.data, key), key + formstring)
◆ event()
◆ terminate()
The documentation for this class was generated from the following file: