Logo ROOT  
Reference Guide
ROOT::Experimental::RAxisConfig Class Reference

Objects used to configure the different axis types.

It can store the properties of all possible axis types, together with the type of the axis.

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

Definition at line 300 of file RAxis.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 Types inherited from ROOT::Experimental::RAxisBase
enum class  EFindStatus { kCanGrow , kValid }
 Status of FindBin(x) More...
 

Public Member Functions

 RAxisConfig (const std::vector< double > &binborders)
 Represents a RAxisIrregular with binborders. More...
 
 RAxisConfig (const std::vector< std::string_view > &labels)
 Represents a RAxisLabels with labels. More...
 
 RAxisConfig (Grow_t, int nbins, double from, double to)
 Represents a RAxisGrow with nbins from from to to. More...
 
 RAxisConfig (int nbins, double from, double to)
 Represents a RAxisEquidistant with nbins from from to to. More...
 
 RAxisConfig (std::string_view title, const std::vector< double > &binborders)
 Represents a RAxisIrregular with binborders and title. More...
 
 RAxisConfig (std::string_view title, const std::vector< std::string_view > &labels)
 Represents a RAxisLabels with labels and title. More...
 
 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. More...
 
 RAxisConfig (std::string_view title, int nbins, double from, double to)
 Represents a RAxisEquidistant with nbins from from to to, and axis title. More...
 
 RAxisConfig (std::string_view title, std::vector< double > &&binborders) noexcept
 Represents a RAxisIrregular with binborders and title. More...
 
 RAxisConfig (std::string_view title, std::vector< std::string > &&labels)
 Represents a RAxisLabels with labels and title. More...
 
 RAxisConfig (std::vector< double > &&binborders) noexcept
 Represents a RAxisIrregular with binborders. More...
 
 RAxisConfig (std::vector< std::string > &&labels)
 Represents a RAxisLabels with labels. More...
 
const std::vector< double > & GetBinBorders () const noexcept
 Get the bin borders; non-empty if the GetKind() == kIrregular. More...
 
const std::vector< std::string > & GetBinLabels () const noexcept
 Get the bin labels; non-empty if the GetKind() == kLabels. More...
 
EKind GetKind () const noexcept
 Get the axis kind represented by this RAxisConfig. More...
 
- Public Member Functions inherited from ROOT::Experimental::RAxisBase
 RAxisBase (int nbinsNoOver, bool canGrow) noexcept
 Construct a RAxisBase. More...
 
 RAxisBase (std::string_view title, int nbinsNoOver, bool canGrow) noexcept
 Construct a RAxisBase. More...
 
int GetNBins () const noexcept
 Get the number of bins, including under- and overflow. More...
 
int GetNBinsNoOver () const noexcept
 Get the number of bins, excluding under- and overflow. More...
 
int GetNOverflowBins () const noexcept
 Get the number of over- and underflow bins: 0 for growable axes, 2 otherwise. More...
 
int GetOverflowBin () const noexcept
 Get the bin index for the underflow bin (or the next bin outside range if CanGrow()). More...
 
const std::string & GetTitle () const
 
int GetUnderflowBin () const noexcept
 Get the bin index for the underflow bin. More...
 
bool IsOverflowBin (int bin) const noexcept
 Whether the bin index is referencing a bin higher than the axis range. More...
 
bool IsUnderflowBin (int bin) const noexcept
 Whether the bin index is referencing a bin lower than the axis range. More...
 
const_iterator begin () const noexcept
 Get a const_iterator pointing to the first non-underflow bin. More...
 
const_iterator begin_with_underflow () const noexcept
 Get a const_iterator pointing the underflow bin. More...
 
const_iterator end () const noexcept
 Get a const_iterator pointing right beyond the last non-overflow bin (i.e. More...
 
const_iterator end_with_overflow () const noexcept
 Get a const_iterator pointing right beyond the overflow bin. More...
 

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.);. More...
 
- Static Public Attributes inherited from ROOT::Experimental::RAxisBase
static constexpr const int kIgnoreBin = -1
 FindBin() returns this bin to signal that the bin number is invalid. More...
 
static constexpr const int kNOverflowBins [4] = {0, 1, 1, 2}
 Extra bins for each EAxisOverflow value. More...
 

Private Member Functions

 RAxisConfig (std::string_view title, int nbins, double from, double to, EKind kind)
 Represents a RAxisEquidistant with nbins from from to to, and axis title. More...
 

Private Attributes

std::vector< double > fBinBorders
 Bin borders of the RAxisIrregular. More...
 
EKind fKind
 The kind of axis represented by this configuration. More...
 
std::vector< std::string > fLabels
 Bin labels for a RAxisLabels. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Experimental::RAxisBase
 RAxisBase ()=default
 Default construct a RAxisBase (for use by derived classes for I/O) More...
 
int AdjustOverflowBinNumber (double rawbin) const
 Given rawbin (<0 for underflow, >= GetNBinsNoOver() for overflow), determine the actual bin number taking into account how over/underflow should be handled. More...
 
 RAxisBase (const RAxisBase &)=default
 
 RAxisBase (RAxisBase &&)=default
 
RAxisBaseoperator= (const RAxisBase &)=default
 
RAxisBaseoperator= (RAxisBase &&)=default
 

#include <ROOT/RAxis.hxx>

Inheritance diagram for ROOT::Experimental::RAxisConfig:
[legend]

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 302 of file RAxis.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 with nbins from from to to, and axis title.

Definition at line 317 of file RAxis.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 339 of file RAxis.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 344 of file RAxis.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 347 of file RAxis.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 352 of file RAxis.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 355 of file RAxis.hxx.

◆ RAxisConfig() [7/13]

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

Represents a RAxisIrregular with binborders.

Definition at line 360 of file RAxis.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 363 of file RAxis.hxx.

◆ RAxisConfig() [9/13]

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

Represents a RAxisIrregular with binborders.

Definition at line 369 of file RAxis.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 372 of file RAxis.hxx.

◆ RAxisConfig() [11/13]

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

Represents a RAxisLabels with labels.

Definition at line 377 of file RAxis.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 380 of file RAxis.hxx.

◆ RAxisConfig() [13/13]

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

Represents a RAxisLabels with labels.

Definition at line 385 of file RAxis.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 391 of file RAxis.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 394 of file RAxis.hxx.

◆ GetKind()

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

Get the axis kind represented by this RAxisConfig.

Definition at line 388 of file RAxis.hxx.

Member Data Documentation

◆ fBinBorders

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

Bin borders of the RAxisIrregular.

Definition at line 312 of file RAxis.hxx.

◆ fKind

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

The kind of axis represented by this configuration.

Definition at line 311 of file RAxis.hxx.

◆ fLabels

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

Bin labels for a RAxisLabels.

Definition at line 313 of file RAxis.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 335 of file RAxis.hxx.

Libraries for ROOT::Experimental::RAxisConfig:
[legend]

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