CbmRoot
Loading...
Searching...
No Matches
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.
 
virtual ~CbmReport ()
 Destructor.
 
const CbmReportElementR () const
 Accessor to CbmReportElement object. User has to write the report using available tags from CbmReportElement class.
 
std::ostream & Out () const
 All text output goes to this stream.
 
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.
 
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.
 
void Draw (Option_t *)
 Inherited from TObject. This method is implemented in order to avoid warnings.
 
void CreateReports ()
 Create all available report types.
 
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.
 
void SaveCanvasesAsImages () const
 Save all canvases to images.
 
void WriteCanvases () const
 Write canvases to file.
 
void PrintCanvases () const
 Print images created from canvases in the report.
 

Private Member Functions

void CreateReportElement (ReportType reportType)
 Create concrete CbmReportElement instance based on report type.
 
void DeleteReportElement ()
 Delete report element. Normally should be called at the end of Create function.
 
 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 45 of file CbmReport.h.

Constructor & Destructor Documentation

◆ CbmReport() [1/2]

CbmReport::CbmReport ( )

Constructor.

Definition at line 28 of file CbmReport.cxx.

◆ ~CbmReport()

CbmReport::~CbmReport ( )
virtual

Destructor.

Definition at line 40 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 94 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(), CbmLitFieldQaReport::DrawFieldAlongZ(), CbmLitFieldQaReport::DrawFieldRichPmtPlane(), CbmLitFieldQaReport::DrawFieldSlices(), CbmSimulationReport::DrawH2ByPattern(), CbmStsDigitizeQaReport::DrawHistograms(), CbmLitTrackingQaReport::DrawHitsHistos(), CbmStsDigitizeQaReport::DrawLogHistograms(), CbmAnaJpsiSuperEventReport::DrawMinvDiffPtBins(), CbmAnaJpsiReport::DrawMinvMismatchesAll(), CbmAnaJpsiSuperEventReport::DrawMinvMismatchPt(), CbmAnaJpsiReport::DrawMinvSAndBgAllSteps(), CbmAnaJpsiSuperEventReport::DrawMinvSignalBg(), CbmAnaJpsiReport::DrawMomEffAllSteps(), CbmAnaJpsiReport::DrawMomMcVsRec(), CbmLitClusteringQaReport::DrawNofObjectsHistograms(), CbmStsDigitizeQaReport::DrawNofObjectsHistograms(), CbmAnaJpsiReport::DrawPairSource(), CbmAnaJpsiSuperEventReport::DrawPairSource(), CbmLitTrackingQaReport::DrawPionSuppression(), CbmAnaJpsiReport::DrawPtYEfficiencyAll(), CbmLitFitQaReport::DrawResidualAndPullHistograms(), CbmLitClusteringQaReport::DrawResidualsAndPulls(), CbmAnaJpsiReport::DrawSignalMinv(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmLitFitQaReport::DrawTrackMomentumAtVertex(), CbmLitFitQaReport::DrawTrackParams(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmLitFitQaStudyReport::DrawTrackParamsAtVertex(), CbmLitTrackingQaReport::DrawYPt(), CbmLitTofQaReport::FitHistograms(), CbmAnaJpsiReport::SignalOverBgAllSteps(), and CbmAnaJpsiSuperEventReport::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 42 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 71 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 65 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 97 of file CbmReport.h.

◆ GetOutputDir()

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

Definition at line 76 of file CbmReport.h.

References fOutputDir.

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

◆ GetReportName()

◆ GetReportTitle()

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

Definition at line 75 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 101 of file CbmReport.cxx.

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

Referenced by CreateReports().

◆ SetOutputDir()

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

Definition at line 71 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 112 of file CbmReport.cxx.

References fCanvases, and GetOutputDir().

Member Data Documentation

◆ fCanvases

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

Definition at line 149 of file CbmReport.h.

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

◆ fOut

std::ostream* CbmReport::fOut
mutableprivate

Definition at line 144 of file CbmReport.h.

Referenced by CreateReportElement(), and Out().

◆ fOutputDir

std::string CbmReport::fOutputDir
private

Definition at line 141 of file CbmReport.h.

Referenced by GetOutputDir(), and SetOutputDir().

◆ fR

CbmReportElement* CbmReport::fR
private

Definition at line 143 of file CbmReport.h.

Referenced by CreateReportElement(), and R().

◆ fReportName

std::string CbmReport::fReportName
private

Definition at line 139 of file CbmReport.h.

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

◆ fReportTitle

std::string CbmReport::fReportTitle
private

Definition at line 140 of file CbmReport.h.

Referenced by GetReportTitle(), and SetReportTitle().

◆ fReportType

ReportType CbmReport::fReportType
private

Definition at line 142 of file CbmReport.h.

Referenced by CreateReportElement().


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