Skip to content

Commit

Permalink
[ntuple] fix option name in read options
Browse files Browse the repository at this point in the history
  • Loading branch information
jblomer committed Jan 30, 2025
1 parent bba0f50 commit 22fb187
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tree/ntuple/v7/inc/ROOT/RNTupleReadOptions.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public:
EImplicitMT GetUseImplicitMT() const { return fUseImplicitMT; }
void SetUseImplicitMT(EImplicitMT val) { fUseImplicitMT = val; }

bool HasMetricsEnabled() const { return fEnableMetrics; }
void SetMetricsEnabled(bool enable) { fEnableMetrics = enable; }
bool GetEnableMetrics() const { return fEnableMetrics; }
void SetEnableMetrics(bool val) { fEnableMetrics = val; }
}; // class RNTupleReadOptions

namespace Internal {
Expand Down
2 changes: 1 addition & 1 deletion tree/ntuple/v7/inc/ROOT/RNTupleReader.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public:
std::unique_ptr<RNTupleReader> Clone()
{
auto options = RNTupleReadOptions{};
options.SetMetricsEnabled(fMetrics.IsEnabled());
options.SetEnableMetrics(fMetrics.IsEnabled());
return std::unique_ptr<RNTupleReader>(new RNTupleReader(fSource->Clone(), options));
}
~RNTupleReader();
Expand Down
4 changes: 2 additions & 2 deletions tree/ntuple/v7/src/RNTupleReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ ROOT::Experimental::RNTupleReader::RNTupleReader(std::unique_ptr<ROOT::Experimen
throw RException(R__FAIL("model has projected fields, which is incompatible with providing a read model"));
}
fModel->Freeze();
InitPageSource(options.HasMetricsEnabled());
InitPageSource(options.GetEnableMetrics());
ConnectModel(*fModel);
}

ROOT::Experimental::RNTupleReader::RNTupleReader(std::unique_ptr<ROOT::Experimental::Internal::RPageSource> source,
const RNTupleReadOptions &options)
: fSource(std::move(source)), fModel(nullptr), fMetrics("RNTupleReader")
{
InitPageSource(options.HasMetricsEnabled());
InitPageSource(options.GetEnableMetrics());
}

ROOT::Experimental::RNTupleReader::~RNTupleReader() = default;
Expand Down

0 comments on commit 22fb187

Please sign in to comment.