2 #ifndef RIVET_ProjectionHandler_HH 3 #define RIVET_ProjectionHandler_HH 9 #include "Rivet/Config/RivetCommon.hh" 10 #include "Rivet/Projection.fhh" 64 typedef map<const ProjectionApplier*, NamedProjs> NamedProjsMap;
68 NamedProjsMap _namedprojs;
106 std::unique_lock<std::mutex> lock(mtx);
107 static map<std::thread::id,ProjectionHandler> _instances;
108 return _instances[std::this_thread::get_id()];
131 ProjHandle _getEquiv(
const Projection& proj)
const;
134 unique_ptr<Projection> _clone(
const Projection& proj);
142 string _getStatus()
const;
147 const string& name)
const;
165 const string& name)
const;
Definition: MC_Cent_pPb.hh:10
std::shared_ptr< const Projection > ProjHandle
Typedef for Projection (smart) pointer.
Definition: ProjectionHandler.hh:16
ProjectionHandler()=default
The standard constructor.
const Projection & getProjection(const ProjectionApplier &parent, const string &name) const
const Projection & registerProjection(const ProjectionApplier &parent, const Projection &proj, const string &name)
Attach and retrieve a projection as a reference.
ProjDepth
Enum to specify depth of projection search.
Definition: ProjectionHandler.hh:57
set< ProjHandle > ProjHandles
Typedef for a vector of Projection pointers.
Definition: ProjectionHandler.hh:50
The projection handler is a central repository for projections to be used in a Rivet analysis run...
Definition: ProjectionHandler.hh:43
ProjectionHandler & operator=(const ProjectionHandler &)=delete
The assignment operator is hidden.
Common base class for Projection and Analysis, used for internal polymorphism.
Definition: ProjectionApplier.hh:21
~ProjectionHandler()=default
Private destructor means no inheritance from this class.
static std::mutex mtx
Singleton creation function.
Definition: ProjectionHandler.hh:102
map< string, ProjHandle > NamedProjs
Typedef for the structure used to contain named projections for a particular containing Analysis or P...
Definition: ProjectionHandler.hh:54
bool hasProjection(const ProjectionApplier &parent, const string &name) const
Check if there is a name projection registered by parent.
Base class for all Rivet projections.
Definition: Projection.hh:29
set< const Projection * > getChildProjections(const ProjectionApplier &parent, ProjDepth depth=SHALLOW) const