ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
PlotMaker Class Reference

Organizes efficient production of plots with single loop over each process. More...

#include <plot_maker.hpp>

Public Member Functions

 PlotMaker ()
 Standard constructor. More...
 
 PlotMaker (const PlotMaker &)=default
 
PlotMakeroperator= (const PlotMaker &)=default
 
 PlotMaker (PlotMaker &&)=default
 
PlotMakeroperator= (PlotMaker &&)=default
 
 ~PlotMaker ()=default
 
template<typename FigureType , typename... Args>
FigureType & Push (Args &&...args)
 
void MakePlots (double luminosity, const std::string &subdir="")
 Prints all added plots with given luminosity. More...
 
const std::vector< std::unique_ptr< Figure > > & Figures () const
 
template<typename FigureType >
FigureType * GetLast ()
 
void Clear ()
 Empties list of plots to be produced at next PlotMaker::MakePlots call. More...
 

Public Attributes

bool multithreaded_
 
bool min_print_
 

Private Member Functions

void GetYields ()
 
long GetYield (Baby *baby_ptr)
 
std::set< Baby * > GetBabies () const
 
std::set< const Process * > GetProcesses () const
 
std::set< Figure::FigureComponent * > GetComponents (const Process *process) const
 

Private Attributes

std::vector< std::unique_ptr< Figure > > figures_
 Figures to be produced. More...
 

Detailed Description

Organizes efficient production of plots with single loop over each process.

HistoStacks are added to the PlotMaker using PlotMaker::AddPlot(). Once all desired plots have been added, a call to PlotMaker::MakePlots() determines the full set of Processes used by all plots, loops once over each Process to fill all histograms using that Process, and then prints the plots.

Definition at line 14 of file plot_maker.hpp.

Constructor & Destructor Documentation

PlotMaker::PlotMaker ( )

Standard constructor.

Definition at line 44 of file plot_maker.cpp.

PlotMaker::PlotMaker ( const PlotMaker )
default
PlotMaker::PlotMaker ( PlotMaker &&  )
default
PlotMaker::~PlotMaker ( )
default

Member Function Documentation

void PlotMaker::Clear ( )

Empties list of plots to be produced at next PlotMaker::MakePlots call.

Definition at line 69 of file plot_maker.cpp.

References figures_.

Referenced by GetLast().

const vector< unique_ptr< Figure > > & PlotMaker::Figures ( ) const

Definition at line 63 of file plot_maker.cpp.

References figures_.

Referenced by main(), and Push().

set< Baby * > PlotMaker::GetBabies ( ) const
private

Definition at line 186 of file plot_maker.cpp.

References GetProcesses().

Referenced by GetYields().

set< Figure::FigureComponent * > PlotMaker::GetComponents ( const Process process) const
private

Definition at line 206 of file plot_maker.cpp.

References figures_.

Referenced by GetYield().

template<typename FigureType >
FigureType* PlotMaker::GetLast ( )
inline

Definition at line 34 of file plot_maker.hpp.

References Clear(), and figures_.

Referenced by main().

set< const Process * > PlotMaker::GetProcesses ( ) const
private

Definition at line 196 of file plot_maker.cpp.

References figures_.

Referenced by GetBabies().

long PlotMaker::GetYield ( Baby baby_ptr)
private
void PlotMaker::GetYields ( )
private

Definition at line 73 of file plot_maker.cpp.

References AddCommas(), GetBabies(), GetYield(), HoursMinSec(), min_print_, multithreaded_, and RoundNumber().

Referenced by MakePlots().

void PlotMaker::MakePlots ( double  luminosity,
const std::string &  subdir = "" 
)

Prints all added plots with given luminosity.

Parameters
[in]luminosityIntegrated luminosity with which to draw plots

Definition at line 54 of file plot_maker.cpp.

References figures_, and GetYields().

Referenced by main(), and Push().

PlotMaker& PlotMaker::operator= ( const PlotMaker )
default
PlotMaker& PlotMaker::operator= ( PlotMaker &&  )
default
template<typename FigureType , typename... Args>
FigureType& PlotMaker::Push ( Args &&...  args)
inline

Definition at line 24 of file plot_maker.hpp.

References compile::args, Figures(), figures_, and MakePlots().

Referenced by addSlices(), and main().

Member Data Documentation

std::vector<std::unique_ptr<Figure> > PlotMaker::figures_
private

Figures to be produced.

Definition at line 47 of file plot_maker.hpp.

Referenced by Clear(), Figures(), GetComponents(), GetLast(), GetProcesses(), MakePlots(), and Push().

bool PlotMaker::min_print_

Definition at line 44 of file plot_maker.hpp.

Referenced by GetYield(), GetYields(), and main().

bool PlotMaker::multithreaded_

Definition at line 43 of file plot_maker.hpp.

Referenced by GetYields(), and main().


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