ra4_draw
4bd0201e3d922d42bd545d4b045ed44db33454a4
|
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 | |
PlotMaker & | operator= (const PlotMaker &)=default |
PlotMaker (PlotMaker &&)=default | |
PlotMaker & | operator= (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... | |
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.
PlotMaker::PlotMaker | ( | ) |
Standard constructor.
Definition at line 44 of file plot_maker.cpp.
|
default |
|
default |
|
default |
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_.
|
private |
Definition at line 186 of file plot_maker.cpp.
References GetProcesses().
Referenced by GetYields().
|
private |
|
inline |
Definition at line 34 of file plot_maker.hpp.
References Clear(), and figures_.
Referenced by main().
|
private |
|
private |
Definition at line 120 of file plot_maker.cpp.
References Baby::Activate(), Basename(), Baby::FileNames(), GetComponents(), Baby::GetEntries(), Baby::GetEntry(), HavePass(), Timer::Iterate(), min_print_, anonymous_namespace{plot_maker.cpp}::print_mutex, Baby::processes_, and run_2016-06-03_freeze_preapp_all_preds::tag.
Referenced by 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.
[in] | luminosity | Integrated luminosity with which to draw plots |
Definition at line 54 of file plot_maker.cpp.
References figures_, and GetYields().
|
inline |
Definition at line 24 of file plot_maker.hpp.
References compile::args, Figures(), figures_, and MakePlots().
Referenced by addSlices(), and main().
|
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().