EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CbmReport.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CbmReport.h
1
8
#ifndef CBMREPORT_H_
9
#define CBMREPORT_H_
10
11
#include "TObject.h"
12
#include <iostream>
13
#include <string>
14
#include <vector>
15
class
CbmReportElement
;
16
class
TCanvas;
17
using
std::string;
18
using
std::vector
;
19
using
std::ostream;
20
27
enum
ReportType
{
kCoutReport
,
kHtmlReport
,
kLatexReport
,
kTextReport
};
28
35
class
CbmReport
:
public
TObject
{
36
public
:
40
CbmReport
();
41
45
virtual
~CbmReport
();
46
51
const
CbmReportElement
*
R
()
const
{
return
fR
; }
52
56
ostream&
Out
()
const
{
return
*
fOut
; }
57
58
/* Setters */
59
void
SetReportName
(
const
string
&
name
) {
fReportName
=
name
; }
60
void
SetReportTitle
(
const
string
&
title
) {
fReportTitle
=
title
; }
61
void
SetOutputDir
(
const
string
& outputDir) {
fOutputDir
= outputDir; }
62
63
/* Accessors */
64
const
string
&
GetReportName
()
const
{
return
fReportName
; }
65
const
string
&
GetReportTitle
()
const
{
return
fReportTitle
; }
66
const
string
&
GetOutputDir
()
const
{
return
fOutputDir
; }
67
68
protected
:
74
virtual
void
Create
() = 0;
75
81
virtual
void
Draw
() = 0;
82
86
void
CreateReports
();
87
93
TCanvas*
CreateCanvas
(
94
const
char
*
name
,
95
const
char
*
title
,
96
Int_t ww,
97
Int_t wh);
98
102
void
SaveCanvasesAsImages
()
const
;
103
107
void
WriteCanvases
()
const
;
108
112
void
PrintCanvases
()
const
;
113
114
private
:
119
void
CreateReportElement
(
120
ReportType
reportType);
121
125
void
DeleteReportElement
();
126
127
string
fReportName
;
// Name of report
128
string
fReportTitle
;
// Title of report
129
string
fOutputDir
;
// Output directory for the report files
130
ReportType
fReportType
;
// Current report type
131
CbmReportElement
*
fR
;
// Report element tool
132
mutable
ostream*
fOut
;
// Output stream
133
134
// Storage for TCanvas. All Canvases in this vector will be automatically saved
135
// to image and printed in the report.
136
// User can use CreateCanvas function which automatically push created canvas in this vector.
137
vector<TCanvas*>
fCanvases
;
138
139
//private:
140
141
CbmReport
(
const
CbmReport
&);
142
CbmReport
&
operator=
(
const
CbmReport
&);
143
144
ClassDef(
CbmReport
, 1)
145
};
146
147
#endif
/* CBMREPORT_H_ */
EicRoot
blob
master
cbmbase
report
CbmReport.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration