Hi,
I’m trying to fill a TTree containing one integer per entry. For example, if the entries in my TTree are events, then what I want to have is an integer with the event number. It’s exactly one integer per entry (as opposed to e.g. electron pTs, which have to be inside an array/vector as there can be several electrons in an event).
I’m wondering how to do it in Python. I found a relevant tutorial here, and it says:
If you fill a
TTreeinC++, you can pass a double as a reference, called the address of the branch:TTree tree("tree_name","tree title"); Float_t px; tree.Branch("px",&px,"px/F");In
pythonhowever, you will need to use an array instead, for example thearrayclass.
Is it true that even though my variable is not an array/vector, I have no other choice but to put it in an array/vector when filling my TTree in Python?
Thanks!
ROOT Version: 6.32.08
Platform: does not matter
Compiler: does not matter