CbmRoot
CbmReport Class Referenceabstract

Base class for reports. More...

#include <CbmReport.h>

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

Public Member Functions

 CbmReport ()
 Constructor. More...
 
virtual ~CbmReport ()
 Destructor. More...
 
const CbmReportElementR () const
 Accessor to CbmReportElement object. User has to write the report using available tags from CbmReportElement class. More...
 
std::ostream & Out () const
 All text output goes to this stream. More...
 
void SetReportName (const std::string &name)
 
void SetReportTitle (const std::string &title)
 
void SetOutputDir (const std::string &outputDir)
 
const std::string & GetReportName () const
 
const std::string & GetReportTitle () const
 
const std::string & GetOutputDir () const
 

Protected Member Functions

virtual void Create ()=0
 Pure abstract function which is called from public Create() function. This function has to write report using Out() for output stream and R() for report elements. This function is called for each report type. More...
 
virtual void Draw ()=0
 Pure abstract function which is called from public Create() function. This function has to draw all necessary histograms and graphs. It is called only once before report creation. More...
 
void Draw (Option_t *)
 Inherited from TObject. This method is implemented in order to avoid warnings. More...
 
void CreateReports ()
 Create all available report types. More...
 
TCanvas * CreateCanvas (const char *name, const char *title, Int_t ww, Int_t wh)
 Create canvas and put it to vector of TCanvases. Canvases created with this function will be automatically saved to image and printed in the report. More...
 
void SaveCanvasesAsImages () const
 Save all canvases to images. More...
 
void WriteCanvases () const
 Write canvases to file. More...
 
void PrintCanvases () const
 Print images created from canvases in the report. More...
 

Private Member Functions

void CreateReportElement (ReportType reportType)
 Create concrete CbmReportElement instance based on report type. More...
 
void DeleteReportElement ()
 Delete report element. Normally should be called at the end of Create function. More...
 
 CbmReport (const CbmReport &)
 
CbmReportoperator= (const CbmReport &)
 

Private Attributes

std::string fReportName
 
std::string fReportTitle
 
std::string fOutputDir
 
ReportType fReportType
 
CbmReportElementfR
 
std::ostream * fOut
 
std::vector< TCanvas * > fCanvases
 

Detailed Description

Base class for reports.

Author
Andrey Lebedev andre.nosp@m.y.le.nosp@m.bedev.nosp@m.@gsi.nosp@m..de
Date
2011

Definition at line 35 of file CbmReport.h.

Constructor & Destructor Documentation

◆ CbmReport() [1/2]

CbmReport::CbmReport ( )

Constructor.

Definition at line 24 of file CbmReport.cxx.

◆ ~CbmReport()

CbmReport::~CbmReport ( )
virtual

Destructor.

Definition at line 34 of file CbmReport.cxx.

◆ CbmReport() [2/2]

CbmReport::CbmReport ( const CbmReport )
private

Member Function Documentation

◆ Create()

virtual void CbmReport::Create ( )
protectedpure virtual

◆ CreateCanvas()

TCanvas * CbmReport::CreateCanvas ( const char *  name,
const char *  title,
Int_t  ww,
Int_t  wh 
)
protected

Create canvas and put it to vector of TCanvases. Canvases created with this function will be automatically saved to image and printed in the report.

Definition at line 82 of file CbmReport.cxx.

References fCanvases.

Referenced by CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEventReport::Draw(), CbmAnaJpsiReport::Draw2DCut(), CbmStsDigitizeQaReport::Draw2dHistograms(), CbmLitTrackingQaReport::DrawAccAndRec(), CbmLitTrackingQaStudyReport::DrawAccAndRec(), CbmAnaJpsiReport::DrawAnalysisStepsH1(), CbmAnaJpsiReport::DrawAnalysisStepsH2(), CbmLitFieldApproximationQaReport::DrawApr(), CbmAnaDielectronStudyReportAll::DrawBgMinv(), CbmAnaJpsiReport::DrawBgSource2D(), CbmAnaJpsiSuperEventReport::DrawComparison(), CbmAnaJpsiReport::DrawCutH1(), CbmLitRadLengthQaReport::DrawDetector(), CbmLitTrackingQaReport::DrawEfficiency(), CbmLitTrackingQaStudyReport::DrawEfficiency(), CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmSimulationReport::DrawH2ByPattern(), CbmStsDigitizeQaReport::DrawHistograms(), CbmLitTrackingQaReport::DrawHitsHistos(), CbmStsDigitizeQaReport::DrawLogHistograms(), CbmAnaJpsiSuperEventReport::DrawMinvDiffPtBins(), CbmAnaJpsiReport::DrawMinvMismatchesAll(), CbmAnaJpsiSuperEventReport::DrawMinvMismatchPt(), CbmAnaJpsiReport::DrawMinvSAndBgAllSteps(), CbmAnaJpsiSuperEventReport::DrawMinvSignalBg(), CbmAnaJpsiReport::DrawMomEffAllSteps(), CbmAnaJpsiReport::DrawMomMcVsRec(), CbmStsDigitizeQaReport::DrawNofObjectsHistograms(), CbmLitClusteringQaReport::DrawNofObjectsHistograms(), CbmAnaJpsiSuperEventReport::DrawPairSource(), CbmAnaJpsiReport::DrawPairSource(), CbmLitTrackingQaReport::DrawPionSuppression(), CbmAnaJpsiReport::DrawPtYEfficiencyAll(), CbmLitFitQaReport::DrawResidualAndPullHistograms(), CbmLitClusteringQaReport::DrawResidualsAndPulls(), CbmAnaDielectronStudyReportAll::DrawSBgMinv(), CbmAnaJpsiReport::DrawSignalMinv(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmLitFitQaReport::DrawTrackMomentumAtVertex(), CbmLitFitQaReport::DrawTrackParams(), CbmLitFitQaStudyReport::DrawTrackParamsAtVertex(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmLitTrackingQaReport::DrawYPt(), CbmLitTofQaReport::FitHistograms(), CbmAnaJpsiSuperEventReport::SignalOverBgAllSteps(), and CbmAnaJpsiReport::SignalOverBgAllSteps().

◆ CreateReportElement()

void CbmReport::CreateReportElement ( ReportType  reportType)
private

Create concrete CbmReportElement instance based on report type.

Parameters
[in]reportTypeType of the report to be produced.

Definition at line 36 of file CbmReport.cxx.

References fOut, fR, fReportName, fReportType, GetOutputDir(), kCoutReport, kHtmlReport, kLatexReport, and kTextReport.

Referenced by CreateReports().

◆ CreateReports()

void CbmReport::CreateReports ( )
protected

Create all available report types.

Definition at line 60 of file CbmReport.cxx.

References Create(), CreateReportElement(), DeleteReportElement(), Draw(), kCoutReport, kHtmlReport, kLatexReport, kTextReport, and SaveCanvasesAsImages().

◆ DeleteReportElement()

void CbmReport::DeleteReportElement ( )
private

Delete report element. Normally should be called at the end of Create function.

Definition at line 55 of file CbmReport.cxx.

Referenced by CreateReports().

◆ Draw() [1/2]

virtual void CbmReport::Draw ( )
protectedpure virtual

◆ Draw() [2/2]

void CbmReport::Draw ( Option_t *  )
inlineprotected

Inherited from TObject. This method is implemented in order to avoid warnings.

Definition at line 87 of file CbmReport.h.

◆ GetOutputDir()

const std::string& CbmReport::GetOutputDir ( ) const
inline

Definition at line 66 of file CbmReport.h.

References fOutputDir.

Referenced by CreateReportElement(), SaveCanvasesAsImages(), and WriteCanvases().

◆ GetReportName()

◆ GetReportTitle()

const std::string& CbmReport::GetReportTitle ( ) const
inline

Definition at line 65 of file CbmReport.h.

References fReportTitle.

◆ operator=()

CbmReport& CbmReport::operator= ( const CbmReport )
private

◆ Out()

◆ PrintCanvases()

◆ R()

◆ SaveCanvasesAsImages()

void CbmReport::SaveCanvasesAsImages ( ) const
protected

Save all canvases to images.

Definition at line 91 of file CbmReport.cxx.

References fCanvases, GetOutputDir(), i, and Cbm::SaveCanvasAsImage().

Referenced by CreateReports().

◆ SetOutputDir()

void CbmReport::SetOutputDir ( const std::string &  outputDir)
inline

Definition at line 61 of file CbmReport.h.

References fOutputDir.

◆ SetReportName()

◆ SetReportTitle()

void CbmReport::SetReportTitle ( const std::string &  title)
inline

◆ WriteCanvases()

void CbmReport::WriteCanvases ( ) const
protected

Write canvases to file.

Definition at line 101 of file CbmReport.cxx.

References fCanvases, GetOutputDir(), and i.

Member Data Documentation

◆ fCanvases

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

Definition at line 140 of file CbmReport.h.

Referenced by CreateCanvas(), PrintCanvases(), SaveCanvasesAsImages(), and WriteCanvases().

◆ fOut

std::ostream* CbmReport::fOut
mutableprivate

Definition at line 135 of file CbmReport.h.

Referenced by CreateReportElement(), and Out().

◆ fOutputDir

std::string CbmReport::fOutputDir
private

Definition at line 132 of file CbmReport.h.

Referenced by GetOutputDir(), and SetOutputDir().

◆ fR

CbmReportElement* CbmReport::fR
private

Definition at line 134 of file CbmReport.h.

Referenced by CreateReportElement(), and R().

◆ fReportName

std::string CbmReport::fReportName
private

Definition at line 130 of file CbmReport.h.

Referenced by CreateReportElement(), GetReportName(), and SetReportName().

◆ fReportTitle

std::string CbmReport::fReportTitle
private

Definition at line 131 of file CbmReport.h.

Referenced by GetReportTitle(), and SetReportTitle().

◆ fReportType

ReportType CbmReport::fReportType
private

Definition at line 133 of file CbmReport.h.

Referenced by CreateReportElement().


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