|
BmnRoot
|
Histogram manager. More...
#include <BmnHistManager.h>
Public Member Functions | |
| BmnHistManager () | |
| Constructor. | |
| virtual | ~BmnHistManager () |
| Destructor. | |
| void | Add (const TString &name, TNamed *object) |
| Add new named object to manager. | |
| template<class T > | |
| void | Create1 (const TString &name, const TString &title, Int_t nofBins, Double_t minBin, Double_t maxBin) |
| Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", 100, 0, 100);. | |
| template<class T > | |
| void | Create2 (const TString &name, const TString &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY) |
| Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", 100, 0, 100, 200, 0, 200);. | |
| TH1 * | H1 (const TString &name) const |
| Return pointer to TH1 histogram. | |
| TH2 * | H2 (const TString &name) const |
| Return pointer to TH2 histogram. | |
| Bool_t | Exists (const TString &name) const |
| Check existence of histogram in manager. | |
| void | WriteToFile () |
| Write all histograms to current opened file. | |
| void | ResetHists () |
| Reset all histograms. | |
| void | ReadFromFile (TFile *file) |
| Read histograms from file. | |
| void | Clear () |
| Clear memory. Remove all histograms. | |
| void | ShrinkEmptyBinsH1 (const TString &histName) |
| Shrink empty bins in H1. | |
| void | ShrinkEmptyBinsH2 (const TString &histName) |
| Shrink empty bins in H2. | |
| void | Scale (const TString &histName, Double_t scale) |
| Scale histogram. | |
| void | NormalizeToIntegral (const TString &histName) |
| Normalize histogram to integral. | |
| void | Rebin (const TString &histName, Int_t ngroup) |
| Rebin histogram. | |
| TString | ToString () const |
| Return string representation of class. | |
| BmnHistManager () | |
| Constructor. | |
| virtual | ~BmnHistManager () |
| Destructor. | |
| void | Add (const TString &name, TNamed *object) |
| Add new named object to manager. | |
| template<class T > | |
| void | Create1 (const TString &name, const TString &title, Int_t nofBins, Double_t minBin, Double_t maxBin) |
| Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", 100, 0, 100);. | |
| template<class T > | |
| void | Create2 (const TString &name, const TString &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY) |
| Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", 100, 0, 100, 200, 0, 200);. | |
| TH1 * | H1 (const TString &name) const |
| Return pointer to TH1 histogram. | |
| TH2 * | H2 (const TString &name) const |
| Return pointer to TH2 histogram. | |
| Bool_t | Exists (const TString &name) const |
| Check existence of histogram in manager. | |
| void | WriteToFile () |
| Write all histograms to current opened file. | |
| void | ResetHists () |
| Reset all histograms. | |
| void | ReadFromFile (TFile *file) |
| Read histograms from file. | |
| void | Clear () |
| Clear memory. Remove all histograms. | |
| void | ShrinkEmptyBinsH1 (const TString &histName) |
| Shrink empty bins in H1. | |
| void | ShrinkEmptyBinsH2 (const TString &histName) |
| Shrink empty bins in H2. | |
| void | Scale (const TString &histName, Double_t scale) |
| Scale histogram. | |
| void | NormalizeToIntegral (const TString &histName) |
| Normalize histogram to integral. | |
| void | Rebin (const TString &histName, Int_t ngroup) |
| Rebin histogram. | |
| TString | ToString () const |
| Return string representation of class. | |
Friends | |
| std::ostream & | operator<< (std::ostream &strm, const BmnHistManager &histManager) |
| Operator << for convenient output to std::ostream. | |
| std::ostream & | operator<< (std::ostream &strm, const BmnHistManager &histManager) |
| Operator << for convenient output to std::ostream. | |
| BmnHistManager::BmnHistManager | ( | ) |
Constructor.
Definition at line 31 of file BmnHistManager.cxx.
|
virtual |
Destructor.
Definition at line 33 of file BmnHistManager.cxx.
| BmnHistManager::BmnHistManager | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inline |
Add new named object to manager.
| [in] | name | Name of the object. |
| [in] | object | Pointer to object. |
Definition at line 59 of file BmnHistManager.h.
Referenced by Create1(), Create2(), BmnQaBase::CreateH1(), BmnQaBase::CreateH2(), and ReadFromFile().
|
inline |
Add new named object to manager.
| [in] | name | Name of the object. |
| [in] | object | Pointer to object. |
Definition at line 59 of file BmnHistManager.h.
| void BmnHistManager::Clear | ( | ) |
Clear memory. Remove all histograms.
Definition at line 68 of file BmnHistManager.cxx.
| void BmnHistManager::Clear | ( | ) |
Clear memory. Remove all histograms.
|
inline |
Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", 100, 0, 100);.
| [in] | name | Object name. |
| [in] | title | Object title. |
| [in] | nofBins | Number of bins. |
| [in] | minBin | Low axis limit. |
| [in] | maxBin | Upper axis limit. |
Definition at line 74 of file BmnHistManager.h.
References Add().
Referenced by BmnTof400Qa::Init().
|
inline |
Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", 100, 0, 100);.
| [in] | name | Object name. |
| [in] | title | Object title. |
| [in] | nofBins | Number of bins. |
| [in] | minBin | Low axis limit. |
| [in] | maxBin | Upper axis limit. |
Definition at line 74 of file BmnHistManager.h.
References Add().
|
inline |
Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", 100, 0, 100, 200, 0, 200);.
| [in] | name | Object name. |
| [in] | title | Object title. |
| [in] | nofBinsX | Number of bins for X axis. |
| [in] | minBinX | Low X axis limit. |
| [in] | maxBinX | Upper X axis limit. |
| [in] | nofBinsY | Number of bins for Y axis. |
| [in] | minBinY | Low Y axis limit. |
| [in] | maxBinY | Upper Y axis limit. |
Definition at line 97 of file BmnHistManager.h.
References Add().
Referenced by BmnTof400Qa::Init().
|
inline |
Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", 100, 0, 100, 200, 0, 200);.
| [in] | name | Object name. |
| [in] | title | Object title. |
| [in] | nofBinsX | Number of bins for X axis. |
| [in] | minBinX | Low X axis limit. |
| [in] | maxBinX | Upper X axis limit. |
| [in] | nofBinsY | Number of bins for Y axis. |
| [in] | minBinY | Low Y axis limit. |
| [in] | maxBinY | Upper Y axis limit. |
Definition at line 97 of file BmnHistManager.h.
References Add().
|
inline |
Check existence of histogram in manager.
| [in] | name | Name of histogram. |
Definition at line 141 of file BmnHistManager.h.
|
inline |
Check existence of histogram in manager.
| [in] | name | Name of histogram. |
Definition at line 141 of file BmnHistManager.h.
|
inline |
Return pointer to TH1 histogram.
| [in] | name | Name of histogram. |
Definition at line 115 of file BmnHistManager.h.
Referenced by BmnPidQaReport::Draw(), BmnTrackingQaReport::DrawEffGem(), BmnTrackingQaReport::DrawMomResGem(), BmnTrackingQaReport::DrawNhitsGem(), BmnTrackingQaReport::DrawResAndPull(), BmnTrackingQaReport::DrawTwoH1(), BmnSimulationReport::DrawTwoH1(), BmnTrackingQaReport::DrawVertResGem(), BmnClusteringQa::Exec(), BmnLambdaQa::Exec(), BmnQaBase::Exec(), BmnTof400Qa::Exec(), BmnTof700Qa::Exec(), BmnTrackingQa::Exec(), BmnTrackingQaReport::FillAndFitSlice(), BmnTof400Qa::Finish(), NormalizeToIntegral(), BmnTrackingQaReport::PrintEventInfo(), Rebin(), Scale(), and ShrinkEmptyBinsH1().
|
inline |
Return pointer to TH1 histogram.
| [in] | name | Name of histogram. |
Definition at line 115 of file BmnHistManager.h.
|
inline |
Return pointer to TH2 histogram.
| [in] | name | Name of histogram. |
Definition at line 128 of file BmnHistManager.h.
Referenced by BmnTrackingQaReport::Draw(), BmnTrackingQaReport::DrawMomResGem(), BmnLambdaQa::Exec(), BmnTof400Qa::Exec(), BmnTof700Qa::Exec(), BmnTrackingQaReport::FillAndFitSlice(), BmnQaBase::FillStripHits(), BmnTrackingQaExp::FillTofHits(), BmnTrackingQaExp::ResetSiBT(), and ShrinkEmptyBinsH2().
|
inline |
Return pointer to TH2 histogram.
| [in] | name | Name of histogram. |
Definition at line 128 of file BmnHistManager.h.
| void BmnHistManager::NormalizeToIntegral | ( | const TString & | histName | ) |
Normalize histogram to integral.
| [in] | histName | Name of histogram. |
Definition at line 128 of file BmnHistManager.cxx.
References H1().
| void BmnHistManager::NormalizeToIntegral | ( | const TString & | histName | ) |
Normalize histogram to integral.
| [in] | histName | Name of histogram. |
| void BmnHistManager::ReadFromFile | ( | TFile * | file | ) |
Read histograms from file.
| [in] | file | Pointer to file with histograms. |
Definition at line 50 of file BmnHistManager.cxx.
References Add().
Referenced by BmnSimulationReport::Create().
| void BmnHistManager::ReadFromFile | ( | TFile * | file | ) |
Read histograms from file.
| [in] | file | Pointer to file with histograms. |
| void BmnHistManager::Rebin | ( | const TString & | histName, |
| Int_t | ngroup | ||
| ) |
Rebin histogram.
| [in] | histName | Name of histogram. |
| [in] | ngroup | Rebining factor. |
Definition at line 133 of file BmnHistManager.cxx.
References H1().
| void BmnHistManager::Rebin | ( | const TString & | histName, |
| Int_t | ngroup | ||
| ) |
Rebin histogram.
| [in] | histName | Name of histogram. |
| [in] | ngroup | Rebining factor. |
| void BmnHistManager::ResetHists | ( | ) |
Reset all histograms.
Definition at line 42 of file BmnHistManager.cxx.
Referenced by BmnProfQa::ResetProf().
| void BmnHistManager::ResetHists | ( | ) |
Reset all histograms.
| void BmnHistManager::Scale | ( | const TString & | histName, |
| Double_t | scale | ||
| ) |
Scale histogram.
| [in] | histName | Name of histogram. |
| [in] | scale | Scaling factor. |
Definition at line 124 of file BmnHistManager.cxx.
References H1().
| void BmnHistManager::Scale | ( | const TString & | histName, |
| Double_t | scale | ||
| ) |
Scale histogram.
| [in] | histName | Name of histogram. |
| [in] | scale | Scaling factor. |
| void BmnHistManager::ShrinkEmptyBinsH1 | ( | const TString & | histName | ) |
Shrink empty bins in H1.
| [in] | histName | Name of histogram. |
Definition at line 76 of file BmnHistManager.cxx.
References H1().
| void BmnHistManager::ShrinkEmptyBinsH1 | ( | const TString & | histName | ) |
Shrink empty bins in H1.
| [in] | histName | Name of histogram. |
| void BmnHistManager::ShrinkEmptyBinsH2 | ( | const TString & | histName | ) |
Shrink empty bins in H2.
| [in] | histName | Name of histogram. |
Definition at line 97 of file BmnHistManager.cxx.
References H2().
| void BmnHistManager::ShrinkEmptyBinsH2 | ( | const TString & | histName | ) |
Shrink empty bins in H2.
| [in] | histName | Name of histogram. |
| TString BmnHistManager::ToString | ( | ) | const |
Return string representation of class.
Definition at line 141 of file BmnHistManager.cxx.
Referenced by BmnQaHistoManager::GetListOfHistos().
| TString BmnHistManager::ToString | ( | ) | const |
Return string representation of class.
| void BmnHistManager::WriteToFile | ( | ) |
Write all histograms to current opened file.
Definition at line 35 of file BmnHistManager.cxx.
Referenced by BmnClusteringQa::Finish(), BmnCustomQa::Finish(), BmnLambdaQa::Finish(), BmnPidQa::Finish(), BmnQaBase::Finish(), BmnQaOffline::Finish(), BmnTof400Qa::Finish(), BmnTof700Qa::Finish(), and BmnTrackingQa::Finish().
| void BmnHistManager::WriteToFile | ( | ) |
Write all histograms to current opened file.
|
friend |
Operator << for convenient output to std::ostream.
Definition at line 211 of file BmnHistManager.h.
|
friend |
Operator << for convenient output to std::ostream.
Definition at line 211 of file BmnHistManager.h.