CbmRoot
Loading...
Searching...
No Matches
CbmHistManager Class Reference

Histogram manager. More...

#include <CbmHistManager.h>

Inheritance diagram for CbmHistManager:
[legend]
Collaboration diagram for CbmHistManager:
[legend]

Public Member Functions

 CbmHistManager ()
 Constructor.
 
virtual ~CbmHistManager ()
 Destructor.
 
void Add (const std::string &name, TNamed *object)
 Add new named object to manager.
 
template<class T>
void Create1 (const std::string &name, const std::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 Create1 (const std::string &name, const std::string &title, const std::vector< Double_t > &binsX)
 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", binsX);.
 
template<class T>
void Create2 (const std::string &name, const std::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);.
 
template<class T>
void Create2 (const std::string &name, const std::string &title, const std::vector< Double_t > &binsX, const std::vector< Double_t > &binsY)
 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", binsX, binsY);.
 
template<class T>
void Create3 (const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY, Int_t nofBinsZ, Double_t minBinZ, Double_t maxBinZ)
 Helper function for creation of 3-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create3<TH3F>("name", "title", 100, 0, 100, 200, 0, 200, 300, 0, 300);.
 
template<class T, int nDim>
void CreateSparse (const std::string &name, const std::string &title, const std::array< Int_t, nDim > &nBins, const std::array< Double_t, nDim > &minVals, const std::array< Double_t, nDim > &maxVals)
 Helper function for creation of THnSparse objects.
 
TNamed * GetObject (const std::string &name) const
 
TH1 * H1 (const std::string &name) const
 Return pointer to TH1 histogram.
 
TH1 * H1Clone (const std::string &name) const
 Return clone of TH1 histogram.
 
std::vector< TH1 * > H1Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TH1 histogram.
 
std::vector< TH1 * > H1Vector (const std::string &pattern) const
 Return vector of pointers to TH1 histogram.
 
TH2 * H2 (const std::string &name) const
 Return pointer to TH2 histogram.
 
TH2 * H2Clone (const std::string &name) const
 Return clone of TH2 histogram.
 
std::vector< TH2 * > H2Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TH2 histogram.
 
std::vector< TH2 * > H2Vector (const std::string &pattern) const
 Return vector of pointers to TH2 histogram.
 
TH3 * H3 (const std::string &name) const
 Return pointer to TH3 histogram.
 
TH3 * H3Clone (const std::string &name) const
 Return clone of TH3 histogram.
 
THnSparse * HnSparse (const std::string &name) const
 Return pointer to THnSparse histogram.
 
TGraph * G1 (const std::string &name) const
 Return pointer to TGraph.
 
std::vector< TGraph * > G1Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TGraph.
 
std::vector< TGraph * > G1Vector (const std::string &pattern) const
 Return vector of pointers to TGraph.
 
TGraph2D * G2 (const std::string &name) const
 Return pointer to TGraph2D.
 
std::vector< TGraph2D * > G2Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TGraph2D.
 
std::vector< TGraph2D * > G2Vector (const std::string &pattern) const
 Return vector of pointers to TGraph2D.
 
TProfile * P1 (const std::string &name) const
 Return pointer to TProfile.
 
std::vector< TProfile * > P1Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TProfile.
 
std::vector< TProfile * > P1Vector (const std::string &pattern) const
 Return vector of pointers to TProfile.
 
TProfile2D * P2 (const std::string &name) const
 Return pointer to TProfile2D.
 
std::vector< TProfile2D * > P2Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TProfile2D.
 
std::vector< TProfile2D * > P2Vector (const std::string &pattern) const
 Return vector of pointers to TProfile2D.
 
Bool_t Exists (const std::string &name) const
 Check existence of object in manager.
 
void WriteToFile ()
 Write all objects to current opened file.
 
void WriteCanvasToFile ()
 Write all canvas to current opened file.
 
void ReadFromFile (TFile *file)
 Read histograms from file.
 
void AddTNamedObject (TObject *obj)
 Add TName object to map. Used in ReadFromFile method.
 
void AddTDirectoryObject (TObject *obj)
 Add all TName objects to map in directory. Used in ReadFromFile method.
 
void Clear (Option_t *="")
 Clear memory. Remove all histograms and canvases.
 
void ShrinkEmptyBinsH1 (const std::string &histName)
 Shrink empty bins in H1.
 
void ShrinkEmptyBinsH1ByPattern (const std::string &pattern)
 Shrink empty bins in H1.
 
void ShrinkEmptyBinsH2 (const std::string &histName)
 Shrink empty bins in H2.
 
void ShrinkEmptyBinsH2ByPattern (const std::string &pattern)
 Shrink empty bins in H2.
 
void Scale (const std::string &histName, Double_t scale)
 Scale histogram.
 
void ScaleByPattern (const std::string &pattern, Double_t scale)
 Scale histograms which name matches specified pattern.
 
void NormalizeToIntegral (const std::string &histName)
 Normalize histogram to integral.
 
void NormalizeToIntegralByPattern (const std::string &pattern)
 Normalize histograms to integral which name matches specified pattern.
 
void Rebin (const std::string &histName, Int_t ngroup)
 Rebin histogram.
 
void RebinByPattern (const std::string &pattern, Int_t ngroup)
 Rebin histograms which name matches specified pattern.
 
std::string ToString () const
 Return string representation of class.
 
TCanvas * CreateCanvas (const std::string &name, const std::string &title, Int_t width, Int_t height)
 Create and draw TCanvas and store pointer to it.
 
void SaveCanvasToImage (const std::string &outputDir, const std::string &options="png,eps")
 Save all stored canvases to images.
 
template<class T>
vector< T > ObjectVector (const string &pattern) const
 
template<class T>
vector< T > ObjectVector (const vector< string > &names) const
 

Private Member Functions

template<class T>
std::vector< T > ObjectVector (const std::string &pattern) const
 
template<class T>
std::vector< T > ObjectVector (const std::vector< std::string > &names) const
 

Private Attributes

std::map< std::string, TNamed * > fMap
 
std::vector< TCanvas * > fCanvases
 

Friends

std::ostream & operator<< (std::ostream &strm, const CbmHistManager &histManager)
 Operator << for convenient output to std::ostream.
 

Detailed Description

Histogram manager.

Author
Semen Lebedev s.leb.nosp@m.edev.nosp@m.@gsi..nosp@m.de
Date
2011

Definition at line 48 of file CbmHistManager.h.

Constructor & Destructor Documentation

◆ CbmHistManager()

CbmHistManager::CbmHistManager ( )

Constructor.

Definition at line 50 of file core/base/CbmHistManager.cxx.

References fCanvases, and fMap.

Referenced by operator<<.

◆ ~CbmHistManager()

CbmHistManager::~CbmHistManager ( )
virtual

Destructor.

Definition at line 52 of file core/base/CbmHistManager.cxx.

Member Function Documentation

◆ Add()

void CbmHistManager::Add ( const std::string & name,
TNamed * object )
inline

Add new named object to manager.

Parameters
[in]nameName of the object.
[in]objectPointer to object.

Definition at line 65 of file CbmHistManager.h.

References fMap.

Referenced by AddTNamedObject(), Create1(), Create1(), Create2(), Create2(), Create3(), and CreateSparse().

◆ AddTDirectoryObject()

void CbmHistManager::AddTDirectoryObject ( TObject * obj)

Add all TName objects to map in directory. Used in ReadFromFile method.

Definition at line 155 of file core/base/CbmHistManager.cxx.

References AddTDirectoryObject(), and AddTNamedObject().

Referenced by AddTDirectoryObject(), and ReadFromFile().

◆ AddTNamedObject()

void CbmHistManager::AddTNamedObject ( TObject * obj)

Add TName object to map. Used in ReadFromFile method.

Definition at line 145 of file core/base/CbmHistManager.cxx.

References Add().

Referenced by AddTDirectoryObject(), and ReadFromFile().

◆ Clear()

void CbmHistManager::Clear ( Option_t * = "")

Clear memory. Remove all histograms and canvases.

Definition at line 169 of file core/base/CbmHistManager.cxx.

References fCanvases, and fMap.

◆ Create1() [1/2]

template<class T>
void CbmHistManager::Create1 ( const std::string & name,
const std::string & title,
const std::vector< Double_t > & binsX )
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", binsX);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]binsXarray of low-edges for each bin in X

Definition at line 103 of file CbmHistManager.h.

References Add().

◆ Create1() [2/2]

template<class T>
void CbmHistManager::Create1 ( const std::string & name,
const std::string & title,
Int_t nofBins,
Double_t minBin,
Double_t maxBin )
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);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]nofBinsNumber of bins.
[in]minBinLow axis limit.
[in]maxBinUpper axis limit.

Definition at line 88 of file CbmHistManager.h.

References Add().

Referenced by CbmAnaJpsiReport::SignalOverBgAllSteps().

◆ Create2() [1/2]

template<class T>
void CbmHistManager::Create2 ( const std::string & name,
const std::string & title,
const std::vector< Double_t > & binsX,
const std::vector< Double_t > & binsY )
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", binsX, binsY);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]binsXarray of low-edges for each bin in X
[in]binsYarray of low-edges for each bin in Y

Definition at line 140 of file CbmHistManager.h.

References Add().

◆ Create2() [2/2]

template<class T>
void CbmHistManager::Create2 ( const std::string & name,
const std::string & title,
Int_t nofBinsX,
Double_t minBinX,
Double_t maxBinX,
Int_t nofBinsY,
Double_t minBinY,
Double_t maxBinY )
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);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]nofBinsXNumber of bins for X axis.
[in]minBinXLow X axis limit.
[in]maxBinXUpper X axis limit.
[in]nofBinsYNumber of bins for Y axis.
[in]minBinYLow Y axis limit.
[in]maxBinYUpper Y axis limit.

Definition at line 123 of file CbmHistManager.h.

References Add().

◆ Create3()

template<class T>
void CbmHistManager::Create3 ( const std::string & name,
const std::string & title,
Int_t nofBinsX,
Double_t minBinX,
Double_t maxBinX,
Int_t nofBinsY,
Double_t minBinY,
Double_t maxBinY,
Int_t nofBinsZ,
Double_t minBinZ,
Double_t maxBinZ )
inline

Helper function for creation of 3-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create3<TH3F>("name", "title", 100, 0, 100, 200, 0, 200, 300, 0, 300);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]nofBinsXNumber of bins for X axis.
[in]minBinXLow X axis limit.
[in]maxBinXUpper X axis limit.
[in]nofBinsYNumber of bins for Y axis.
[in]minBinYLow Y axis limit.
[in]maxBinYUpper Y axis limit.
[in]nofBinsZNumber of bins for Z axis.
[in]minBinZLow Z axis limit.
[in]maxBinZUpper Z axis limit.

Definition at line 164 of file CbmHistManager.h.

References Add().

◆ CreateCanvas()

TCanvas * CbmHistManager::CreateCanvas ( const std::string & name,
const std::string & title,
Int_t width,
Int_t height )

Create and draw TCanvas and store pointer to it.

Parameters
[in]nameName of the canvas.
[in]titleTitle of the canvas.
[in]widthWidth of the canvas.
[in]heightHeight of the canvas.
Returns
Pointer to the created canvas.

Definition at line 303 of file core/base/CbmHistManager.cxx.

References fCanvases.

◆ CreateSparse()

template<class T, int nDim>
void CbmHistManager::CreateSparse ( const std::string & name,
const std::string & title,
const std::array< Int_t, nDim > & nBins,
const std::array< Double_t, nDim > & minVals,
const std::array< Double_t, nDim > & maxVals )
inline

Helper function for creation of THnSparse objects.

Template Parameters
<T>{ real object type that has to be created, for example THnSparseD }
<nDim>{ Array dimensions for nBins, minVals and maxVals } CreateSparse<THnSparseD, 3>("name", "title", nDim, nBins, minVals, maxVals);
Parameters
[in]nameObject name.
[in]titleObject title.
[in]nBinsArray of size nDim with number of bins for each dimension.
[in]minValsArray of size nDim with minimum values for each dimension.
[in]maxValsArray of size nDim with maximum values for each dimension.

Definition at line 184 of file CbmHistManager.h.

References Add().

◆ Exists()

Bool_t CbmHistManager::Exists ( const std::string & name) const
inline

Check existence of object in manager.

Parameters
[in]nameName of object.
Returns
True if object exists in manager.

Definition at line 425 of file CbmHistManager.h.

References fMap.

◆ G1()

TGraph * CbmHistManager::G1 ( const std::string & name) const
inline

Return pointer to TGraph.

Parameters
[in]nameName of TGraph.
Returns
pointer to TGraph.

Definition at line 313 of file CbmHistManager.h.

References fMap.

Referenced by CbmLitFieldQaReport::DrawFieldAlongZ().

◆ G1Vector() [1/2]

std::vector< TGraph * > CbmHistManager::G1Vector ( const std::string & pattern) const

Return vector of pointers to TGraph.

Parameters
[in]patternRegex for TGraph name.
Returns
Vector of pointers to TGraph.

◆ G1Vector() [2/2]

std::vector< TGraph * > CbmHistManager::G1Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TGraph.

Parameters
[in]namesVector of TGraph names.
Returns
Vector of pointers to TGraph.

Referenced by CbmLitFieldQaReport::DrawFieldAlongZ().

◆ G2()

TGraph2D * CbmHistManager::G2 ( const std::string & name) const
inline

Return pointer to TGraph2D.

Parameters
[in]nameName of TGraph2D.
Returns
pointer to TGraph2D.

Definition at line 341 of file CbmHistManager.h.

References fMap.

Referenced by CbmLitFieldQaReport::DrawFieldRichPmtPlane(), CbmLitFieldQaReport::DrawFieldSlices(), and CbmLitFieldApproximationQaReport::DrawSlices().

◆ G2Vector() [1/2]

std::vector< TGraph2D * > CbmHistManager::G2Vector ( const std::string & pattern) const

Return vector of pointers to TGraph2D.

Parameters
[in]patternRegex for TGraph2D name.
Returns
Vector of pointers to TGraph2D.

◆ G2Vector() [2/2]

std::vector< TGraph2D * > CbmHistManager::G2Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TGraph2D.

Parameters
[in]namesVector of TGraph2D names.
Returns
Vector of pointers to TGraph2D.

Referenced by CbmLitFieldApproximationQaReport::DrawApr(), CbmLitFieldQaReport::DrawFieldSlices(), and CbmLitFieldApproximationQaReport::DrawSlices().

◆ GetObject()

TNamed * CbmHistManager::GetObject ( const std::string & name) const
inline

Definition at line 192 of file CbmHistManager.h.

References fMap.

Referenced by LmvmDrawAll::DrawSystematicErrorFsSignal().

◆ H1()

◆ H1Clone()

TH1 * CbmHistManager::H1Clone ( const std::string & name) const
inline

Return clone of TH1 histogram.

Parameters
[in]nameName of TH1 histogram.
Returns
pointer of TH1 clone histogram.

Definition at line 221 of file CbmHistManager.h.

References H1().

◆ H1Vector() [1/2]

std::vector< TH1 * > CbmHistManager::H1Vector ( const std::string & pattern) const

Return vector of pointers to TH1 histogram.

Parameters
[in]patternRegex for TH1 histogram name.
Returns
Vector of pointers to TH1 histogram.

◆ H1Vector() [2/2]

◆ H2()

TH2 * CbmHistManager::H2 ( const std::string & name) const
inline

◆ H2Clone()

TH2 * CbmHistManager::H2Clone ( const std::string & name) const
inline

Return clone of TH2 histogram.

Parameters
[in]nameName of TH2 histogram.
Returns
pointer of TH2 clone histogram.

Definition at line 257 of file CbmHistManager.h.

References H2().

◆ H2Vector() [1/2]

std::vector< TH2 * > CbmHistManager::H2Vector ( const std::string & pattern) const

Return vector of pointers to TH2 histogram.

Parameters
[in]patternRegex for TH2 histogram name.
Returns
Vector of pointers to TH2 histogram.

◆ H2Vector() [2/2]

std::vector< TH2 * > CbmHistManager::H2Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TH2 histogram.

Parameters
[in]namesVector of TH2 histogram names.
Returns
Vector of pointers to TH2 histogram.

Referenced by CbmSimulationReport::DrawH2ByPattern(), and CbmLitFitQaReport::PrintResAndPullRow().

◆ H3()

TH3 * CbmHistManager::H3 ( const std::string & name) const
inline

Return pointer to TH3 histogram.

Parameters
[in]nameName of TH3 histogram.
Returns
pointer to TH3 histogram.

Definition at line 278 of file CbmHistManager.h.

References fMap.

Referenced by CbmSimulationReport::H3(), and H3Clone().

◆ H3Clone()

TH3 * CbmHistManager::H3Clone ( const std::string & name) const
inline

Return clone of TH3 histogram.

Parameters
[in]nameName of TH3 histogram.
Returns
pointer of TH3 clone histogram.

Definition at line 292 of file CbmHistManager.h.

References H3().

◆ HnSparse()

THnSparse * CbmHistManager::HnSparse ( const std::string & name) const
inline

Return pointer to THnSparse histogram.

Parameters
[in]nameName of THnSparse histogram.
Returns
pointer to THnSparse histogram.

Definition at line 299 of file CbmHistManager.h.

References fMap.

◆ NormalizeToIntegral()

void CbmHistManager::NormalizeToIntegral ( const std::string & histName)

Normalize histogram to integral.

Parameters
[in]histNameName of histogram.

Definition at line 260 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by NormalizeToIntegralByPattern().

◆ NormalizeToIntegralByPattern()

void CbmHistManager::NormalizeToIntegralByPattern ( const std::string & pattern)

Normalize histograms to integral which name matches specified pattern.

Parameters
[in]histPatternNameRegular expression for histogram name.

Definition at line 266 of file core/base/CbmHistManager.cxx.

References H1Vector(), and NormalizeToIntegral().

Referenced by CbmLitTofQaReport::Draw(), and CbmLitClusteringQaReport::ScaleAndShrinkHistograms().

◆ ObjectVector() [1/4]

template<class T>
std::vector< T > CbmHistManager::ObjectVector ( const std::string & pattern) const
private

◆ ObjectVector() [2/4]

template<class T>
std::vector< T > CbmHistManager::ObjectVector ( const std::vector< std::string > & names) const
private

◆ ObjectVector() [3/4]

template<class T>
vector< T > CbmHistManager::ObjectVector ( const string & pattern) const

Definition at line 55 of file core/base/CbmHistManager.cxx.

References fMap.

◆ ObjectVector() [4/4]

template<class T>
vector< T > CbmHistManager::ObjectVector ( const vector< string > & names) const

Definition at line 93 of file core/base/CbmHistManager.cxx.

References fMap.

◆ P1()

TProfile * CbmHistManager::P1 ( const std::string & name) const
inline

Return pointer to TProfile.

Parameters
[in]nameName of TProfile.
Returns
pointer to TProfile.

Definition at line 369 of file CbmHistManager.h.

References fMap.

◆ P1Vector() [1/2]

std::vector< TProfile * > CbmHistManager::P1Vector ( const std::string & pattern) const

Return vector of pointers to TProfile.

Parameters
[in]patternRegex for TProfile name.
Returns
Vector of pointers to TProfile.

◆ P1Vector() [2/2]

std::vector< TProfile * > CbmHistManager::P1Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TProfile.

Parameters
[in]namesVector of TProfile names.
Returns
Vector of pointers to TProfile.

◆ P2()

TProfile2D * CbmHistManager::P2 ( const std::string & name) const
inline

Return pointer to TProfile2D.

Parameters
[in]nameName of TProfile2D.
Returns
pointer to TProfile2D.

Definition at line 397 of file CbmHistManager.h.

References fMap.

Referenced by CbmLitRadLengthQaReport::DrawDetector(), CbmLitTrackingGeometryConstructor::GetMuchLayout(), CbmLitTrackingGeometryConstructor::GetRichMaterial(), and CbmLitTrackingGeometryConstructor::GetTrdLayout().

◆ P2Vector() [1/2]

std::vector< TProfile2D * > CbmHistManager::P2Vector ( const std::string & pattern) const

Return vector of pointers to TProfile2D.

Parameters
[in]patternRegex for TProfile2D name.
Returns
Vector of pointers to TProfile2D.

◆ P2Vector() [2/2]

std::vector< TProfile2D * > CbmHistManager::P2Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TProfile2D.

Parameters
[in]namesVector of TProfile2D names.
Returns
Vector of pointers to TProfile2D.

◆ ReadFromFile()

void CbmHistManager::ReadFromFile ( TFile * file)

◆ Rebin()

void CbmHistManager::Rebin ( const std::string & histName,
Int_t ngroup )

Rebin histogram.

Parameters
[in]histNameName of histogram.
[in]ngroupRebining factor.

Definition at line 275 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by RebinByPattern().

◆ RebinByPattern()

void CbmHistManager::RebinByPattern ( const std::string & pattern,
Int_t ngroup )

Rebin histograms which name matches specified pattern.

Parameters
[in]histPatternNameRegular expression for histogram name.
[in]ngroupRebining factor.

Definition at line 284 of file core/base/CbmHistManager.cxx.

References H1Vector(), and Rebin().

Referenced by CbmAnaJpsiReport::Draw().

◆ SaveCanvasToImage()

void CbmHistManager::SaveCanvasToImage ( const std::string & outputDir,
const std::string & options = "png,eps" )

Save all stored canvases to images.

Parameters
[in]outputDirPath to the output directory (could be relative path).
[in]optionsYou can specify image format: eps, png or gif. Example: "gif,eps,png".

Definition at line 310 of file core/base/CbmHistManager.cxx.

References fCanvases, and Cbm::SaveCanvasAsImage().

◆ Scale()

void CbmHistManager::Scale ( const std::string & histName,
Double_t scale )

Scale histogram.

Parameters
[in]histNameName of histogram.
[in]scaleScaling factor.

Definition at line 249 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by ScaleByPattern().

◆ ScaleByPattern()

void CbmHistManager::ScaleByPattern ( const std::string & pattern,
Double_t scale )

Scale histograms which name matches specified pattern.

Parameters
[in]histPatternNameRegular expression for histogram name.
[in]scaleScaling factor.

Definition at line 251 of file core/base/CbmHistManager.cxx.

References H1Vector(), and Scale().

Referenced by CbmAnaJpsiReport::Draw(), LmvmDrawAll::DrawSystematicErrorFsSignal(), CbmLitClusteringQaReport::ScaleAndShrinkHistograms(), and CbmStsDigitizeQaReport::ScaleHistograms().

◆ ShrinkEmptyBinsH1()

void CbmHistManager::ShrinkEmptyBinsH1 ( const std::string & histName)

Shrink empty bins in H1.

Parameters
[in]histNameName of histogram.

Definition at line 182 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by ShrinkEmptyBinsH1ByPattern().

◆ ShrinkEmptyBinsH1ByPattern()

void CbmHistManager::ShrinkEmptyBinsH1ByPattern ( const std::string & pattern)

Shrink empty bins in H1.

Parameters
[in]histPatternNameRegular expression for histogram name.

Definition at line 203 of file core/base/CbmHistManager.cxx.

References H1Vector(), and ShrinkEmptyBinsH1().

Referenced by CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmLitTrackingQaReport::DrawHitsHistos(), CbmLitClusteringQaReport::ScaleAndShrinkHistograms(), and CbmStsDigitizeQaReport::ScaleHistograms().

◆ ShrinkEmptyBinsH2()

void CbmHistManager::ShrinkEmptyBinsH2 ( const std::string & histName)

Shrink empty bins in H2.

Parameters
[in]histNameName of histogram.

Definition at line 212 of file core/base/CbmHistManager.cxx.

References H2().

Referenced by ShrinkEmptyBinsH2ByPattern().

◆ ShrinkEmptyBinsH2ByPattern()

void CbmHistManager::ShrinkEmptyBinsH2ByPattern ( const std::string & pattern)

Shrink empty bins in H2.

Parameters
[in]histPatternNameRegular expression for histogram name.

Definition at line 240 of file core/base/CbmHistManager.cxx.

References H1Vector(), and ShrinkEmptyBinsH2().

Referenced by CbmLitClusteringQaReport::ScaleAndShrinkHistograms().

◆ ToString()

string CbmHistManager::ToString ( ) const

Return string representation of class.

Returns
string representation of class.

Definition at line 293 of file core/base/CbmHistManager.cxx.

References fMap.

Referenced by operator<<.

◆ WriteCanvasToFile()

void CbmHistManager::WriteCanvasToFile ( )

Write all canvas to current opened file.

Definition at line 124 of file core/base/CbmHistManager.cxx.

References fCanvases.

◆ WriteToFile()

void CbmHistManager::WriteToFile ( )

Write all objects to current opened file.

Definition at line 116 of file core/base/CbmHistManager.cxx.

References fMap.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & strm,
const CbmHistManager & histManager )
friend

Operator << for convenient output to std::ostream.

Returns
Insertion stream in order to be able to call a succession of insertion operations.

Definition at line 532 of file CbmHistManager.h.

References CbmHistManager(), and ToString().

Member Data Documentation

◆ fCanvases

std::vector<TCanvas*> CbmHistManager::fCanvases
private

◆ fMap

std::map<std::string, TNamed*> CbmHistManager::fMap
private

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