CbmRoot
CbmHistManager Class Reference

Histogram manager. More...

#include <CbmHistManager.h>

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

Public Member Functions

 CbmHistManager ()
 Constructor. More...
 
virtual ~CbmHistManager ()
 Destructor. More...
 
void Add (const std::string &name, TNamed *object)
 Add new named object to manager. More...
 
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);. More...
 
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);. More...
 
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);. More...
 
TH1 * H1 (const std::string &name) const
 Return pointer to TH1 histogram. More...
 
std::vector< TH1 * > H1Vector (const std::string &pattern) const
 Return vector of pointers to TH1 histogram. More...
 
TH2 * H2 (const std::string &name) const
 Return pointer to TH2 histogram. More...
 
std::vector< TH2 * > H2Vector (const std::string &pattern) const
 Return vector of pointers to TH2 histogram. More...
 
TH3 * H3 (const std::string &name) const
 Return pointer to TH3 histogram. More...
 
TGraph * G1 (const std::string &name) const
 Return pointer to TGraph. More...
 
std::vector< TGraph * > G1Vector (const std::string &pattern) const
 Return vector of pointers to TGraph. More...
 
TGraph2D * G2 (const std::string &name) const
 Return pointer to TGraph2D. More...
 
std::vector< TGraph2D * > G2Vector (const std::string &pattern) const
 Return vector of pointers to TGraph2D. More...
 
TProfile * P1 (const std::string &name) const
 Return pointer to TProfile. More...
 
std::vector< TProfile * > P1Vector (const std::string &pattern) const
 Return vector of pointers to TProfile. More...
 
TProfile2D * P2 (const std::string &name) const
 Return pointer to TH2 histogram. More...
 
std::vector< TProfile2D * > P2Vector (const std::string &pattern) const
 Return vector of pointers to TProfile2D. More...
 
Bool_t Exists (const std::string &name) const
 Check existence of histogram in manager. More...
 
void WriteToFile ()
 Write all histograms to current opened file. More...
 
void ReadFromFile (TFile *file)
 Read histograms from file. More...
 
void AddTNamedObject (TObject *obj)
 Add TName object to map. Used in ReadFromFile method. More...
 
void AddTDirectoryObject (TObject *obj)
 Add all TName objects to map in directory. Used in ReadFromFile method. More...
 
void Clear (Option_t *)
 Clear memory. Remove all histograms. More...
 
void ShrinkEmptyBinsH1 (const std::string &histName)
 Shrink empty bins in H1. More...
 
void ShrinkEmptyBinsH1ByPattern (const std::string &pattern)
 Shrink empty bins in H1. More...
 
void ShrinkEmptyBinsH2 (const std::string &histName)
 Shrink empty bins in H2. More...
 
void ShrinkEmptyBinsH2ByPattern (const std::string &pattern)
 Shrink empty bins in H2. More...
 
void Scale (const std::string &histName, Double_t scale)
 Scale histogram. More...
 
void ScaleByPattern (const std::string &pattern, Double_t scale)
 Scale histograms which name matches specified pattern. More...
 
void NormalizeToIntegral (const std::string &histName)
 Normalize histogram to integral. More...
 
void NormalizeToIntegralByPattern (const std::string &pattern)
 Normalize histograms to integral which name matches specified pattern. More...
 
void Rebin (const std::string &histName, Int_t ngroup)
 Rebin histogram. More...
 
void RebinByPattern (const std::string &pattern, Int_t ngroup)
 Rebin histograms which name matches specified pattern. More...
 
std::string ToString () const
 Return string representation of class. More...
 
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. More...
 
void SaveCanvasToImage (const std::string &outputDir, const std::string &options="png,eps")
 Save all stored canvases to images. More...
 
template<class T >
vector< T > ObjectVector (const string &pattern) const
 

Private Member Functions

template<class T >
std::vector< T > ObjectVector (const std::string &pattern) 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. More...
 

Detailed Description

Histogram manager.

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

Definition at line 41 of file CbmHistManager.h.

Constructor & Destructor Documentation

◆ CbmHistManager()

CbmHistManager::CbmHistManager ( )

Constructor.

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

◆ ~CbmHistManager()

CbmHistManager::~CbmHistManager ( )
virtual

Destructor.

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

Member Function Documentation

◆ Add()

◆ AddTDirectoryObject()

void CbmHistManager::AddTDirectoryObject ( TObject *  obj)

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

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

References AddTNamedObject().

Referenced by ReadFromFile().

◆ AddTNamedObject()

void CbmHistManager::AddTNamedObject ( TObject *  obj)

Add TName object to map. Used in ReadFromFile method.

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

References Add().

Referenced by AddTDirectoryObject(), and ReadFromFile().

◆ Clear()

void CbmHistManager::Clear ( Option_t *  )

Clear memory. Remove all histograms.

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

References fMap.

◆ Create1()

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 81 of file CbmHistManager.h.

References Add().

Referenced by CbmAnaJpsiTask::CreateAnalysisStepsH1(), CbmAnaJpsiTask::CreateAnaStepsPairSourceH1(), CbmLitClusteringQa::CreateClusterParametersHistograms(), CbmStsDigitizeQa::CreateDigiHistograms(), CbmTrdMCQa::CreateHistograms(), CbmStsDigitizeQa::CreateHistograms(), CbmLitClusteringQa::CreateHistograms(), CbmTrdMCQa::CreateNofObjectsHistograms(), CbmStsDigitizeQa::CreateNofObjectsHistograms(), CbmLitClusteringQa::CreateNofObjectsHistograms(), CbmTrdMCQa::CreatePointHistograms(), CbmAnaJpsiTask::CreateSourceTypesH1(), CbmRichGeoTestOpt::DrawMeanEff(), CbmRichGeoTestOpt::DrawMeanRms(), CbmRichPMTMapping::InitHist(), CbmAnaJpsiSuperEvent::InitHist(), CbmAnaJpsiTask::InitHist(), CbmRichAlignment::InitHistAlignment(), CbmRichCorrectionVector::InitHistAlignment(), CbmRichMCbmQa::InitHistograms(), CbmRichRecoTbQa::InitHistograms(), CbmRichRecoQa::InitHistograms(), CbmRichUrqmdTest::InitHistograms(), CbmRichGeoTest::InitHistograms(), CbmPsdMCbmQaReal::InitHistograms(), CbmRichMCbmAerogelAna::InitHistograms(), CbmRichMCbmQaRichOnly::InitHistograms(), CbmRichMCbmQaReal::InitHistograms(), CbmRichMirrorSortingCorrection::InitHistoMap(), CbmRichMirrorSortingCorrection::InitHistProjection(), CbmRichCorrection::InitHistProjection(), CbmRichCorrectionVector::InitHistProjection(), CbmAnaJpsiSuperEventReport::SignalOverBgAllSteps(), and CbmAnaJpsiReport::SignalOverBgAllSteps().

◆ Create2()

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

◆ 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 140 of file CbmHistManager.h.

References Add().

Referenced by CbmRichGeoTest::DrawPmts(), CbmRichRecoQa::InitHistograms(), CbmRichGeoTest::InitHistograms(), CbmPsdMCbmQaReal::InitHistograms(), CbmRichMCbmQaReal::InitHistograms(), and CbmRichMirrorSortingCorrection::InitHistoMap().

◆ 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 267 of file core/base/CbmHistManager.cxx.

References fCanvases.

Referenced by CbmAnaDielectronTaskDraw::Draw1DCut(), CbmAnaDielectronTaskDraw::Draw2DCut(), CbmAnaDielectronTaskDraw::DrawBgSource2D(), CbmAnaDielectronTaskDraw::DrawBgSourcesVsMomentum(), CbmAnaDielectronTaskDraw::DrawBgSourceTracks(), CbmRichMirrorSortingCorrection::DrawDistanceComp(), CbmAnaDielectronTaskDraw::DrawElPiMomHis(), CbmRichMCbmSEDisplay::DrawEvent(), CbmRichMCbmQa::DrawEvent(), CbmAnaDielectronTaskDraw::DrawGammaVertex(), CbmRichGeoTest::DrawH2MeanRms(), CbmRichMCbmQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichRecoQa::DrawHist(), CbmPsdMCbmQaReal::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichGeoTestOpt::DrawMeanEff(), CbmRichGeoTestOpt::DrawMeanEff2D(), CbmRichGeoTestOpt::DrawMeanRms(), CbmRichGeoTestOpt::DrawMeanRms2D(), CbmAnaDielectronTaskDraw::DrawMinvForEachAnalysisStep(), CbmAnaDielectronTaskDraw::DrawMinvPtAll(), CbmAnaDielectronTaskDraw::DrawMinvSandBgAll(), CbmAnaDielectronTaskDraw::DrawMinvSourceAll(), CbmAnaDielectronTaskDraw::DrawMismatchesAndGhosts(), CbmAnaDielectronTaskDraw::DrawMomentumDistributionAll(), CbmAnaDielectronTaskDraw::DrawMotherPdg(), CbmAnaDielectronTaskDraw::DrawMvdAndStsHist(), CbmAnaDielectronTaskDraw::DrawMvdCutQa(), CbmRichEventDisplay::DrawOneEvent(), CbmRichGeoTest::DrawPmts(), CbmAnaDielectronTaskDraw::DrawPmtXY(), CbmAnaDielectronTaskDraw::DrawPPAngleMCSignal(), CbmAnaDielectronTaskDraw::DrawPtYDistributionAll(), CbmAnaDielectronTaskDraw::DrawPtYEfficiencyAll(), CbmAnaDielectronTaskDraw::DrawRapidityDistributionAll(), CbmRichMCbmQaReal::DrawRichTofEv(), CbmRichMCbmQaRichOnly::DrawRing(), CbmRichGeoTest::DrawRing(), CbmRichMCbmQaReal::DrawRing(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffixPmtHalf(), CbmAnaDielectronTaskDraw::DrawSourcesBgPairsAll(), and CbmAnaDielectronTaskDraw::SOverBgAll().

◆ Exists()

◆ G1()

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

Return pointer to TGraph.

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

Definition at line 223 of file CbmHistManager.h.

References fMap.

Referenced by CbmLitFieldQa::FillBHistos().

◆ G1Vector()

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

Return vector of pointers to TGraph.

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

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

◆ G2()

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

◆ G2Vector()

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

Return vector of pointers to TGraph2D.

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

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

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

◆ H1()

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

Return pointer to TH1 histogram.

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

Definition at line 170 of file CbmHistManager.h.

References fMap.

Referenced by CbmRichMCbmQaRichOnly::analyseRing(), CbmRichMCbmQaReal::analyseRing(), CbmRichAlignment::CalculateAnglesAndDrawDistrib(), CbmRichCorrectionVector::CalculateAnglesAndDrawDistrib(), CbmStsDigitizeQaReport::Create(), CbmLitTrackingQaReport::Create(), CbmLitClusteringQaReport::Create(), CbmRichGeoTest::CreateAccVsMinNofHitsHist(), DefaultAccAndRecLabelFormatter(), DefaultHitEfficiencyLabelFormatter(), CbmAnaJpsiTask::DifferenceSignalAndBg(), CbmAnaJpsiSuperEvent::DoSuperEvent(), CbmAnaJpsiSuperEventReport::Draw(), CbmAnaJpsiSuperEvent::Draw(), CbmLitTrackingQaReport::DrawAccAndRec(), CbmLitTrackingQaStudyReport::DrawAccAndRec(), CbmLitFieldApproximationQaReport::DrawApr(), CbmAnaJpsiSuperEventReport::DrawComparison(), CbmRichMirrorSortingCorrection::DrawDistanceComp(), CbmLitTrackingQaStudyReport::DrawEfficiency(), CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmRichMCbmQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichRecoQa::DrawHist(), CbmPsdMCbmQaReal::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichPMTMapping::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichAlignment::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistAlignment(), CbmRichCorrection::DrawHistProjection(), CbmRichCorrectionVector::DrawHistProjection(), CbmLitTrackingQaReport::DrawHitsHistos(), CbmRichGeoTestOpt::DrawMeanEff(), CbmRichGeoTestOpt::DrawMeanRms(), CbmAnaJpsiSuperEventReport::DrawMinvMismatchPt(), CbmAnaJpsiSuperEventReport::DrawMinvSignalBg(), CbmStsDigitizeQaReport::DrawNofObjectsHistograms(), CbmLitClusteringQaReport::DrawNofObjectsHistograms(), CbmAnaJpsiSuperEventReport::DrawPairSource(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmRichRecoTbQa::DrawTimeLog(), CbmLitFitQaReport::DrawTrackMomentumAtVertex(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmTrdMCQa::Exec(), CbmStsDigitizeQa::Exec(), CbmRichMCbmQa::Exec(), CbmPsdMCbmQaReal::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmLitClusteringQa::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmRichMCbmQaReal::Exec(), CbmAnaJpsiTask::Exec(), CbmLitTrackingQa::Exec(), CbmLitRadLengthQa::ExecDetector(), CbmLitClusteringQa::FillEventCounterHistograms(), CbmLitFieldApproximationQa::FillFieldApproximationHistos(), CbmLitTrackingQa::FillGlobalReconstructionHistos(), CbmLitTrackingQa::FillGlobalReconstructionHistosRich(), CbmLitFieldApproximationQa::FillGridCreatorHistos(), CbmLitRadLengthQa::FillHistosDetector(), CbmRichMirrorSortingCorrection::FillHistProjection(), CbmRichCorrection::FillHistProjection(), CbmRichCorrectionVector::FillHistProjection(), CbmLitClusteringQa::FillHitEfficiencyHistograms(), CbmAnaJpsiTask::FillPairHists(), CbmRichMirrorSortingCorrection::FillRingTrackDistance(), CbmRichMirrorSortingCorrection::FillRingTrackDistanceCorr(), CbmLitFitQa::FillTrackParamHistogramm(), CbmLitTrackingQa::FillTrackQualityHistograms(), CbmTrdMCQa::Finish(), CbmStsDigitizeQa::Finish(), CbmRichCorrection::Finish(), CbmRichCorrectionVector::Finish(), CbmRichGeoTest::FitAndFillHistCircle(), CbmRichGeoTest::FitAndFillHistEllipse(), CbmAnaDielectronTaskDraw::H1(), CbmSimulationReport::H1(), CbmLitTrackingQa::IncreaseCounters(), CbmRichUrqmdTest::NofHitsAndPoints(), CbmRichUrqmdTest::NofProjections(), CbmRichUrqmdTest::NofRings(), NormalizeToIntegral(), CbmAnaJpsiTask::PairMcAndAcceptance(), CbmAnaJpsiTask::PairSource(), CbmLitTrackingQa::PionSuppression(), CbmLitTrackingQaReport::PrintNofGhosts(), CbmLitTrackingQaReport::PrintPionSuppression(), CbmLitTrackingQaReport::PrintTrackingEfficiency(), CbmRichRecoTbQa::Process(), CbmStsDigitizeQa::ProcessAngles(), CbmLitClusteringQa::ProcessClusters(), CbmLitClusteringQa::ProcessDigis(), CbmStsDigitizeQa::ProcessDigisAndPoints(), CbmLitTofQa::ProcessGlobalTracks(), CbmLitTrackingQa::ProcessGlobalTracks(), CbmLitClusteringQa::ProcessHits(), CbmRichGeoTest::ProcessHits(), CbmRichRecoTbQa::ProcessMc(), CbmRichGeoTest::ProcessMc(), CbmLitTrackingQa::ProcessMvd(), CbmTrdMCQa::ProcessPoints(), CbmLitClusteringQa::ProcessPoints(), CbmLitTofQa::ProcessTofHits(), CbmLitTofQa::ProcessTofTracks(), CbmLitFitQa::ProcessTrackMomentumAtVertex(), CbmLitFitQa::ProcessTrackParamsAtVertex(), CbmRichPMTMapping::ProjectionProducer(), CbmRichPMTMapping::ProjectionProducer2(), CbmAnaJpsiSuperEvent::ReadCandidates(), Rebin(), CbmCosy2018MonitorPulser::ResetAllHistos(), CbmMcbm2018MonitorStsSync::ResetAllHistos(), CbmMcbm2018MonitorSts::ResetAllHistos(), CbmMcbm2018MonitorMuch::ResetAllHistos(), CbmMcbm2018MonitorMuchLite::ResetAllHistos(), CbmRichMCbmAerogelAna::RichRings(), CbmRichMCbmQaRichOnly::RichRings(), CbmRichMCbmQaReal::RichRings(), CbmRichGeoTest::RingParameters(), CbmRichRecoTbQa::RingRecoEfficiency(), CbmRichRecoQa::RingTrackMismatchSource(), CbmCosy2018MonitorPulser::SaveAllHistos(), CbmMcbm2018MonitorStsSync::SaveAllHistos(), CbmMcbm2018MonitorSts::SaveAllHistos(), CbmMcbm2018MonitorMuch::SaveAllHistos(), CbmMcbm2018MonitorMuchLite::SaveAllHistos(), Scale(), CbmLitClusteringQaReport::ScaleAndShrinkHistograms(), CbmStsDigitizeQaReport::ScaleHistograms(), ShrinkEmptyBinsH1(), CbmAnaJpsiTask::SignalAndBgReco(), CbmAnaJpsiSuperEventReport::SignalOverBg(), CbmAnaJpsiSuperEventReport::SignalOverBgAllSteps(), CbmAnaJpsiReport::SignalOverBgAllSteps(), CbmAnaJpsiTask::SingleParticleAcceptance(), CbmAnaJpsiTask::TrackSource(), and CbmRichUrqmdTest::Vertex().

◆ H1Vector()

◆ H2()

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

Return pointer to TH2 histogram.

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

Definition at line 190 of file CbmHistManager.h.

References fMap.

Referenced by CbmRichMCbmQaRichOnly::analyseRing(), CbmRichMCbmQaReal::analyseRing(), CbmRichAlignment::CalculateAnglesAndDrawDistrib(), CbmRichCorrectionVector::CalculateAnglesAndDrawDistrib(), CbmAnaJpsiTask::DifferenceSignalAndBg(), CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmRichAlignment::DrawFit(), CbmRichCorrectionVector::DrawFit(), CbmRichMCbmQa::DrawHist(), CbmRichRecoQa::DrawHist(), CbmPsdMCbmQaReal::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichPMTMapping::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichAlignment::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistMapping(), CbmRichGeoTestOpt::DrawMeanEff2D(), CbmRichGeoTestOpt::DrawMeanRms2D(), CbmLitFitQaReport::DrawResidualAndPullHistograms(), CbmLitClusteringQaReport::DrawResidualsAndPulls(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmLitTrackingQaReport::DrawYPt(), CbmRichMCbmQa::Exec(), CbmPsdMCbmQaReal::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmRichMCbmQaReal::Exec(), CbmLitFieldApproximationQa::FillFieldApproximationHistos(), CbmLitFieldApproximationQa::FillGridCreatorHistos(), CbmRichGeoTest::FillMcVsHitFitCircle(), CbmRichGeoTest::FillMcVsHitFitEllipse(), CbmAnaJpsiTask::FillPairHists(), CbmRichPMTMapping::FillPMTMap(), CbmRichCorrectionVector::FillPMTMap(), CbmRichPMTMapping::FillPMTMapEllipse(), CbmRichCorrectionVector::FillPMTMapEllipse(), CbmLitClusteringQa::FillResidualAndPullHistograms(), CbmLitFitQa::FillResidualsAndPulls(), CbmRichMirrorSortingCorrection::FillRingTrackDistance(), CbmRichRecoQa::FillRingTrackDistance(), CbmRichMirrorSortingCorrection::FillRingTrackDistanceCorr(), CbmTrdMCQa::Finish(), CbmRichGeoTest::FitAndFillHistCircle(), CbmRichGeoTest::FitAndFillHistEllipse(), CbmLitTofQaReport::FitHistograms(), CbmLitTofQa::FitHistograms(), CbmAnaDielectronTaskDraw::H2(), CbmSimulationReport::H2(), CbmAnaJpsiTask::MCPairs(), CbmRichUrqmdTest::NofHitsAndPoints(), CbmRichUrqmdTest::NofProjections(), CbmAnaJpsiTask::PairMcAndAcceptance(), CbmRichUrqmdTest::PmtXYSource(), CbmStsDigitizeQa::ProcessAngles(), CbmStsDigitizeQa::ProcessDigisAndPoints(), CbmRichGeoTest::ProcessHits(), CbmRichGeoTest::ProcessMc(), CbmTrdMCQa::ProcessPoints(), CbmAnaJpsiTask::RichPmtXY(), CbmRichMCbmAerogelAna::RichRings(), CbmRichMCbmQaRichOnly::RichRings(), CbmRichMCbmQaReal::RichRings(), CbmRichGeoTest::RingParameters(), ShrinkEmptyBinsH2(), CbmAnaJpsiTask::TrackSource(), and CbmRichUrqmdTest::Vertex().

◆ H2Vector()

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

Return vector of pointers to TH2 histogram.

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

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

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

◆ H3()

◆ NormalizeToIntegral()

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

Normalize histogram to integral.

Parameters
[in]histNameName of histogram.

Definition at line 229 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 234 of file core/base/CbmHistManager.cxx.

References H1Vector(), and NormalizeToIntegral().

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

◆ ObjectVector() [1/2]

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

◆ ObjectVector() [2/2]

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

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

References fMap.

◆ P1()

◆ P1Vector()

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

Return vector of pointers to TProfile.

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

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

◆ P2()

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

Return pointer to TH2 histogram.

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

Definition at line 283 of file CbmHistManager.h.

References fMap.

Referenced by CbmLitRadLengthQa::ExecDetector(), CbmLitRadLengthQa::FillHistosDetector(), CbmLitTrackingGeometryConstructor::GetMuchLayout(), CbmLitTrackingGeometryConstructor::GetRichMaterial(), and CbmLitTrackingGeometryConstructor::GetTrdLayout().

◆ P2Vector()

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

Return vector of pointers to TProfile2D.

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

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

◆ ReadFromFile()

◆ Rebin()

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

Rebin histogram.

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

Definition at line 242 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 250 of file core/base/CbmHistManager.cxx.

References H1Vector(), and Rebin().

Referenced by CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEventReport::Draw(), and CbmAnaJpsiSuperEvent::Draw().

◆ SaveCanvasToImage()

◆ Scale()

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

Scale histogram.

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

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

References H1().

Referenced by CbmTrdMCQa::Finish(), and ScaleByPattern().

◆ ScaleByPattern()

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

◆ ShrinkEmptyBinsH1()

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

Shrink empty bins in H1.

Parameters
[in]histNameName of histogram.

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

References H1(), max(), and min().

Referenced by ShrinkEmptyBinsH1ByPattern().

◆ ShrinkEmptyBinsH1ByPattern()

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

◆ ShrinkEmptyBinsH2()

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

Shrink empty bins in H2.

Parameters
[in]histNameName of histogram.

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

References H2(), max(), and min().

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 209 of file core/base/CbmHistManager.cxx.

References H1Vector(), and ShrinkEmptyBinsH2().

Referenced by CbmLitRadLengthQa::Finish(), and CbmLitClusteringQaReport::ScaleAndShrinkHistograms().

◆ ToString()

string CbmHistManager::ToString ( ) const

Return string representation of class.

Returns
string representation of class.

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

References fMap.

Referenced by CbmLitRadLengthQa::CreateHistograms(), CbmLitTrackingQa::CreateHistograms(), and CbmLitFieldApproximationQa::CreateHistos().

◆ WriteToFile()

Friends And Related Function 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 407 of file CbmHistManager.h.

Member Data Documentation

◆ fCanvases

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

Definition at line 440 of file CbmHistManager.h.

Referenced by CreateCanvas(), and SaveCanvasToImage().

◆ fMap

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

Definition at line 439 of file CbmHistManager.h.

Referenced by Add(), Clear(), Exists(), G1(), G2(), H1(), H2(), H3(), ObjectVector(), P1(), P2(), ToString(), and WriteToFile().


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