-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
0 / 10 of 1 issue completedClosed
0 / 10 of 1 issue completed
Copy link
Labels
Description
Currently, when podio doesn't know how to instantiate a collection buffer for a collection on file, we just default construct a CollectionReadBuffer, which will not have a properly initialized create function, and will ultimately result in a bad_function_call, e.g.
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call
/<prefix>/bin/podio-dump: line 37: 2647243 Aborted (core dumped) "${THIS_DIR}"/podio-dump-tool "${ALL_ARGS[@]}"
The implementations are (among other places)
Lines 149 to 153 in 6bd80b0
| const auto& bufferFactory = podio::CollectionBufferFactory::instance(); | |
| auto maybeBuffers = bufferFactory.createBuffers(collType, schemaVersion, isSubsetColl); | |
| // TODO: Error handling of empty optional | |
| auto collBuffers = maybeBuffers.value_or(podio::CollectionReadBuffers{}); |
Lines 180 to 182 in 6bd80b0
| const auto& bufferFactory = podio::CollectionBufferFactory::instance(); | |
| const auto maybeBuffers = bufferFactory.createBuffers(collType, coll.schemaVersion, coll.isSubset); | |
| const auto collBuffers = maybeBuffers.value_or(podio::CollectionReadBuffers{}); |
podio/python/templates/SIOBlock.cc.jinja2
Lines 19 to 23 in 6bd80b0
| const auto& bufferFactory = podio::CollectionBufferFactory::instance(); | |
| // TODO: | |
| // - Error handling of empty optional | |
| auto maybeBuffers = bufferFactory.createBuffers("{{ class.full_type }}Collection", sio::version::major_version(version), m_subsetColl); | |
| m_buffers = maybeBuffers.value_or(podio::CollectionReadBuffers{}); |
The least we should do is to give a more informative error message here.
Reactions are currently unavailable