5 #ifndef __QWHISTOGRAMHELPER__
6 #define __QWHISTOGRAMHELPER__
15 #include <TProfile2D.h>
38 std::string tmpfile = inputfile.Data();
42 std::string tmpfile = inputfile.Data();
51 TH1F*
Construct1DHist(
const std::string& inputfile,
const TString& name_title);
52 TH2F*
Construct2DHist(
const std::string& inputfile,
const TString& name_title);
53 TProfile*
Construct1DProf(
const std::string& inputfile,
const TString& name_title);
54 TProfile2D*
Construct2DProf(
const std::string& inputfile,
const TString& name_title);
58 const std::string& moduletype,
59 const std::string& devicename);
91 TString thisname(this->
name_title); thisname.ToLower();
92 TString thatname(that.
name_title); thatname.ToLower();
93 if (thisname.MaybeRegexp() && thatname.MaybeRegexp()) {
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())
110 return thatname.MaybeRegexp();
113 return (thisname < thatname);
136 const TString& histname);
139 Bool_t
DoesMatch(
const TString& s,
const TRegexp& wildcard);
static const Double_t fInvalidNumber
Histogram parameter class.
static void DefineOptions(QwOptions &options)
Define the configuration options.
const HistParams GetHistParamsFromList(const TString &histname)
const HistParams GetHistParamsFromLine(QwParameterFile &mapstr)
TH2F * Construct2DHist(const TString &inputfile, const TString &name_title)
void LoadTreeParamsFromFile(const std::string &filename)
void PrintHistParams() const
std::vector< std::pair< TString, TRegexp > > fTreeParams
friend std::ostream & operator<<(std::ostream &stream, const HistParams &h)
Output stream operator overload.
TProfile2D * Construct2DProf(const TString &name_title)
void ProcessOptions(QwOptions &options)
Process the configuration options.
std::vector< TString > fSubsystemList
Bool_t MatchDeviceParamsFromList(const std::string &devicename)
Bool_t MatchVQWKElementFromList(const std::string &subsystemname, const std::string &moduletype, const std::string &devicename)
static const TString fInvalidName
Bool_t fTreeTrimFileLoaded
std::vector< std::vector< std::vector< TString > > > fVQWKTrimmedList
std::vector< HistParams > fHistParams
QwHistogramHelper gQwHists
Globally defined instance of the QwHistogramHelper class.
bool operator<(const HistParams &that) const
Relational less-than operator overload.
std::vector< std::vector< TString > > fModuleList
const HistParams GetHistParamsFromFile(const std::string &filename, const TString &histname)
Bool_t DoesMatch(const TString &s, const TRegexp &wildcard)
An options class which parses command line, config file and environment.
virtual ~QwHistogramHelper()
TH1F * Construct1DHist(const TString &inputfile, const TString &name_title)
void LoadHistParamsFromFile(const std::string &filename)
TProfile * Construct1DProf(const TString &name_title)