2#ifndef RIVET_AnalysisBuilder_HH
3#define RIVET_AnalysisBuilder_HH
5#include "Rivet/Config/RivetCommon.hh"
6#include "Rivet/AnalysisLoader.hh"
7#include "Rivet/Tools/Logging.hh"
19 class AnalysisBuilderBase {
23 AnalysisBuilderBase() =
default;
26 AnalysisBuilderBase(
const string& alias)
30 virtual ~AnalysisBuilderBase() =
default;
33 virtual unique_ptr<Analysis> mkAnalysis()
const = 0;
37 auto a = mkAnalysis();
44 const string& alias()
const {
52 AnalysisLoader::_registerBuilder(
this);
65 class AnalysisBuilder :
public AnalysisBuilderBase {
72 AnalysisBuilder(
const string& alias)
73 : AnalysisBuilderBase(alias)
78 unique_ptr<Analysis> mkAnalysis()
const {
79 return unique_ptr<T>(
new T);
Definition MC_CENT_PPB_Projections.hh:10