Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Detail::RNTupleMetrics Class Reference

A collection of Counter objects with a name, a unit, and a description.

The class owns the counters.

If the environment variable ROOT_EXPERIMENTAL_EXPORT_RNTUPLE_METRICS is set, metrics are automatically enabled on construction, and any counter added afterwards through MakeCounter() is enabled as well.

Definition at line 290 of file RNTupleMetrics.hxx.

Public Member Functions

 RNTupleMetrics (const RNTupleMetrics &other)=delete
 
 RNTupleMetrics (const std::string &name)
 
 RNTupleMetrics (const std::string &name, const std::string &ntupleName)
 
 RNTupleMetrics (RNTupleMetrics &&other)=default
 
 ~RNTupleMetrics ()
 
void Enable ()
 
const RNTuplePerfCounterGetCounter (std::string_view name) const
 Searches this object and all the observed sub metrics.
 
const RNTuplePerfCounterGetLocalCounter (std::string_view name) const
 Searches counters registered in this object only. Returns nullptr if name is not found.
 
bool IsEnabled () const
 
template<typename CounterPtrT , class... Args>
CounterPtrT MakeCounter (const std::string &name, Args &&... args)
 
void ObserveMetrics (RNTupleMetrics &observee)
 
RNTupleMetricsoperator= (const RNTupleMetrics &other)=delete
 
RNTupleMetricsoperator= (RNTupleMetrics &&other)=default
 
void Print (std::ostream &output, const std::string &prefix="") const
 

Static Public Member Functions

static std::string GetMetricsExportPath ()
 

Private Member Functions

void CollectCounters (std::vector< std::pair< std::string, const RNTuplePerfCounter * > > &counters, const std::string &prefix="") const
 Retrieves each counter of the observed metrics down to the class instances which own the counters and pairs them with their fully qualified names.
 
bool Contains (const std::string &name) const
 
void ExportToRootFile ()
 

Private Attributes

std::vector< std::unique_ptr< RNTuplePerfCounter > > fCounters
 
std::string fExportPath
 
bool fIsEnabled = false
 
std::string fName
 
std::string fNTupleName
 
std::vector< RNTupleMetrics * > fObservedMetrics
 

Static Private Attributes

static constexpr char kNamespaceSeperator = '.'
 Symbol to split metrics name from counter / sub metrics name.
 

#include <ROOT/RNTupleMetrics.hxx>

Constructor & Destructor Documentation

◆ RNTupleMetrics() [1/4]

ROOT::Experimental::Detail::RNTupleMetrics::RNTupleMetrics ( const std::string & name)
inlineexplicit

Definition at line 311 of file RNTupleMetrics.hxx.

◆ RNTupleMetrics() [2/4]

ROOT::Experimental::Detail::RNTupleMetrics::RNTupleMetrics ( const std::string & name,
const std::string & ntupleName )
inline

Definition at line 312 of file RNTupleMetrics.hxx.

◆ RNTupleMetrics() [3/4]

ROOT::Experimental::Detail::RNTupleMetrics::RNTupleMetrics ( const RNTupleMetrics & other)
delete

◆ RNTupleMetrics() [4/4]

ROOT::Experimental::Detail::RNTupleMetrics::RNTupleMetrics ( RNTupleMetrics && other)
default

◆ ~RNTupleMetrics()

ROOT::Experimental::Detail::RNTupleMetrics::~RNTupleMetrics ( )

Definition at line 136 of file RNTupleMetrics.cxx.

Member Function Documentation

◆ CollectCounters()

void ROOT::Experimental::Detail::RNTupleMetrics::CollectCounters ( std::vector< std::pair< std::string, const RNTuplePerfCounter * > > & counters,
const std::string & prefix = "" ) const
private

Retrieves each counter of the observed metrics down to the class instances which own the counters and pairs them with their fully qualified names.

Definition at line 144 of file RNTupleMetrics.cxx.

◆ Contains()

bool ROOT::Experimental::Detail::RNTupleMetrics::Contains ( const std::string & name) const
private

Definition at line 61 of file RNTupleMetrics.cxx.

◆ Enable()

void ROOT::Experimental::Detail::RNTupleMetrics::Enable ( )

Definition at line 111 of file RNTupleMetrics.cxx.

◆ ExportToRootFile()

void ROOT::Experimental::Detail::RNTupleMetrics::ExportToRootFile ( )
private

Definition at line 163 of file RNTupleMetrics.cxx.

◆ GetCounter()

const ROOT::Experimental::Detail::RNTuplePerfCounter * ROOT::Experimental::Detail::RNTupleMetrics::GetCounter ( std::string_view name) const

Searches this object and all the observed sub metrics.

name must start with the prefix used by this RNTupleMetrics instance. Returns nullptr if name is not found.

Definition at line 77 of file RNTupleMetrics.cxx.

◆ GetLocalCounter()

const ROOT::Experimental::Detail::RNTuplePerfCounter * ROOT::Experimental::Detail::RNTupleMetrics::GetLocalCounter ( std::string_view name) const

Searches counters registered in this object only. Returns nullptr if name is not found.

Definition at line 67 of file RNTupleMetrics.cxx.

◆ GetMetricsExportPath()

std::string ROOT::Experimental::Detail::RNTupleMetrics::GetMetricsExportPath ( )
static

Definition at line 125 of file RNTupleMetrics.cxx.

◆ IsEnabled()

bool ROOT::Experimental::Detail::RNTupleMetrics::IsEnabled ( ) const
inline

Definition at line 353 of file RNTupleMetrics.hxx.

◆ MakeCounter()

template<typename CounterPtrT , class... Args>
CounterPtrT ROOT::Experimental::Detail::RNTupleMetrics::MakeCounter ( const std::string & name,
Args &&... args )
inline

Definition at line 331 of file RNTupleMetrics.hxx.

◆ ObserveMetrics()

void ROOT::Experimental::Detail::RNTupleMetrics::ObserveMetrics ( RNTupleMetrics & observee)

Definition at line 120 of file RNTupleMetrics.cxx.

◆ operator=() [1/2]

RNTupleMetrics & ROOT::Experimental::Detail::RNTupleMetrics::operator= ( const RNTupleMetrics & other)
delete

◆ operator=() [2/2]

RNTupleMetrics & ROOT::Experimental::Detail::RNTupleMetrics::operator= ( RNTupleMetrics && other)
default

◆ Print()

void ROOT::Experimental::Detail::RNTupleMetrics::Print ( std::ostream & output,
const std::string & prefix = "" ) const

Definition at line 96 of file RNTupleMetrics.cxx.

Member Data Documentation

◆ fCounters

std::vector<std::unique_ptr<RNTuplePerfCounter> > ROOT::Experimental::Detail::RNTupleMetrics::fCounters
private

Definition at line 295 of file RNTupleMetrics.hxx.

◆ fExportPath

std::string ROOT::Experimental::Detail::RNTupleMetrics::fExportPath
private

Definition at line 299 of file RNTupleMetrics.hxx.

◆ fIsEnabled

bool ROOT::Experimental::Detail::RNTupleMetrics::fIsEnabled = false
private

Definition at line 300 of file RNTupleMetrics.hxx.

◆ fName

std::string ROOT::Experimental::Detail::RNTupleMetrics::fName
private

Definition at line 297 of file RNTupleMetrics.hxx.

◆ fNTupleName

std::string ROOT::Experimental::Detail::RNTupleMetrics::fNTupleName
private

Definition at line 298 of file RNTupleMetrics.hxx.

◆ fObservedMetrics

std::vector<RNTupleMetrics *> ROOT::Experimental::Detail::RNTupleMetrics::fObservedMetrics
private

Definition at line 296 of file RNTupleMetrics.hxx.

◆ kNamespaceSeperator

constexpr char ROOT::Experimental::Detail::RNTupleMetrics::kNamespaceSeperator = '.'
staticconstexprprivate

Symbol to split metrics name from counter / sub metrics name.

Definition at line 293 of file RNTupleMetrics.hxx.

Libraries for ROOT::Experimental::Detail::RNTupleMetrics:

The documentation for this class was generated from the following files: