Logo ROOT   6.08/07
Reference Guide
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
ROOT::Experimental::TAxisConfig 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.

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

Definition at line 706 of file TAxis.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::TAxisBase
enum  EFindStatus { EFindStatus::kCanGrow, EFindStatus::kValid }
 Status of FindBin(x) More...
 

Public Member Functions

 TAxisConfig (std::string_view title, int nbins, double from, double to)
 Represents a TAxisEquidistant with nbins from from to to, and axis title. More...
 
 TAxisConfig (int nbins, double from, double to)
 Represents a TAxisEquidistant with nbins from from to to. More...
 
 TAxisConfig (std::string_view title, Grow_t, int nbins, double from, double to)
 Represents a TAxisGrow with nbins from from to to, and axis title. More...
 
 TAxisConfig (Grow_t, int nbins, double from, double to)
 Represents a TAxisGrow with nbins from from to to. More...
 
 TAxisConfig (const std::vector< double > &binborders)
 Represents a TAxisIrregular with binborders. More...
 
 TAxisConfig (std::string_view title, const std::vector< double > &binborders)
 Represents a TAxisIrregular with binborders and title. More...
 
 TAxisConfig (std::vector< double > &&binborders) noexcept
 Represents a TAxisIrregular with binborders. More...
 
 TAxisConfig (std::string_view title, std::vector< double > &&binborders) noexcept
 Represents a TAxisIrregular with binborders. More...
 
 TAxisConfig (const std::vector< std::string_view > &labels)
 Represents a TAxisLabels with labels. More...
 
 TAxisConfig (std::string_view title, const std::vector< std::string_view > &labels)
 Represents a TAxisLabels with labels and title. More...
 
 TAxisConfig (std::vector< std::string > &&labels)
 Represents a TAxisLabels with labels. More...
 
 TAxisConfig (std::string_view title, std::vector< std::string > &&labels)
 Represents a TAxisLabels with labels and title. 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 TAxisConfig. More...
 
Axis normalization
 TAxisConfig (const TAxisEquidistant &ax)
 Build a TAxisConfig from a TAxisEquidistant. More...
 
 TAxisConfig (const TAxisGrow &ax)
 Build a TAxisConfig from a TAxisGrow. More...
 
 TAxisConfig (const TAxisIrregular &ax)
 Build a TAxisConfig from a TAxisIrregular. More...
 
 TAxisConfig (const TAxisLabels &ax)
 Build a TAxisConfig from a TAxisLabels. More...
 
- Public Member Functions inherited from ROOT::Experimental::TAxisBase
 TAxisBase (int nbinsNoOver, bool canGrow) noexcept
 Construct a TAxisBase. More...
 
 TAxisBase (std::string_view title, int nbinsNoOver, bool canGrow) noexcept
 Construct a TAxisBase. 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: TAxisConfig ac(TAxisConfig::Grow, 10, 0., 1.);. More...
 
- Static Public Attributes inherited from ROOT::Experimental::TAxisBase
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

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

Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Experimental::TAxisBase
 TAxisBase ()
 Default construct a TAxisBase (for use by derived classes for I/O) More...
 
int AdjustOverflowBinNumber (int 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...
 
 TAxisBase (const TAxisBase &)=default
 
 TAxisBase (TAxisBase &&)=default
 
TAxisBaseoperator= (const TAxisBase &)=default
 
TAxisBaseoperator= (TAxisBase &&)=default
 

#include <ROOT/TAxis.hxx>

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

Member Enumeration Documentation

◆ EKind

Enumerator
kEquidistant 

represents a TAxisEquidistant

kGrow 

represents a TAxisGrow

kIrregular 

represents a TAxisIrregular

kLabels 

represents a TAxisLabels

kNumKinds 

Definition at line 708 of file TAxis.hxx.

Constructor & Destructor Documentation

◆ TAxisConfig() [1/17]

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

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

Definition at line 723 of file TAxis.hxx.

◆ TAxisConfig() [2/17]

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

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

Definition at line 746 of file TAxis.hxx.

◆ TAxisConfig() [3/17]

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

Represents a TAxisEquidistant with nbins from from to to.

Definition at line 750 of file TAxis.hxx.

◆ TAxisConfig() [4/17]

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

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

Definition at line 754 of file TAxis.hxx.

◆ TAxisConfig() [5/17]

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

Represents a TAxisGrow with nbins from from to to.

Definition at line 758 of file TAxis.hxx.

◆ TAxisConfig() [6/17]

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

Represents a TAxisIrregular with binborders.

Definition at line 763 of file TAxis.hxx.

◆ TAxisConfig() [7/17]

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

Represents a TAxisIrregular with binborders and title.

Definition at line 768 of file TAxis.hxx.

◆ TAxisConfig() [8/17]

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

Represents a TAxisIrregular with binborders.

Definition at line 773 of file TAxis.hxx.

◆ TAxisConfig() [9/17]

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

Represents a TAxisIrregular with binborders.

Definition at line 778 of file TAxis.hxx.

◆ TAxisConfig() [10/17]

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

Represents a TAxisLabels with labels.

Definition at line 783 of file TAxis.hxx.

◆ TAxisConfig() [11/17]

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

Represents a TAxisLabels with labels and title.

Definition at line 789 of file TAxis.hxx.

◆ TAxisConfig() [12/17]

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

Represents a TAxisLabels with labels.

Definition at line 795 of file TAxis.hxx.

◆ TAxisConfig() [13/17]

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

Represents a TAxisLabels with labels and title.

Definition at line 801 of file TAxis.hxx.

◆ TAxisConfig() [14/17]

ROOT::Experimental::TAxisConfig::TAxisConfig ( const TAxisEquidistant ax)
inlineexplicit

Build a TAxisConfig from a TAxisEquidistant.

Definition at line 810 of file TAxis.hxx.

◆ TAxisConfig() [15/17]

ROOT::Experimental::TAxisConfig::TAxisConfig ( const TAxisGrow ax)
inlineexplicit

Build a TAxisConfig from a TAxisGrow.

Definition at line 815 of file TAxis.hxx.

◆ TAxisConfig() [16/17]

ROOT::Experimental::TAxisConfig::TAxisConfig ( const TAxisIrregular ax)
inlineexplicit

Build a TAxisConfig from a TAxisIrregular.

Definition at line 820 of file TAxis.hxx.

◆ TAxisConfig() [17/17]

ROOT::Experimental::TAxisConfig::TAxisConfig ( const TAxisLabels ax)
inlineexplicit

Build a TAxisConfig from a TAxisLabels.

Definition at line 824 of file TAxis.hxx.

Member Function Documentation

◆ GetBinBorders()

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

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

Definition at line 836 of file TAxis.hxx.

◆ GetBinLabels()

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

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

Definition at line 839 of file TAxis.hxx.

◆ GetKind()

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

Get the axis kind represented by this TAxisConfig.

Definition at line 833 of file TAxis.hxx.

Member Data Documentation

◆ fBinBorders

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

Bin borders of the TAxisIrregular.

Definition at line 718 of file TAxis.hxx.

◆ fKind

EKind ROOT::Experimental::TAxisConfig::fKind
private

The kind of axis represented by this configuration.

Definition at line 717 of file TAxis.hxx.

◆ fLabels

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

Bin labels for a TAxisLabels.

Definition at line 719 of file TAxis.hxx.

◆ Grow

constexpr const Grow_t ROOT::Experimental::TAxisConfig::Grow {}
static

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

Definition at line 742 of file TAxis.hxx.


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