|
JAPAn
Just Another Parity Analyzer
|
Utility class for histogram creation and management. More...
#include <QwHistogramHelper.h>
Collaboration diagram for QwHistogramHelper:Data Structures | |
| class | HistParams |
| Histogram parameter class. More... | |
Public Member Functions | |
| QwHistogramHelper () | |
| virtual | ~QwHistogramHelper () |
| void | ProcessOptions (QwOptions &options) |
| Process the configuration options. | |
| void | LoadHistParamsFromFile (const std::string &filename) |
| void | LoadTreeParamsFromFile (const std::string &filename) |
| void | PrintHistParams () const |
| TH1F * | Construct1DHist (const TString &inputfile, const TString &name_title) |
| TH2F * | Construct2DHist (const TString &inputfile, const TString &name_title) |
| TH1F * | Construct1DHist (const TString &name_title) |
| TH2F * | Construct2DHist (const TString &name_title) |
| TProfile * | Construct1DProf (const TString &name_title) |
| TProfile2D * | Construct2DProf (const TString &name_title) |
| TH1F * | Construct1DHist (const std::string &inputfile, const TString &name_title) |
| TH2F * | Construct2DHist (const std::string &inputfile, const TString &name_title) |
| TProfile * | Construct1DProf (const std::string &inputfile, const TString &name_title) |
| TProfile2D * | Construct2DProf (const std::string &inputfile, const TString &name_title) |
| Bool_t | MatchDeviceParamsFromList (const std::string &devicename) |
| Bool_t | MatchVQWKElementFromList (const std::string &subsystemname, const std::string &moduletype, const std::string &devicename) |
Static Public Member Functions | |
| static void | DefineOptions (QwOptions &options) |
| Define the configuration options. | |
Protected Member Functions | |
| TH1F * | Construct1DHist (const HistParams ¶ms) |
| TH2F * | Construct2DHist (const HistParams ¶ms) |
| TProfile * | Construct1DProf (const HistParams ¶ms) |
| TProfile2D * | Construct2DProf (const HistParams ¶ms) |
| const HistParams | GetHistParamsFromLine (QwParameterFile &mapstr) |
| const HistParams | GetHistParamsFromFile (const std::string &filename, const TString &histname) |
| const HistParams | GetHistParamsFromList (const TString &histname) |
| Bool_t | DoesMatch (const TString &s, const TRegexp &wildcard) |
Protected Attributes | |
| Bool_t | fDEBUG |
| Bool_t | fTrimDisable |
| Bool_t | fTrimHistoEnable |
| Bool_t | fTreeTrimFileLoaded |
| std::string | fInputFile |
| std::vector< HistParams > | fHistParams |
| std::vector< std::pair< TString, TRegexp > > | fTreeParams |
| std::vector< TString > | fSubsystemList |
| std::vector< std::vector< TString > > | fModuleList |
| std::vector< std::vector< std::vector< TString > > > | fVQWKTrimmedList |
Static Protected Attributes | |
| static const Double_t | fInvalidNumber = -1.0e7 |
| static const TString | fInvalidName = "EmptyEmpty" |
Utility class for histogram creation and management.
This class exists to encapsulate several helper functions to aid in describing histograms. There will be a global copy defined within the analysis framework.
Provides helper functions for creating, configuring, and managing ROOT histograms with consistent naming and binning conventions throughout the analysis framework.
Definition at line 32 of file QwHistogramHelper.h.
|
inline |
Definition at line 34 of file QwHistogramHelper.h.
References fDEBUG, and fHistParams.
|
inlinevirtual |
Definition at line 35 of file QwHistogramHelper.h.
|
protected |
Definition at line 499 of file QwHistogramHelper.cc.
References fInvalidName, fTrimHistoEnable, QwHistogramHelper::HistParams::name_title, QwHistogramHelper::HistParams::x_max, QwHistogramHelper::HistParams::x_min, QwHistogramHelper::HistParams::x_nbins, QwHistogramHelper::HistParams::xtitle, and QwHistogramHelper::HistParams::ytitle.
| TH1F * QwHistogramHelper::Construct1DHist | ( | const std::string & | inputfile, |
| const TString & | name_title ) |
Definition at line 475 of file QwHistogramHelper.cc.
References Construct1DHist(), and GetHistParamsFromFile().
Here is the call graph for this function:
|
inline |
Definition at line 48 of file QwHistogramHelper.h.
References Construct1DHist().
Referenced by Construct1DHist(), Construct1DHist(), and Construct1DHist().
Here is the call graph for this function:
Here is the caller graph for this function:| TH1F * QwHistogramHelper::Construct1DHist | ( | const TString & | name_title | ) |
Definition at line 443 of file QwHistogramHelper.cc.
References Construct1DHist(), and GetHistParamsFromList().
Here is the call graph for this function:
|
protected |
Definition at line 541 of file QwHistogramHelper.cc.
References fInvalidName, fTrimHistoEnable, QwHistogramHelper::HistParams::name_title, QwHistogramHelper::HistParams::x_max, QwHistogramHelper::HistParams::x_min, QwHistogramHelper::HistParams::x_nbins, QwHistogramHelper::HistParams::xtitle, QwHistogramHelper::HistParams::y_max, QwHistogramHelper::HistParams::y_min, and QwHistogramHelper::HistParams::ytitle.
| TProfile * QwHistogramHelper::Construct1DProf | ( | const std::string & | inputfile, |
| const TString & | name_title ) |
Definition at line 491 of file QwHistogramHelper.cc.
References Construct1DProf(), and GetHistParamsFromFile().
Here is the call graph for this function:| TProfile * QwHistogramHelper::Construct1DProf | ( | const TString & | name_title | ) |
Definition at line 459 of file QwHistogramHelper.cc.
References Construct1DProf(), and GetHistParamsFromList().
Referenced by Construct1DProf(), and Construct1DProf().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 519 of file QwHistogramHelper.cc.
References fInvalidName, fTrimHistoEnable, QwHistogramHelper::HistParams::name_title, QwHistogramHelper::HistParams::x_max, QwHistogramHelper::HistParams::x_min, QwHistogramHelper::HistParams::x_nbins, QwHistogramHelper::HistParams::xtitle, QwHistogramHelper::HistParams::y_max, QwHistogramHelper::HistParams::y_min, QwHistogramHelper::HistParams::y_nbins, and QwHistogramHelper::HistParams::ytitle.
| TH2F * QwHistogramHelper::Construct2DHist | ( | const std::string & | inputfile, |
| const TString & | name_title ) |
Definition at line 467 of file QwHistogramHelper.cc.
References Construct2DHist(), and GetHistParamsFromFile().
Here is the call graph for this function:
|
inline |
Definition at line 52 of file QwHistogramHelper.h.
References Construct2DHist().
Referenced by Construct2DHist(), Construct2DHist(), and Construct2DHist().
Here is the call graph for this function:
Here is the caller graph for this function:| TH2F * QwHistogramHelper::Construct2DHist | ( | const TString & | name_title | ) |
Definition at line 435 of file QwHistogramHelper.cc.
References Construct2DHist(), and GetHistParamsFromList().
Here is the call graph for this function:
|
protected |
Definition at line 562 of file QwHistogramHelper.cc.
References fInvalidName, fTrimHistoEnable, QwHistogramHelper::HistParams::name_title, QwHistogramHelper::HistParams::x_max, QwHistogramHelper::HistParams::x_min, QwHistogramHelper::HistParams::x_nbins, QwHistogramHelper::HistParams::xtitle, QwHistogramHelper::HistParams::y_max, QwHistogramHelper::HistParams::y_min, QwHistogramHelper::HistParams::y_nbins, QwHistogramHelper::HistParams::ytitle, QwHistogramHelper::HistParams::z_max, and QwHistogramHelper::HistParams::z_min.
| TProfile2D * QwHistogramHelper::Construct2DProf | ( | const std::string & | inputfile, |
| const TString & | name_title ) |
Definition at line 483 of file QwHistogramHelper.cc.
References Construct2DProf(), and GetHistParamsFromFile().
Here is the call graph for this function:| TProfile2D * QwHistogramHelper::Construct2DProf | ( | const TString & | name_title | ) |
Definition at line 451 of file QwHistogramHelper.cc.
References Construct2DProf(), and GetHistParamsFromList().
Referenced by Construct2DProf(), and Construct2DProf().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Define the configuration options.
Definition at line 24 of file QwHistogramHelper.cc.
References QwOptions::AddOptions().
Referenced by QwOptions::DefineOptions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 418 of file QwHistogramHelper.cc.
Referenced by GetHistParamsFromFile(), GetHistParamsFromList(), MatchDeviceParamsFromList(), and MatchVQWKElementFromList().
Here is the caller graph for this function:
|
protected |
Definition at line 371 of file QwHistogramHelper.cc.
References DoesMatch(), QwLog::endl(), fDEBUG, fInvalidName, fTrimHistoEnable, GetHistParamsFromLine(), QwParameterFile::GetTypedNextToken(), QwParameterFile::LineIsEmpty(), QwHistogramHelper::HistParams::name_title, QwError, QwMessage, QwParameterFile::ReadNextLine(), QwParameterFile::RewindToLineStart(), QwParameterFile::TrimComment(), and QwParameterFile::TrimWhitespace().
Referenced by Construct1DHist(), Construct1DProf(), Construct2DHist(), and Construct2DProf().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Decodes the histogram parameters from the current line of a QwParameter file. If the line cannot be decoded, the name is returned as fInvalidName.
Definition at line 77 of file QwHistogramHelper.cc.
References QwLog::endl(), QwHistogramHelper::HistParams::expression, fInvalidName, fInvalidNumber, QwParameterFile::GetTypedNextToken(), QwHistogramHelper::HistParams::max, QwHistogramHelper::HistParams::min, QwHistogramHelper::HistParams::name_title, QwError, QwHistogramHelper::HistParams::type, QwHistogramHelper::HistParams::x_max, QwHistogramHelper::HistParams::x_min, QwHistogramHelper::HistParams::x_nbins, QwHistogramHelper::HistParams::xtitle, QwHistogramHelper::HistParams::y_max, QwHistogramHelper::HistParams::y_min, QwHistogramHelper::HistParams::y_nbins, and QwHistogramHelper::HistParams::ytitle.
Referenced by GetHistParamsFromFile(), and LoadHistParamsFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 249 of file QwHistogramHelper.cc.
References DoesMatch(), QwLog::endl(), fDEBUG, fHistParams, fInputFile, fInvalidName, fTrimHistoEnable, QwHistogramHelper::HistParams::max, QwHistogramHelper::HistParams::min, QwHistogramHelper::HistParams::name_title, QwHistogramHelper::HistParams::nbins, QwMessage, QwWarning, QwHistogramHelper::HistParams::x_max, QwHistogramHelper::HistParams::x_min, QwHistogramHelper::HistParams::x_nbins, QwHistogramHelper::HistParams::y_max, QwHistogramHelper::HistParams::y_min, and QwHistogramHelper::HistParams::y_nbins.
Referenced by Construct1DHist(), Construct1DProf(), Construct2DHist(), and Construct2DProf().
Here is the call graph for this function:
Here is the caller graph for this function:| void QwHistogramHelper::LoadHistParamsFromFile | ( | const std::string & | filename | ) |
Definition at line 135 of file QwHistogramHelper.cc.
References QwLog::endl(), fDEBUG, fHistParams, fInputFile, fInvalidName, fTrimHistoEnable, GetHistParamsFromLine(), QwParameterFile::LineIsEmpty(), QwHistogramHelper::HistParams::name_title, QwMessage, QwParameterFile::ReadNextLine(), QwParameterFile::TrimComment(), and QwParameterFile::TrimWhitespace().
Referenced by ProcessOptions().
Here is the call graph for this function:
Here is the caller graph for this function:| void QwHistogramHelper::LoadTreeParamsFromFile | ( | const std::string & | filename | ) |
Definition at line 177 of file QwHistogramHelper.cc.
References QwLog::endl(), fDEBUG, fModuleList, fSubsystemList, fTreeParams, fTreeTrimFileLoaded, fTrimDisable, fVQWKTrimmedList, QwParameterFile::IsEOF(), QwMessage, and QwParameterFile::ReadNextSection().
Referenced by ProcessOptions().
Here is the call graph for this function:
Here is the caller graph for this function:| Bool_t QwHistogramHelper::MatchDeviceParamsFromList | ( | const std::string & | devicename | ) |
Definition at line 301 of file QwHistogramHelper.cc.
References DoesMatch(), QwLog::endl(), fDEBUG, fTreeParams, fTreeTrimFileLoaded, fTrimDisable, QwMessage, and QwWarning.
Here is the call graph for this function:| Bool_t QwHistogramHelper::MatchVQWKElementFromList | ( | const std::string & | subsystemname, |
| const std::string & | moduletype, | ||
| const std::string & | devicename ) |
Definition at line 327 of file QwHistogramHelper.cc.
References DoesMatch(), QwLog::endl(), fDEBUG, fModuleList, fSubsystemList, fTreeTrimFileLoaded, fTrimDisable, fVQWKTrimmedList, QwMessage, and QwWarning.
Here is the call graph for this function:| void QwHistogramHelper::PrintHistParams | ( | ) | const |
Definition at line 168 of file QwHistogramHelper.cc.
References QwLog::endl(), fHistParams, and QwMessage.
Here is the call graph for this function:| void QwHistogramHelper::ProcessOptions | ( | QwOptions & | options | ) |
Process the configuration options.
Definition at line 51 of file QwHistogramHelper.cc.
References QwLog::endl(), fTrimDisable, fTrimHistoEnable, QwOptions::GetValue(), QwOptions::HasValue(), LoadHistParamsFromFile(), LoadTreeParamsFromFile(), and QwMessage.
Here is the call graph for this function:
|
protected |
Definition at line 155 of file QwHistogramHelper.h.
Referenced by GetHistParamsFromFile(), GetHistParamsFromList(), LoadHistParamsFromFile(), LoadTreeParamsFromFile(), MatchDeviceParamsFromList(), MatchVQWKElementFromList(), and QwHistogramHelper().
|
protected |
Definition at line 161 of file QwHistogramHelper.h.
Referenced by GetHistParamsFromList(), LoadHistParamsFromFile(), PrintHistParams(), and QwHistogramHelper().
|
protected |
Definition at line 160 of file QwHistogramHelper.h.
Referenced by GetHistParamsFromList(), and LoadHistParamsFromFile().
|
staticprotected |
Definition at line 154 of file QwHistogramHelper.h.
Referenced by Construct1DHist(), Construct1DProf(), Construct2DHist(), Construct2DProf(), GetHistParamsFromFile(), GetHistParamsFromLine(), GetHistParamsFromList(), and LoadHistParamsFromFile().
|
staticprotected |
Definition at line 153 of file QwHistogramHelper.h.
Referenced by GetHistParamsFromLine().
|
protected |
Definition at line 165 of file QwHistogramHelper.h.
Referenced by LoadTreeParamsFromFile(), and MatchVQWKElementFromList().
|
protected |
Definition at line 164 of file QwHistogramHelper.h.
Referenced by LoadTreeParamsFromFile(), and MatchVQWKElementFromList().
|
protected |
Definition at line 162 of file QwHistogramHelper.h.
Referenced by LoadTreeParamsFromFile(), and MatchDeviceParamsFromList().
|
protected |
Definition at line 158 of file QwHistogramHelper.h.
Referenced by LoadTreeParamsFromFile(), MatchDeviceParamsFromList(), and MatchVQWKElementFromList().
|
protected |
Definition at line 156 of file QwHistogramHelper.h.
Referenced by LoadTreeParamsFromFile(), MatchDeviceParamsFromList(), MatchVQWKElementFromList(), and ProcessOptions().
|
protected |
Definition at line 157 of file QwHistogramHelper.h.
Referenced by Construct1DHist(), Construct1DProf(), Construct2DHist(), Construct2DProf(), GetHistParamsFromFile(), GetHistParamsFromList(), LoadHistParamsFromFile(), and ProcessOptions().
|
protected |
Definition at line 166 of file QwHistogramHelper.h.
Referenced by LoadTreeParamsFromFile(), and MatchVQWKElementFromList().