-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Subset collections of datatypes with VectorMembers do not work #462
Comments
Another issue with subset collections of datatypes with a auto reader = podio::ROOTFrameReader();
reader.openFile("inputfile.root");
auto writer = podio::ROOTFrameWriter("outputfile.root");
auto event = podio::Frame(reader.readEntry("events", 0));
// assume there is a subset collection with a subset collection
// of a datatype with a VectorMember, e.g. ExampleWithVectorMember
writer.writeFrame(event, "events"); The final call here will crash with something like:
This is because, we try to access elements of a vector that do not exist in this case, here: podio/python/templates/CollectionData.cc.jinja2 Lines 84 to 92 in 65b58ea
The access to the vector members need to be guarded by an |
If a subset collection of a datatype that has any
VectorMembers
is written it cannot be read back with ROOT because therecast
function tries to access non-existing elements of a vector here:podio/python/templates/Collection.cc.jinja2
Lines 200 to 209 in 6b8eeb1
The stacktrace looks something like this, when using the
ExampleWithVectorMember
datatypeAdditionally subset collections of a datatype with
VectorMembers
cannot even be written with SIO.The text was updated successfully, but these errors were encountered: