![]() |
EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
Histogram manager. More...
#include <EicRoot/blob/master/cbmbase/CbmHistManager.h>
Inheritance diagram for CbmHistManager:
Collaboration diagram for CbmHistManager:Public Member Functions | |
| CbmHistManager () | |
| Constructor. | |
| virtual | ~CbmHistManager () |
| Destructor. | |
| void | Add (const string &name, TNamed *object) |
| Add new named object to manager. | |
| template<class T > | |
| void | Create1 (const string &name, const string &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 string &name, const string &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 string &name) const |
| Return pointer to TH1 histogram. | |
| vector< TH1 * > | H1Vector (const string &pattern) const |
| Return vector of pointers to TH1 histogram. | |
| TH2 * | H2 (const string &name) const |
| Return pointer to TH2 histogram. | |
| vector< TH2 * > | H2Vector (const string &pattern) const |
| Return vector of pointers to TH2 histogram. | |
| TGraph * | G1 (const string &name) const |
| Return pointer to TGraph. | |
| vector< TGraph * > | G1Vector (const string &pattern) const |
| Return vector of pointers to TGraph. | |
| TGraph2D * | G2 (const string &name) const |
| Return pointer to TGraph2D. | |
| vector< TGraph2D * > | G2Vector (const string &pattern) const |
| Return vector of pointers to TGraph2D. | |
| TProfile * | P1 (const string &name) const |
| Return pointer to TProfile. | |
| vector< TProfile * > | P1Vector (const string &pattern) const |
| Return vector of pointers to TProfile. | |
| TProfile2D * | P2 (const string &name) const |
| Return pointer to TH2 histogram. | |
| vector< TProfile2D * > | P2Vector (const string &pattern) const |
| Return vector of pointers to TProfile2D. | |
| Bool_t | Exists (const string &name) const |
| Check existence of histogram in manager. | |
| void | WriteToFile () |
| Write all histograms to current opened file. | |
| void | ReadFromFile (TFile *file) |
| Read histograms from file. | |
| void | Clear () |
| Clear memory. Remove all histograms. | |
| void | ShrinkEmptyBins (const string &histName) |
| Shrink empty bins in histogram for Xaxis from right side. | |
| void | ShrinkEmptyBinsByPattern (const string &pattern) |
| Shrink empty bins in histograms for Xaxis from right side. | |
| void | Scale (const string &histName, Double_t scale) |
| Scale histogram. | |
| void | ScaleByPattern (const string &pattern, Double_t scale) |
| Scale histograms which name matches specified pattern. | |
| void | Rebin (const string &histName, Int_t ngroup) |
| Rebin histogram. | |
| void | RebinByPattern (const string &pattern, Int_t ngroup) |
| Rebin histograms which name matches specified pattern. | |
| string | ToString () const |
| Return string representation of class. | |
Private Member Functions | |
| template<class T > | |
| vector< T > | ObjectVector (const string &pattern) const |
Private Attributes | |
| map< string, TNamed * > | fMap |
Friends | |
| std::ostream & | operator<< (std::ostream &strm, const CbmHistManager &histManager) |
| Operator << for convenient output to std::ostream. | |
Histogram manager.
Definition at line 38 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 38 of file CbmHistManager.h
| CbmHistManager::CbmHistManager | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inline |
Add new named object to manager.
| [in] | name | Name of the object. |
| [in] | object | Pointer to object. |
Definition at line 57 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 57 of file CbmHistManager.h
Referenced by Create1(), and Create2().
Here is the caller graph for this function:| void CbmHistManager::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 73 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 73 of file CbmHistManager.h
References Add(), Acts::UnitConstants::h, and T.
Here is the call graph for this function:
|
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 96 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 96 of file CbmHistManager.h
References Add(), Acts::UnitConstants::h, and T.
Here is the call graph for this function:
|
inline |
Check existence of histogram in manager.
| [in] | name | Name of histogram. |
Definition at line 246 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 246 of file CbmHistManager.h
References fMap.
|
inline |
Return pointer to TGraph.
| [in] | name | Name of graph. |
Definition at line 158 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 158 of file CbmHistManager.h
References fMap.
| vector<TGraph*> CbmHistManager::G1Vector | ( | const string & | pattern | ) | const |
Return vector of pointers to TGraph.
| [in] | pattern | Regex for object name. |
|
inline |
Return pointer to TGraph2D.
| [in] | name | Name of graph. |
Definition at line 180 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 180 of file CbmHistManager.h
References fMap.
| vector<TGraph2D*> CbmHistManager::G2Vector | ( | const string & | pattern | ) | const |
Return vector of pointers to TGraph2D.
| [in] | pattern | Regex for object name. |
|
inline |
Return pointer to TH1 histogram.
| [in] | name | Name of histogram. |
Definition at line 114 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 114 of file CbmHistManager.h
References fMap.
| vector<TH1*> CbmHistManager::H1Vector | ( | const string & | pattern | ) | const |
Return vector of pointers to TH1 histogram.
| [in] | pattern | Regex for histogram name. |
|
inline |
Return pointer to TH2 histogram.
| [in] | name | Name of histogram. |
Definition at line 136 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 136 of file CbmHistManager.h
References fMap.
| vector<TH2*> CbmHistManager::H2Vector | ( | const string & | pattern | ) | const |
Return vector of pointers to TH2 histogram.
| [in] | pattern | Regex for histogram name. |
|
inline |
Return pointer to TProfile.
| [in] | name | Name of profile. |
Definition at line 202 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 202 of file CbmHistManager.h
References fMap.
| vector<TProfile*> CbmHistManager::P1Vector | ( | const string & | pattern | ) | const |
Return vector of pointers to TProfile.
| [in] | pattern | Regex for profile name. |
|
inline |
Return pointer to TH2 histogram.
| [in] | name | Name of histogram. |
Definition at line 224 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 224 of file CbmHistManager.h
References fMap.
| vector<TProfile2D*> CbmHistManager::P2Vector | ( | const string & | pattern | ) | const |
Return vector of pointers to TProfile2D.
| [in] | pattern | Regex for profile name. |
| void CbmHistManager::ReadFromFile | ( | TFile * | file | ) |
Read histograms from file.
| [in] | file | Pointer to file with histograms. |
| void CbmHistManager::Rebin | ( | const string & | histName, |
| Int_t | ngroup | ||
| ) |
Rebin histogram.
| [in] | histName | Name of histogram. |
| [in] | ngroup | Rebining factor. |
| void CbmHistManager::RebinByPattern | ( | const string & | pattern, |
| Int_t | ngroup | ||
| ) |
Rebin histograms which name matches specified pattern.
| [in] | histPatternName | Regular expression for histogram name. |
| [in] | ngroup | Rebining factor. |
| void CbmHistManager::Scale | ( | const string & | histName, |
| Double_t | scale | ||
| ) |
Scale histogram.
| [in] | histName | Name of histogram. |
| [in] | scale | Scaling factor. |
| void CbmHistManager::ScaleByPattern | ( | const string & | pattern, |
| Double_t | scale | ||
| ) |
Scale histograms which name matches specified pattern.
| [in] | histPatternName | Regular expression for histogram name. |
| [in] | scale | Scaling factor. |
| void CbmHistManager::ShrinkEmptyBins | ( | const string & | histName | ) |
Shrink empty bins in histogram for Xaxis from right side.
| [in] | histName | Name of histogram. |
| void CbmHistManager::ShrinkEmptyBinsByPattern | ( | const string & | pattern | ) |
Shrink empty bins in histograms for Xaxis from right side.
| [in] | histPatternName | Regular expression for histogram name. |
| string CbmHistManager::ToString | ( | ) | const |
Return string representation of class.
| void CbmHistManager::WriteToFile | ( | ) |
Write all histograms to current opened file.
|
friend |
Operator << for convenient output to std::ostream.
Definition at line 328 of file CbmHistManager.h.
View newest version in sPHENIX GitHub at line 328 of file CbmHistManager.h
|
private |