diff --git a/form/root_storage/root_rntuple_write_container.hpp b/form/root_storage/root_rntuple_write_container.hpp index 8a582fb21..e386e120a 100644 --- a/form/root_storage/root_rntuple_write_container.hpp +++ b/form/root_storage/root_rntuple_write_container.hpp @@ -5,6 +5,8 @@ #include "storage/storage_write_association.hpp" +#include "RVersion.h" + #include #include @@ -14,15 +16,28 @@ namespace ROOT { class RNTupleWriter; class RNTupleModel; +#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 40, 0) + namespace Detail { + class RRawPtrWriteEntry; + } +#else namespace Experimental { namespace Detail { class RRawPtrWriteEntry; } } +#endif } namespace form::detail::experimental { + //ROOT 6.40 moved RRawPtrWriteEntry from ROOT::Experimental::Detail to ROOT::Detail. +#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 40, 0) + using RRawPtrWriteEntry = ROOT::Detail::RRawPtrWriteEntry; +#else + using RRawPtrWriteEntry = ROOT::Experimental::Detail::RRawPtrWriteEntry; +#endif + class ROOT_RNTuple_Write_ContainerImp : public Storage_Write_Association { public: ROOT_RNTuple_Write_ContainerImp(std::string const& name); @@ -43,7 +58,7 @@ namespace form::detail::experimental { //State shared by ROOT_RField_ContainerImps std::unique_ptr m_writer; std::unique_ptr m_model; - std::unique_ptr m_entry; + std::unique_ptr m_entry; }; }