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)
|
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{}); |
|
const auto& bufferFactory = podio::CollectionBufferFactory::instance(); |
|
const auto maybeBuffers = bufferFactory.createBuffers(collType, coll.schemaVersion, coll.isSubset); |
|
const auto collBuffers = maybeBuffers.value_or(podio::CollectionReadBuffers{}); |
|
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.
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 initializedcreatefunction, and will ultimately result in abad_function_call, e.g.The implementations are (among other places)
podio/src/ROOTReader.cc
Lines 149 to 153 in 6bd80b0
podio/src/RNTupleReader.cc
Lines 180 to 182 in 6bd80b0
podio/python/templates/SIOBlock.cc.jinja2
Lines 19 to 23 in 6bd80b0
The least we should do is to give a more informative error message here.