2 #ifndef RIVET_Projection_HH 3 #define RIVET_Projection_HH 5 #include "Rivet/Projection.fhh" 6 #include "Rivet/ProjectionApplier.hh" 7 #include "Rivet/ProjectionHandler.hh" 8 #include "Rivet/Config/RivetCommon.hh" 9 #include "Rivet/Tools/Cuts.hh" 47 virtual unique_ptr<Projection>
clone()
const = 0;
56 virtual std::string
name()
const {
111 virtual const std::set<PdgIdPair>
beamPairs()
const;
117 _beamPairs.insert(PdgIdPair(beam1, beam2));
128 string logname =
"Rivet.Projection." +
name();
159 set<PdgIdPair> _beamPairs;
168 inline bool std::less<const Rivet::Projection *>::operator()(
const Rivet::Projection* x,
177 #include "Rivet/Event.hh" 178 #include "Rivet/Particle.hh" 179 #include "Rivet/Tools/Cmp.hh" 184 #define DEFAULT_RIVET_PROJ_CLONE(clsname) \ 185 virtual unique_ptr<Projection> clone() const { return unique_ptr<Projection>(new clsname(*this)); } void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:133
Definition: ALICE_2010_I880049.cc:13
virtual Projection & operator=(const Projection &)
Block Projection copying.
Definition: Projection.cc:21
Projection()
The default constructor.
Definition: Projection.cc:11
virtual unique_ptr< Projection > clone() const =0
Clone on the heap.
static Log & getLog(const std::string &name)
Definition: Logging.cc:55
virtual int compare(const Projection &p) const =0
virtual void project(const Event &e)=0
Projection & addPdgIdPair(PdgId beam1, PdgId beam2)
Definition: Projection.hh:116
Cmp< Projection > mkPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:55
Common base class for Projection and Analysis, used for internal polymorphism.
Definition: ProjectionApplier.hh:21
Specialization of Cmp for checking the ordering of two {Projection}s.
Definition: Cmp.hh:112
virtual std::string name() const
Get the name of the projection.
Definition: Projection.hh:56
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
bool before(const Projection &p) const
Definition: Projection.cc:24
virtual const std::set< PdgIdPair > beamPairs() const
Definition: Projection.cc:39
Base class for all Rivet projections.
Definition: Projection.hh:29
Log & getLog() const
Get a Log object based on the getName() property of the calling projection object.
Definition: Projection.hh:127
virtual ~Projection()
The destructor.
Definition: Projection.cc:18