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

Objects used to configure the different axis types.

It can store the properties of all ROOT-provided axis types, together with the type of the axis.

TODO: that's what a variant will be invented for!

Definition at line 35 of file RAxisConfig.hxx.

Classes

struct  Grow_t
 Tag type signalling that an axis should be able to grow; used for calling the appropriate constructor. More...
 

Public Types

enum  EKind {
  kEquidistant , kGrow , kIrregular , kLabels ,
  kNumKinds
}
 

Public Member Functions

 RAxisConfig (const std::vector< double > &binborders)
 Represents a RAxisIrregular with binborders.
 
 RAxisConfig (const std::vector< std::string_view > &labels)
 Represents a RAxisLabels with labels.
 
 RAxisConfig (Grow_t, int nbins, double from, double to)
 Represents a RAxisGrow with nbins from from to to.
 
 RAxisConfig (int nbins, double from, double to)
 Represents a RAxisEquidistant with nbins from from to to.
 
 RAxisConfig (std::string_view title, const std::vector< double > &binborders)
 Represents a RAxisIrregular with binborders and title.
 
 RAxisConfig (std::string_view title, const std::vector< std::string_view > &labels)
 Represents a RAxisLabels with labels and title.
 
 RAxisConfig (std::string_view title, Grow_t, int nbins, double from, double to)
 Represents a RAxisGrow with nbins from from to to, and axis title.
 
 RAxisConfig (std::string_view title, int nbins, double from, double to)
 Represents a RAxisEquidistant with nbins from from to to, and axis title.
 
 RAxisConfig (std::string_view title, std::vector< double > &&binborders) noexcept
 Represents a RAxisIrregular with binborders and title.
 
 RAxisConfig (std::string_view title, std::vector< std::string > &&labels)
 Represents a RAxisLabels with labels and title.
 
 RAxisConfig (std::vector< double > &&binborders) noexcept
 Represents a RAxisIrregular with binborders.
 
 RAxisConfig (std::vector< std::string > &&labels)
 Represents a RAxisLabels with labels.
 
const std::vector< double > & GetBinBorders () const noexcept
 Get the bin borders; non-empty if the GetKind() == kIrregular.
 
const std::vector< std::string > & GetBinLabels () const noexcept
 Get the bin labels; non-empty if the GetKind() == kLabels.
 
EKind GetKind () const noexcept
 Get the axis kind represented by this RAxisConfig.
 
int GetNBinsNoOver () const noexcept
 Get the number of bins, excluding under- and overflow.
 
const std::string & GetTitle () const
 Get the axis's title.
 

Static Public Attributes

static constexpr const Grow_t Grow {}
 Tag signalling that an axis should be able to grow; used for calling the appropriate constructor like so: RAxisConfig ac(RAxisConfig::Grow, 10, 0., 1.);.
 

Private Member Functions

 RAxisConfig (std::string_view title, int nbins, double from, double to, EKind kind)
 Represents a RAxisEquidistant or RAxisGrow with nbins (excluding over- and underflow bins) from from to to, with an axis title.
 

Private Attributes

std::vector< doublefBinBorders
 Bin borders of the RAxisIrregular.
 
EKind fKind
 The kind of axis represented by this configuration.
 
std::vector< std::string > fLabels
 Bin labels for a RAxisLabels.
 
int fNBinsNoOver
 
std::string fTitle
 

#include <ROOT/RAxisConfig.hxx>

Member Enumeration Documentation

◆ EKind

Enumerator
kEquidistant 

represents a RAxisEquidistant

kGrow 

represents a RAxisGrow

kIrregular 

represents a RAxisIrregular

kLabels 

represents a RAxisLabels

kNumKinds 

Definition at line 37 of file RAxisConfig.hxx.

Constructor & Destructor Documentation

◆ RAxisConfig() [1/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
int  nbins,
double  from,
double  to,
EKind  kind 
)
inlineexplicitprivate

Represents a RAxisEquidistant or RAxisGrow with nbins (excluding over- and underflow bins) from from to to, with an axis title.

Definition at line 54 of file RAxisConfig.hxx.

◆ RAxisConfig() [2/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
int  nbins,
double  from,
double  to 
)
inline

Represents a RAxisEquidistant with nbins from from to to, and axis title.

Definition at line 76 of file RAxisConfig.hxx.

◆ RAxisConfig() [3/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( int  nbins,
double  from,
double  to 
)
inline

Represents a RAxisEquidistant with nbins from from to to.

Definition at line 81 of file RAxisConfig.hxx.

◆ RAxisConfig() [4/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
Grow_t  ,
int  nbins,
double  from,
double  to 
)
inline

Represents a RAxisGrow with nbins from from to to, and axis title.

Definition at line 84 of file RAxisConfig.hxx.

◆ RAxisConfig() [5/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( Grow_t  ,
int  nbins,
double  from,
double  to 
)
inline

Represents a RAxisGrow with nbins from from to to.

Definition at line 89 of file RAxisConfig.hxx.

◆ RAxisConfig() [6/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
const std::vector< double > &  binborders 
)
inline

Represents a RAxisIrregular with binborders and title.

Definition at line 92 of file RAxisConfig.hxx.

◆ RAxisConfig() [7/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( const std::vector< double > &  binborders)
inline

Represents a RAxisIrregular with binborders.

Definition at line 97 of file RAxisConfig.hxx.

◆ RAxisConfig() [8/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
std::vector< double > &&  binborders 
)
inlinenoexcept

Represents a RAxisIrregular with binborders and title.

Definition at line 100 of file RAxisConfig.hxx.

◆ RAxisConfig() [9/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::vector< double > &&  binborders)
inlinenoexcept

Represents a RAxisIrregular with binborders.

Definition at line 106 of file RAxisConfig.hxx.

◆ RAxisConfig() [10/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
const std::vector< std::string_view > &  labels 
)
inline

Represents a RAxisLabels with labels and title.

Definition at line 109 of file RAxisConfig.hxx.

◆ RAxisConfig() [11/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( const std::vector< std::string_view > &  labels)
inline

Represents a RAxisLabels with labels.

Definition at line 114 of file RAxisConfig.hxx.

◆ RAxisConfig() [12/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::string_view  title,
std::vector< std::string > &&  labels 
)
inline

Represents a RAxisLabels with labels and title.

Definition at line 117 of file RAxisConfig.hxx.

◆ RAxisConfig() [13/13]

ROOT::Experimental::RAxisConfig::RAxisConfig ( std::vector< std::string > &&  labels)
inline

Represents a RAxisLabels with labels.

Definition at line 122 of file RAxisConfig.hxx.

Member Function Documentation

◆ GetBinBorders()

const std::vector< double > & ROOT::Experimental::RAxisConfig::GetBinBorders ( ) const
inlinenoexcept

Get the bin borders; non-empty if the GetKind() == kIrregular.

Definition at line 134 of file RAxisConfig.hxx.

◆ GetBinLabels()

const std::vector< std::string > & ROOT::Experimental::RAxisConfig::GetBinLabels ( ) const
inlinenoexcept

Get the bin labels; non-empty if the GetKind() == kLabels.

Definition at line 137 of file RAxisConfig.hxx.

◆ GetKind()

EKind ROOT::Experimental::RAxisConfig::GetKind ( ) const
inlinenoexcept

Get the axis kind represented by this RAxisConfig.

Definition at line 128 of file RAxisConfig.hxx.

◆ GetNBinsNoOver()

int ROOT::Experimental::RAxisConfig::GetNBinsNoOver ( ) const
inlinenoexcept

Get the number of bins, excluding under- and overflow.

Definition at line 131 of file RAxisConfig.hxx.

◆ GetTitle()

const std::string & ROOT::Experimental::RAxisConfig::GetTitle ( ) const
inline

Get the axis's title.

Definition at line 125 of file RAxisConfig.hxx.

Member Data Documentation

◆ fBinBorders

std::vector<double> ROOT::Experimental::RAxisConfig::fBinBorders
private

Bin borders of the RAxisIrregular.

Definition at line 49 of file RAxisConfig.hxx.

◆ fKind

EKind ROOT::Experimental::RAxisConfig::fKind
private

The kind of axis represented by this configuration.

Definition at line 48 of file RAxisConfig.hxx.

◆ fLabels

std::vector<std::string> ROOT::Experimental::RAxisConfig::fLabels
private

Bin labels for a RAxisLabels.

Definition at line 50 of file RAxisConfig.hxx.

◆ fNBinsNoOver

int ROOT::Experimental::RAxisConfig::fNBinsNoOver
private

Definition at line 47 of file RAxisConfig.hxx.

◆ fTitle

std::string ROOT::Experimental::RAxisConfig::fTitle
private

Definition at line 46 of file RAxisConfig.hxx.

◆ Grow

constexpr const Grow_t ROOT::Experimental::RAxisConfig::Grow {}
staticconstexpr

Tag signalling that an axis should be able to grow; used for calling the appropriate constructor like so: RAxisConfig ac(RAxisConfig::Grow, 10, 0., 1.);.

Definition at line 72 of file RAxisConfig.hxx.

Libraries for ROOT::Experimental::RAxisConfig:

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