23 template<
typename FigureType,
typename... Args>
25 figures_.emplace_back(static_cast<Figure*>(
new FigureType(
args...)));
26 return *
static_cast<FigureType*
>(
figures_.back().get());
30 const std::string &subdir =
"");
32 const std::vector<std::unique_ptr<Figure> > &
Figures()
const;
33 template<
typename FigureType>
35 FigureType *out =
nullptr;
37 if((out = dynamic_cast<FigureType*>(f->get())))
return out;
47 std::vector<std::unique_ptr<Figure> >
figures_;
std::vector< std::unique_ptr< Figure > > figures_
Figures to be produced.
Abstract base class for access to ntuple variables.
const std::vector< std::unique_ptr< Figure > > & Figures() const
FigureType & Push(Args &&...args)
std::set< Figure::FigureComponent * > GetComponents(const Process *process) const
Organizes efficient production of plots with single loop over each process.
PlotMaker()
Standard constructor.
PlotMaker & operator=(const PlotMaker &)=default
void Clear()
Empties list of plots to be produced at next PlotMaker::MakePlots call.
std::set< Baby * > GetBabies() const
std::set< const Process * > GetProcesses() const
long GetYield(Baby *baby_ptr)
void MakePlots(double luminosity, const std::string &subdir="")
Prints all added plots with given luminosity.