10std::unique_ptr<podio::IReader>
createReader(
const std::string& filename) {
11 const auto fileEnding = [&filename]() -> std::string {
12 const auto n = filename.rfind(
'.');
13 if (n != std::string::npos) {
14 return filename.substr(n);
19 if (fileEnding.empty()) {
23 if (fileEnding ==
".root") {
24 return std::make_unique<podio::ROOTReader>();
25 }
else if (fileEnding ==
".sio") {
27 return std::make_unique<podio::SIOReader>();
29 std::cerr <<
"PODIO: You are trying to open a .sio file but podio has not been built with SIO support\nMake sure "
30 "to build PODIO with SIO support to be able to read .sio files"
std::unique_ptr< podio::IReader > createReader(const std::string &filename)