I am accessing some C++ objects stored in a ROOT TTree using PyROOT. In PyROOT, something like a C++ vector can be looped over in the same way that a Python list can be looped over.
for eventIndex, event in enumerate(variablesTree):
for status in event.el_isTight:
print(status)
One of these objects (with the name el_isTight) is represented by the following printout:
<class '__main__.vector<char,allocator<char> >'>
Since it is a vector, I can loop over it successfully and I can get its length (which is correct), however, I don’t know how to deal with its elements. When I print one of the elements of the vector, I get a representation like the following:
How could I try to access this type of object? Conceptually, I expect it to be effectively a Boolean or something with a 0 or 1 value (with each element of the vector corresponding to a characteristic of one electron in an event).