Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure RNTupleReader build with ROOT > 6.34 #719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/RNTupleReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

#include <memory>

// Adjust for the move of this out of ROOT v7 in
// https://github.com/root-project/root/pull/17281
#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 35, 0)
using ROOT::RException;
#else
using ROOT::Experimental::RException;
#endif

namespace podio {

template <typename T>
Expand Down Expand Up @@ -90,7 +98,7 @@ void RNTupleReader::openFiles(const std::vector<std::string>& filenames) {
auto edmVersionView = m_metadata->GetView<std::vector<uint16_t>>(root_utils::edmVersionBranchName(name));
auto edmVersion = edmVersionView(0);
edmVersions.emplace_back(name, podio::version::Version{edmVersion[0], edmVersion[1], edmVersion[2]});
} catch (const ROOT::Experimental::RException&) {
} catch (const RException&) {
}
}
m_datamodelHolder = DatamodelDefinitionHolder(std::move(edm), std::move(edmVersions));
Expand All @@ -104,7 +112,7 @@ unsigned RNTupleReader::getEntries(const std::string& name) {
for (auto& filename : m_filenames) {
try {
m_readers[name].emplace_back(ROOT::Experimental::RNTupleReader::Open(name, filename));
} catch (const ROOT::Experimental::RException& e) {
} catch (const RException& e) {
std::cout << "Category " << name << " not found in file " << filename << std::endl;
}
}
Expand Down
Loading