CbmRoot
Loading...
Searching...
No Matches
cbm::qa::report::Figure Class Reference

Figure in the report. More...

#include <CbmQaReportFigure.h>

Inheritance diagram for cbm::qa::report::Figure:
[legend]
Collaboration diagram for cbm::qa::report::Figure:
[legend]

Classes

struct  Plot
 A structure to handle the plot details. More...
 

Public Member Functions

 Figure (std::string_view label, std::string_view title="")
 Constructor.
 
virtual ~Figure ()=default
 Destructor.
 
void AddPlot (std::string_view path, std::string_view caption="", std::string_view label="")
 Add plot.
 
std::string GetBody (const Engine &engine) const override
 Gets body of the element.
 
const std::string & GetCaption () const
 Gets caption.
 
const std::vector< size_t > & GetPlotGrid () const
 Gets plot grid.
 
const std::vector< Plot > & GetPlots () const
 Gets plot vector.
 
void SetCaption (std::string_view caption)
 Sets caption.
 
void SetPlotGrid (size_t nX, size_t nY)
 Sets plot grid.
 
void SetPlotGrid (const std::vector< size_t > &grid)
 Set plot grid.
 
const std::string & GetLabel () const
 Gets label.
 
const std::string & GetTitle () const
 Gets name.
 
void SetLabel (std::string_view label)
 Sets label.
 
void SetTitle (std::string_view title)
 Sets name.
 
const ElementGetMother () const
 Gets mother element.
 

Private Member Functions

void AssignMother (const Element *pMother)
 

Private Attributes

std::vector< PlotfvsPlots {}
 Vector of plots (subfigures)
 
std::vector< size_t > fvGrid {}
 Plot grid.
 
std::string fsCaption {}
 Figure caption.
 
const ElementfpMother = nullptr
 Mother element.
 
std::string fsLabel = ""
 Label for referencing.
 
std::string fsTitle = ""
 Title of the element.
 

Detailed Description

Figure in the report.

Definition at line 19 of file CbmQaReportFigure.h.

Constructor & Destructor Documentation

◆ Figure()

cbm::qa::report::Figure::Figure ( std::string_view label,
std::string_view title = "" )
inline

Constructor.

Parameters
labelLabel of the element
titleTitle

Definition at line 42 of file CbmQaReportFigure.h.

◆ ~Figure()

virtual cbm::qa::report::Figure::~Figure ( )
virtualdefault

Destructor.

Member Function Documentation

◆ AddPlot()

void cbm::qa::report::Figure::AddPlot ( std::string_view path,
std::string_view caption = "",
std::string_view label = "" )
inline

Add plot.

Parameters
pathto the plot
captioncaption of the plot
labellabel of the plot

Definition at line 54 of file CbmQaReportFigure.h.

References fvsPlots.

◆ AssignMother()

void cbm::qa::report::Element::AssignMother ( const Element * pMother)
inlineprivateinherited

Definition at line 60 of file CbmQaReportElement.h.

References cbm::qa::report::Element::fpMother.

◆ GetBody()

std::string cbm::qa::report::Figure::GetBody ( const Engine & engine) const
inlineoverridevirtual

Gets body of the element.

Parameters
engineA concrete implementation of the Engine to get the element body

Implements cbm::qa::report::Element.

Definition at line 61 of file CbmQaReportFigure.h.

References cbm::qa::report::Engine::FigureBody().

◆ GetCaption()

const std::string & cbm::qa::report::Figure::GetCaption ( ) const
inline

◆ GetLabel()

◆ GetMother()

const Element * cbm::qa::report::Element::GetMother ( ) const
inlineinherited

◆ GetPlotGrid()

const std::vector< size_t > & cbm::qa::report::Figure::GetPlotGrid ( ) const
inline

Gets plot grid.

Definition at line 67 of file CbmQaReportFigure.h.

References fvGrid.

Referenced by cbm::qa::report::BeamerEngine::FigureBody(), and cbm::qa::report::LatexEngine::FigureBody().

◆ GetPlots()

const std::vector< Plot > & cbm::qa::report::Figure::GetPlots ( ) const
inline

◆ GetTitle()

◆ SetCaption()

void cbm::qa::report::Figure::SetCaption ( std::string_view caption)
inline

Sets caption.

Definition at line 73 of file CbmQaReportFigure.h.

References fsCaption.

◆ SetLabel()

void cbm::qa::report::Element::SetLabel ( std::string_view label)
inlineinherited

Sets label.

Definition at line 51 of file CbmQaReportElement.h.

References cbm::qa::report::Element::fsLabel.

◆ SetPlotGrid() [1/2]

void cbm::qa::report::Figure::SetPlotGrid ( const std::vector< size_t > & grid)
inline

Set plot grid.

Parameters
gridGrid {X1, X2, ..., Xn}, where Xi – number of plots in the ith line

Definition at line 86 of file CbmQaReportFigure.h.

References fvGrid.

◆ SetPlotGrid() [2/2]

void cbm::qa::report::Figure::SetPlotGrid ( size_t nX,
size_t nY )
inline

Sets plot grid.

Parameters
nXNumber of plots along the horizontal direction
nYNumber of plots along the vertical direction

Definition at line 78 of file CbmQaReportFigure.h.

References fvGrid.

◆ SetTitle()

void cbm::qa::report::Element::SetTitle ( std::string_view title)
inlineinherited

Sets name.

Definition at line 54 of file CbmQaReportElement.h.

References cbm::qa::report::Element::fsTitle.

Member Data Documentation

◆ fpMother

const Element* cbm::qa::report::Element::fpMother = nullptr
privateinherited

Mother element.

Definition at line 63 of file CbmQaReportElement.h.

Referenced by cbm::qa::report::Element::AssignMother(), and cbm::qa::report::Element::GetMother().

◆ fsCaption

std::string cbm::qa::report::Figure::fsCaption {}
private

Figure caption.

Definition at line 91 of file CbmQaReportFigure.h.

Referenced by GetCaption(), and SetCaption().

◆ fsLabel

std::string cbm::qa::report::Element::fsLabel = ""
privateinherited

Label for referencing.

Definition at line 64 of file CbmQaReportElement.h.

Referenced by cbm::qa::report::Element::GetLabel(), and cbm::qa::report::Element::SetLabel().

◆ fsTitle

std::string cbm::qa::report::Element::fsTitle = ""
privateinherited

Title of the element.

Definition at line 65 of file CbmQaReportElement.h.

Referenced by cbm::qa::report::Element::GetTitle(), and cbm::qa::report::Element::SetTitle().

◆ fvGrid

std::vector<size_t> cbm::qa::report::Figure::fvGrid {}
private

Plot grid.

Definition at line 90 of file CbmQaReportFigure.h.

Referenced by GetPlotGrid(), SetPlotGrid(), and SetPlotGrid().

◆ fvsPlots

std::vector<Plot> cbm::qa::report::Figure::fvsPlots {}
private

Vector of plots (subfigures)

Definition at line 89 of file CbmQaReportFigure.h.

Referenced by AddPlot(), and GetPlots().


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