Skip to content

Commit ed87847

Browse files
print RNTuple info before reading
1 parent 6e7ac37 commit ed87847

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/hep_dimuon_analysis_cms/hep_dimuon_analysis_cms.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ auto buildRNTupleFileModel(const std::string& path)
135135
};
136136

137137
auto ntuple = ROOT::Experimental::RNTupleReader::Open(ROOT::Experimental::RNTupleModel::Create(), "NTuple", path);
138+
try
139+
{
140+
ntuple->PrintInfo(ROOT::Experimental::ENTupleInfo::kStorageDetails);
141+
}
142+
catch (const std::exception& e)
143+
{
144+
fmt::print("PrintInfo error: {}", e.what());
145+
}
138146
auto viewMuon = ntuple->GetViewCollection("nMuon");
139147
auto viewCharge = viewMuon.GetView<std::int32_t>("nMuon.Muon_charge");
140148
auto viewPt = viewMuon.GetView<float>("nMuon.Muon_pt");

0 commit comments

Comments
 (0)