JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwHistogramHelper::HistParams Class Reference

Histogram parameter class. More...

#include <QwHistogramHelper.h>

Public Member Functions

 HistParams ()
 Constructor.
 
bool operator< (const HistParams &that) const
 Relational less-than operator overload.
 

Data Fields

TRegexp expression
 
TString name_title
 
TString type
 
Int_t nbins
 
Int_t x_nbins
 
Float_t x_min
 
Float_t x_max
 
Int_t y_nbins
 
Float_t y_min
 
Float_t y_max
 
Int_t z_nbins
 
Float_t z_min
 
Float_t z_max
 
TString xtitle
 
TString ytitle
 
Float_t min
 
Float_t max
 

Friends

std::ostream & operator<< (std::ostream &stream, const HistParams &h)
 Output stream operator overload.
 

Detailed Description

Histogram parameter class.

Definition at line 75 of file QwHistogramHelper.h.

Constructor & Destructor Documentation

◆ HistParams()

QwHistogramHelper::HistParams::HistParams ( )
inline

Constructor.

Definition at line 96 of file QwHistogramHelper.h.

References expression.

Referenced by operator<(), and operator<<.

+ Here is the caller graph for this function:

Member Function Documentation

◆ operator<()

bool QwHistogramHelper::HistParams::operator< ( const HistParams & that) const
inline

Relational less-than operator overload.

Definition at line 100 of file QwHistogramHelper.h.

100 {
101 // Compare only lowercase strings
102 TString thisname(this->name_title); thisname.ToLower();
103 TString thatname(that.name_title); thatname.ToLower();
104 if (thisname.MaybeRegexp() && thatname.MaybeRegexp()) {
105 // Both wildcarded: latest occurrence of 'wildest card'
106 if (thisname.Contains("*") != thatname.Contains("*"))
107 return thatname.Contains("*");
108 else if (thisname.First("*") != thatname.First("*"))
109 return (thisname.First("*") > thatname.First("*"));
110 else if (thisname.Contains("+") != thatname.Contains("+"))
111 return thatname.Contains("+");
112 else if (thisname.First("+") != thatname.First("+"))
113 return (thisname.First("+") > thatname.First("+"));
114 else if (thisname.CountChar('?') != thatname.CountChar('?'))
115 return (thisname.CountChar('?') < thatname.CountChar('?'));
116 else if (thisname.CountChar('.') != thatname.CountChar('.'))
117 return (thisname.CountChar('.') < thatname.CountChar('.'));
118 else return (thisname < thatname);
119 } else if (thisname.MaybeRegexp() || thatname.MaybeRegexp())
120 // One wildcarded: explicit case has precedence
121 return thatname.MaybeRegexp();
122 else
123 // No wildcards: alphabetic ordering on the lower case names
124 return (thisname < thatname);
125 };

References HistParams(), and name_title.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const HistParams & h )
friend

Output stream operator overload.

Definition at line 128 of file QwHistogramHelper.h.

128 {
129 stream << h.type << " " << h.name_title
130 << " x (" << h.xtitle << "): " << h.x_min << " -- " << h.x_max << " (" << h.x_nbins << " bins), "
131 << " y (" << h.ytitle << "): " << h.y_min << " -- " << h.y_max << " (" << h.y_nbins << " bins)";
132 return stream;
133 }

References HistParams(), name_title, type, x_max, x_min, x_nbins, xtitle, y_max, y_min, y_nbins, and ytitle.

Field Documentation

◆ expression

TRegexp QwHistogramHelper::HistParams::expression

Definition at line 77 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::GetHistParamsFromLine(), and HistParams().

◆ max

Float_t QwHistogramHelper::HistParams::max

◆ min

Float_t QwHistogramHelper::HistParams::min

◆ name_title

◆ nbins

Int_t QwHistogramHelper::HistParams::nbins

Definition at line 80 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::GetHistParamsFromList().

◆ type

TString QwHistogramHelper::HistParams::type

Definition at line 79 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::GetHistParamsFromLine(), and operator<<.

◆ x_max

◆ x_min

◆ x_nbins

◆ xtitle

◆ y_max

◆ y_min

◆ y_nbins

◆ ytitle

◆ z_max

Float_t QwHistogramHelper::HistParams::z_max

Definition at line 89 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::Construct2DProf().

◆ z_min

Float_t QwHistogramHelper::HistParams::z_min

Definition at line 88 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::Construct2DProf().

◆ z_nbins

Int_t QwHistogramHelper::HistParams::z_nbins

Definition at line 87 of file QwHistogramHelper.h.


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