Skip to content

Commit e531ec1

Browse files
committed
[df] Remove dependency from RNTupleUtil in test
So it can actually be compiled and run even with `root7=OFF`.
1 parent 4286fa4 commit e531ec1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tree/dataframe/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ROOT_ADD_GTEST(dataframe_snapshot_emptyoutput dataframe_snapshot_emptyoutput.cxx
5757
ROOT_GENERATE_DICTIONARY(DummyDict ${CMAKE_CURRENT_SOURCE_DIR}/DummyHeader.hxx
5858
MODULE dataframe_snapshot_emptyoutput LINKDEF DummyHeaderLinkDef.hxx OPTIONS -inlineInputHeader
5959
DEPENDENCIES ROOTVecOps GenVector)
60-
ROOT_ADD_GTEST(dataframe_snapshot_ntuple dataframe_snapshot_ntuple.cxx LIBRARIES ROOTDataFrame ROOTNTupleUtil)
60+
ROOT_ADD_GTEST(dataframe_snapshot_ntuple dataframe_snapshot_ntuple.cxx LIBRARIES ROOTDataFrame ROOTNTuple)
6161
endif()
6262

6363
ROOT_ADD_GTEST(dataframe_datasetspec dataframe_datasetspec.cxx LIBRARIES ROOTDataFrame)

tree/dataframe/test/dataframe_snapshot_ntuple.cxx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "ROOT/RNTupleModel.hxx"
66
#include "ROOT/RNTupleWriter.hxx"
77
#include "ROOT/RNTupleReader.hxx"
8-
#include "ROOT/RNTupleInspector.hxx" // For testing compression settings
98

109
#include "TROOT.h"
1110
#include "TSystem.h"
@@ -17,7 +16,6 @@
1716
using ROOT::RNTupleModel;
1817
using ROOT::RNTupleReader;
1918
using ROOT::RNTupleWriter;
20-
using ROOT::Experimental::RNTupleInspector;
2119

2220
using namespace ROOT::RDF;
2321

@@ -116,8 +114,9 @@ TEST(RDFSnapshotRNTuple, Compression)
116114

117115
EXPECT_EQ(columns, sdf->GetColumnNames());
118116

119-
auto inspector = RNTupleInspector::Create("ntuple", fileGuard.GetPath());
120-
EXPECT_EQ(404, inspector->GetCompressionSettings());
117+
auto reader = RNTupleReader::Open("ntuple", fileGuard.GetPath());
118+
auto compSettings = *reader->GetDescriptor().GetClusterDescriptor(0).GetColumnRange(0).GetCompressionSettings();
119+
EXPECT_EQ(404, compSettings);
121120
}
122121

123122
class RDFSnapshotRNTupleTest : public ::testing::Test {

0 commit comments

Comments
 (0)