EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmReport Class Referenceabstract

Base class for reports. More...

#include <EicRoot/blob/master/cbmbase/report/CbmReport.h>

+ Inheritance diagram for CbmReport:
+ Collaboration diagram for CbmReport:

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.
 
ostream & Out () const
 All text output goes to this stream.
 
void SetReportName (const string &name)
 
void SetReportTitle (const string &title)
 
void SetOutputDir (const string &outputDir)
 
const string & GetReportName () const
 
const string & GetReportTitle () const
 
const 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 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

string fReportName
 
string fReportTitle
 
string fOutputDir
 
ReportType fReportType
 
CbmReportElementfR
 
ostream * fOut
 
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.

View newest version in sPHENIX GitHub at line 35 of file CbmReport.h

Constructor & Destructor Documentation

CbmReport::CbmReport ( )

Constructor.

Definition at line 18 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 18 of file CbmReport.cxx

CbmReport::~CbmReport ( )
virtual

Destructor.

Definition at line 29 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 29 of file CbmReport.cxx

CbmReport::CbmReport ( const CbmReport )
private

Member Function Documentation

virtual void CbmReport::Create ( )
protectedpure virtual

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.

Implemented in CbmRichGeoTestStudyReport.

Referenced by CreateReports().

+ Here is the caller graph for this function:

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 83 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 83 of file CbmReport.cxx

References fCanvases.

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 33 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 33 of file CbmReport.cxx

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

Referenced by CreateReports().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CbmReport::CreateReports ( )
protected

Create all available report types.

Definition at line 60 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 60 of file CbmReport.cxx

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

Referenced by CbmStudyReport::Create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CbmReport::DeleteReportElement ( )
private

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

Definition at line 54 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 54 of file CbmReport.cxx

Referenced by CreateReports().

+ Here is the caller graph for this function:

virtual void CbmReport::Draw ( )
protectedpure virtual

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.

Implemented in CbmRichGeoTestStudyReport.

Referenced by CreateReports().

+ Here is the caller graph for this function:

const string& CbmReport::GetOutputDir ( ) const
inline

Definition at line 66 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 66 of file CbmReport.h

References fOutputDir.

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

+ Here is the caller graph for this function:

const string& CbmReport::GetReportName ( ) const
inline

Definition at line 64 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 64 of file CbmReport.h

References fReportName.

const string& CbmReport::GetReportTitle ( ) const
inline

Definition at line 65 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 65 of file CbmReport.h

References fReportTitle.

CbmReport& CbmReport::operator= ( const CbmReport )
private
ostream& CbmReport::Out ( ) const
inline

All text output goes to this stream.

Definition at line 56 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 56 of file CbmReport.h

References fOut.

Referenced by CbmRichGeoTestStudyReport::Create(), and PrintCanvases().

+ Here is the caller graph for this function:

void CbmReport::PrintCanvases ( ) const
protected

Print images created from canvases in the report.

Definition at line 115 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 115 of file CbmReport.cxx

References fCanvases, CbmReportElement::Image(), Out(), and R().

+ Here is the call graph for this function:

const CbmReportElement* CbmReport::R ( ) const
inline

Accessor to CbmReportElement object. User has to write the report using available tags from CbmReportElement class.

Definition at line 51 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 51 of file CbmReport.h

References fR.

Referenced by CbmRichGeoTestStudyReport::Create(), PrintCanvases(), and CbmRichGeoTestStudyReport::PrintRow().

+ Here is the caller graph for this function:

void CbmReport::SaveCanvasesAsImages ( ) const
protected

Save all canvases to images.

Definition at line 94 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 94 of file CbmReport.cxx

References fCanvases, and GetOutputDir().

Referenced by CreateReports().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 61 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 61 of file CbmReport.h

References fOutputDir.

Referenced by CbmStudyReport::Create().

+ Here is the caller graph for this function:

void CbmReport::SetReportName ( const string &  name)
inline

Definition at line 59 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 59 of file CbmReport.h

References fReportName, and name.

Referenced by CbmRichGeoTestStudyReport::CbmRichGeoTestStudyReport().

+ Here is the caller graph for this function:

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

Definition at line 60 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 60 of file CbmReport.h

References fReportTitle, and title().

+ Here is the call graph for this function:

void CbmReport::WriteCanvases ( ) const
protected

Write canvases to file.

Definition at line 106 of file CbmReport.cxx.

View newest version in sPHENIX GitHub at line 106 of file CbmReport.cxx

References fCanvases, and GetOutputDir().

+ Here is the call graph for this function:

Member Data Documentation

vector<TCanvas*> CbmReport::fCanvases
private

Definition at line 137 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 137 of file CbmReport.h

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

ostream* CbmReport::fOut
mutableprivate

Definition at line 132 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 132 of file CbmReport.h

Referenced by CreateReportElement(), and Out().

string CbmReport::fOutputDir
private

Definition at line 129 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 129 of file CbmReport.h

Referenced by GetOutputDir(), and SetOutputDir().

CbmReportElement* CbmReport::fR
private

Definition at line 131 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 131 of file CbmReport.h

Referenced by CreateReportElement(), and R().

string CbmReport::fReportName
private

Definition at line 127 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 127 of file CbmReport.h

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

string CbmReport::fReportTitle
private

Definition at line 128 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 128 of file CbmReport.h

Referenced by GetReportTitle(), and SetReportTitle().

ReportType CbmReport::fReportType
private

Definition at line 130 of file CbmReport.h.

View newest version in sPHENIX GitHub at line 130 of file CbmReport.h

Referenced by CreateReportElement().


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