QwAnalysis
QwHistogramHelper::HistParams Class Reference

Histogram parameter class. More...

#include <QwHistogramHelper.h>

Public Member Functions

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

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. More...
 

Detailed Description

Histogram parameter class.

Definition at line 64 of file QwHistogramHelper.h.

Constructor & Destructor Documentation

QwHistogramHelper::HistParams::HistParams ( )
inline

Constructor.

Definition at line 85 of file QwHistogramHelper.h.

Member Function Documentation

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

Relational less-than operator overload.

Definition at line 89 of file QwHistogramHelper.h.

References name_title.

89  {
90  // Compare only lowercase strings
91  TString thisname(this->name_title); thisname.ToLower();
92  TString thatname(that.name_title); thatname.ToLower();
93  if (thisname.MaybeRegexp() && thatname.MaybeRegexp()) {
94  // Both wildcarded: latest occurrence of 'wildest card'
95  if (thisname.Contains("*") != thatname.Contains("*"))
96  return thatname.Contains("*");
97  else if (thisname.First("*") != thatname.First("*"))
98  return (thisname.First("*") > thatname.First("*"));
99  else if (thisname.Contains("+") != thatname.Contains("+"))
100  return thatname.Contains("+");
101  else if (thisname.First("+") != thatname.First("+"))
102  return (thisname.First("+") > thatname.First("+"));
103  else if (thisname.CountChar('?') != thatname.CountChar('?'))
104  return (thisname.CountChar('?') < thatname.CountChar('?'));
105  else if (thisname.CountChar('.') != thatname.CountChar('.'))
106  return (thisname.CountChar('.') < thatname.CountChar('.'));
107  else return (thisname < thatname);
108  } else if (thisname.MaybeRegexp() || thatname.MaybeRegexp())
109  // One wildcarded: explicit case has precedence
110  return thatname.MaybeRegexp();
111  else
112  // No wildcards: alphabetic ordering on the lower case names
113  return (thisname < thatname);
114  };

Friends And Related Function Documentation

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

Output stream operator overload.

Definition at line 117 of file QwHistogramHelper.h.

117  {
118  stream << h.type << " " << h.name_title
119  << " x (" << h.xtitle << "): " << h.x_min << " -- " << h.x_max << " (" << h.x_nbins << " bins), "
120  << " y (" << h.ytitle << "): " << h.y_min << " -- " << h.y_max << " (" << h.y_nbins << " bins)";
121  return stream;
122  }

Field Documentation

TRegexp QwHistogramHelper::HistParams::expression

Definition at line 66 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::GetHistParamsFromLine().

Float_t QwHistogramHelper::HistParams::max
Float_t QwHistogramHelper::HistParams::min
Int_t QwHistogramHelper::HistParams::nbins

Definition at line 69 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::GetHistParamsFromList().

TString QwHistogramHelper::HistParams::type

Definition at line 68 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::GetHistParamsFromLine().

Float_t QwHistogramHelper::HistParams::z_max

Definition at line 78 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::Construct2DProf().

Float_t QwHistogramHelper::HistParams::z_min

Definition at line 77 of file QwHistogramHelper.h.

Referenced by QwHistogramHelper::Construct2DProf().

Int_t QwHistogramHelper::HistParams::z_nbins

Definition at line 76 of file QwHistogramHelper.h.


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