2 #ifndef RIVET_ProjectionApplier_HH 3 #define RIVET_ProjectionApplier_HH 5 #include "Rivet/Rivet.hh" 6 #include "Rivet/Event.fhh" 7 #include "Rivet/Projection.fhh" 8 #include "Rivet/ProjectionHandler.hh" 9 #include "Rivet/Tools/Logging.hh" 35 virtual std::string
name()
const = 0;
48 template <
typename PROJ>
51 return pcast<PROJ>(p);
65 template <
typename PROJ>
68 return pcast<PROJ>(_applyProjection(evt, proj));
73 template <
typename PROJ>
75 return pcast<PROJ>(_applyProjection(evt, proj));
80 template <
typename PROJ>
82 return pcast<PROJ>(_applyProjection(evt, name));
112 template <
typename PROJ>
114 const Projection& reg = _addProjection(proj, name);
115 const PROJ& rtn =
dynamic_cast<const PROJ&
>(reg);
130 const Projection& _applyProjection(
const Event& evt,
const std::string& name)
const;
Definition: MC_JetAnalysis.hh:9
const Projection & getProjection(const std::string &name) const
Definition: ProjectionApplier.hh:57
const PROJ & applyProjection(const Event &evt, const Projection &proj) const
Apply the supplied projection on event.
Definition: ProjectionApplier.hh:74
const PROJ & getProjection(const std::string &name) const
Get the named projection, specifying return type via a template argument.
Definition: ProjectionApplier.hh:49
static Log & getLog(const std::string &name)
Definition: Logging.cc:55
virtual std::string name() const =0
Get the name of this Projection or Analysis class.
The projection handler is a central repository for projections to be used in a Rivet analysis run...
Definition: ProjectionHandler.hh:41
const PROJ & applyProjection(const Event &evt, const PROJ &proj) const
Apply the supplied projection on event.
Definition: ProjectionApplier.hh:67
const Projection & getProjection(const ProjectionApplier &parent, const string &name) const
Definition: ProjectionHandler.cc:258
Common base class for Projection and Analysis, used for internal polymorphism.
Definition: ProjectionApplier.hh:18
std::set< ConstProjectionPtr > getProjections() const
Get the contained projections, including recursion.
Definition: ProjectionApplier.hh:42
ProjectionHandler & getProjHandler() const
Get a reference to the ProjectionHandler for this thread.
Definition: ProjectionApplier.hh:94
set< const Projection * > getChildProjections(const ProjectionApplier &parent, ProjDepth depth=SHALLOW) const
Definition: ProjectionHandler.cc:233
const PROJ & applyProjection(const Event &evt, const std::string &name) const
Apply the named projection on event.
Definition: ProjectionApplier.hh:81
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
ProjectionApplier()
Constructor.
Definition: ProjectionApplier.cc:10
Base class for all Rivet projections.
Definition: Projection.hh:28