Rivet::ProjectionApplier Class Referenceabstract

Common base class for Projection and Analysis, used for internal polymorphism. More...

`#include <ProjectionApplier.hh>`

Inheritance diagram for Rivet::ProjectionApplier:

## Public Member Functions

| ProjectionApplier ()
| Constructor.
Metadata functions
virtual std::string | name () const =0
| Get the name of this Projection or Analysis class.
Projection "getting" functions
std::set< ConstProjectionPtr > | getProjections () const
| Get the contained projections, including recursion.
template<typename PROJ >
const PROJ & | getProjection (const std::string &name) const
| Get the named projection, specifying return type via a template argument.
const Projection & | getProjection (const std::string &name) const
Projection applying functions
template<typename PROJ >
const PROJ & | applyProjection (const Event &evt, const PROJ &proj) const
| Apply the supplied projection on event.
template<typename PROJ >
const PROJ & | applyProjection (const Event &evt, const Projection &proj) const
| Apply the supplied projection on event.
template<typename PROJ >
const PROJ & | applyProjection (const Event &evt, const std::string &name) const
| Apply the named projection on event.

## Protected Member Functions

Log & | getLog () const
ProjectionHandler & | getProjHandler () const
| Get a reference to the ProjectionHandler for this thread.
Projection registration functions
template<typename PROJ >
const PROJ & | addProjection (const PROJ &proj, const std::string &name)

## Detailed Description

Common base class for Projection and Analysis, used for internal polymorphism.

Empty interface used for storing Projection and Analysis pointers in the same container (used by the ProjectionHandler)

## Member Function Documentation

template<typename PROJ >

const PROJ& Rivet::ProjectionApplier::addProjection | ( | const PROJ & | proj,
|  | const std::string & | name
| ) |  |

inline protected

Register a contained projection. The type of the argument is used to instantiate a new projection internally: this new object is applied to events rather than the argument object. Hence you are advised to only use locally-scoped Projection objects in your Projection and Analysis constructors, and to avoid polymorphism (e.g. handling `ConcreteProjection` via a pointer or reference to type `Projection`) since this will screw up the internal type management.

Referenced by Rivet::VetoedFinalState::addVetoOnThisFinalState(), Rivet::CentralEtHCM::CentralEtHCM(), Rivet::ChargedFinalState::ChargedFinalState(), Rivet::ChargedLeptons::ChargedLeptons(), Rivet::DISFinalState::DISFinalState(), Rivet::DISKinematics::DISKinematics(), Rivet::FinalState::FinalState(), Rivet::FoxWolframMoments::FoxWolframMoments(), Rivet::FParameter::FParameter(), Rivet::HadronicFinalState::HadronicFinalState(), Rivet::Hemispheres::Hemispheres(), Rivet::IdentifiedFinalState::IdentifiedFinalState(), Rivet::IsolationProjection< PROJ1, PROJ2, EST >::IsolationProjection(), Rivet::JetAlg::JetAlg(), Rivet::JetShape::JetShape(), Rivet::LeadingParticlesFinalState::LeadingParticlesFinalState(), Rivet::LossyFinalState< ConstRandomFilter >::LossyFinalState(), Rivet::MissingMomentum::MissingMomentum(), Rivet::Multiplicity::Multiplicity(), Rivet::NonHadronicFinalState::NonHadronicFinalState(), Rivet::ParisiTensor::ParisiTensor(), Rivet::Spherocity::Spherocity(), Rivet::TotalVisibleMomentum::TotalVisibleMomentum(), Rivet::TriggerCDFRun0Run1::TriggerCDFRun0Run1(), Rivet::TriggerCDFRun2::TriggerCDFRun2(), Rivet::TriggerUA5::TriggerUA5(), Rivet::VetoedFinalState::VetoedFinalState(), and Rivet::VisibleFinalState::VisibleFinalState().

const Projection& Rivet::ProjectionApplier::getProjection | ( | const std::string & | name | ) | const

inline

Get the named projection (non-templated, so returns as a reference to a Projection base class).

References Rivet::ProjectionHandler::getProjection(), and getProjHandler().

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

- include/Rivet/ProjectionApplier.hh
- src/Core/ProjectionApplier.cc