16#ifndef ROOT7_RNTupleInspector
17#define ROOT7_RNTupleInspector
32namespace Experimental {
175 static std::unique_ptr<RNTupleInspector>
Create(
RNTuple *sourceNTuple);
184 static std::unique_ptr<RNTupleInspector>
Create(std::string_view ntupleName, std::string_view storage);
192 static std::unique_ptr<RNTupleInspector>
Create(std::unique_ptr<Detail::RPageSource> pageSource);
309 std::ostream &
output = std::cout);
323 std::string_view histTitle =
"");
349 size_t GetFieldCountByType(
const std::regex &typeNamePattern,
bool searchInSubFields =
true)
const;
369 const std::vector<DescriptorId_t>
370 GetFieldsByName(
const std::regex &fieldNamePattern,
bool searchInSubFields =
true)
const;
376 const std::vector<DescriptorId_t>
GetFieldsByName(std::string_view fieldNamePattern,
bool searchInSubFields =
true)
378 return GetFieldsByName(std::regex{std::string(fieldNamePattern)}, searchInSubFields);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Meta-data stored for every column of an ntuple.
RColumnModel GetModel() const
EColumnType GetType() const
Meta-data stored for every field of an ntuple.
The on-storage meta-data of an ntuple.
Holds column-level storage information.
std::uint64_t GetElementSize() const
const RColumnDescriptor & GetDescriptor() const
std::uint32_t fElementSize
std::uint64_t fCompressedSize
std::uint64_t GetUncompressedSize() const
const RColumnDescriptor & fColumnDescriptor
RColumnInfo(const RColumnDescriptor &colDesc, std::uint64_t onDiskSize, std::uint32_t elemSize, std::uint64_t nElems)
EColumnType GetType() const
std::uint64_t GetNElements() const
std::uint64_t GetCompressedSize() const
Holds field-level storage information.
const RFieldDescriptor & GetDescriptor() const
std::uint64_t fUncompressedSize
~RFieldTreeInfo()=default
std::uint64_t GetUncompressedSize() const
RFieldTreeInfo(const RFieldDescriptor &fieldDesc, std::uint64_t onDiskSize, std::uint64_t inMemSize)
std::uint64_t fCompressedSize
const RFieldDescriptor & fRootFieldDescriptor
std::uint64_t GetCompressedSize() const
Inspect on-disk and storage-related information of an RNTuple.
const RFieldTreeInfo & GetFieldTreeInfo(DescriptorId_t fieldId) const
Get storage information for a given (sub)field by ID.
float GetCompressionFactor() const
Get the compression factor of the RNTuple being inspected.
const std::vector< DescriptorId_t > GetFieldsByName(const std::regex &fieldNamePattern, bool searchInSubFields=true) const
Get the IDs of (sub-)fields whose name matches the given string.
RNTupleInspector & operator=(RNTupleInspector &&other)=delete
std::unique_ptr< TFile > fSourceFile
RNTupleInspector(const RNTupleInspector &other)=delete
std::uint64_t GetCompressedSize() const
Get the compressed, on-disk size of the RNTuple being inspected.
std::map< int, RColumnInfo > fColumnInfo
std::uint64_t GetUncompressedSize() const
Get the uncompressed total size of the RNTuple being inspected.
size_t GetColumnCountByType(EColumnType colType) const
Get the number of columns of a given type present in the RNTuple.
RNTupleInspector(RNTupleInspector &&other)=delete
std::map< int, RFieldTreeInfo > fFieldTreeInfo
std::string GetCompressionSettingsAsString() const
Get a string describing compression settings of the RNTuple being inspected.
RNTupleDescriptor * GetDescriptor() const
Get the descriptor for the RNTuple being inspected.
static std::unique_ptr< RNTupleInspector > Create(RNTuple *sourceNTuple)
Create a new RNTupleInspector.
std::uint64_t fCompressedSize
size_t GetFieldCountByType(std::string_view typeNamePattern, bool searchInSubFields=true) const
Get the number of fields of a given type or class present in the RNTuple.
const std::vector< DescriptorId_t > GetColumnsByType(EColumnType colType)
Get the IDs of all columns with the given type.
void PrintColumnTypeInfo(ENTupleInspectorPrintFormat format=ENTupleInspectorPrintFormat::kTable, std::ostream &output=std::cout)
Print storage information per column type.
const std::vector< DescriptorId_t > GetFieldsByName(std::string_view fieldNamePattern, bool searchInSubFields=true)
Get the IDs of (sub-)fields whose name matches the given string.
RFieldTreeInfo CollectFieldTreeInfo(DescriptorId_t fieldId)
Recursively gather field-level information.
std::uint64_t fUncompressedSize
std::unique_ptr< RNTupleDescriptor > fDescriptor
RNTupleInspector & operator=(const RNTupleInspector &other)=delete
std::vector< DescriptorId_t > GetColumnsByFieldId(DescriptorId_t fieldId) const
Get the columns that make up the given field, including its subfields.
~RNTupleInspector()=default
void CollectColumnInfo()
Gather column-level and RNTuple-level information.
int GetCompressionSettings() const
Get the compression settings of the RNTuple being inspected.
size_t GetFieldCountByType(const std::regex &typeNamePattern, bool searchInSubFields=true) const
Get the number of fields of a given type or class present in the RNTuple.
const RColumnInfo & GetColumnInfo(DescriptorId_t physicalColumnId) const
Get storage information for a given column.
std::unique_ptr< TH1D > GetColumnTypeInfoAsHist(ENTupleInspectorHist histKind, std::string_view histName="", std::string_view histTitle="")
Get a histogram showing information for each column type present,.
std::unique_ptr< Detail::RPageSource > fPageSource
Representation of an RNTuple data set in a ROOT file.
ENTupleInspectorPrintFormat
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.