Generic registry template for polymorphic processor implementations. More...
#include <ProcessRegistry.h>
Classes | |
class | Factory |
Factory helper class to instantiate a processor. More... | |
Public Types | |
template<class Instance_t , class Calibration_t > | |
using | Registry = ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t > |
Protected Member Functions | |
virtual Base_t * | instance (const char *name, const CalibBase_t *calib, Parent_t *parent) const =0 |
virtual method to implement by respective processor instance classes More... | |
ProcessRegistry (const char *name) | |
instantiate registry and registers itself with name More... | |
virtual | ~ProcessRegistry () |
Static Protected Member Functions | |
static Base_t * | create (const char *name, const CalibBase_t *calib, Parent_t *parent) |
create an instance of name, given a calibration calib and parent parent More... | |
Private Types | |
typedef tbb::concurrent_unordered_map< std::string, const ProcessRegistry * > | RegistryMap |
Static Private Member Functions | |
static RegistryMap * | getRegistry () |
return map of all registered processes, allocate if necessary More... | |
static void | registerProcess (const char *name, const ProcessRegistry *process) |
static void | unregisterProcess (const char *name) |
Private Attributes | |
const char * | name |
Friends | |
class | Factory |
Generic registry template for polymorphic processor implementations.
template parameters are: base class, calibration base class and a pointer to a user-definable "parent type". Template allows registration by name of a given base type using the factory. The variable processors can register themselves with the registry of the common base class.
Definition at line 39 of file ProcessRegistry.h.
using PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Registry = ProcessRegistryImpl<Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t> |
Definition at line 45 of file ProcessRegistry.h.
|
private |
Definition at line 80 of file ProcessRegistry.h.
|
inlineprotected |
instantiate registry and registers itself with name
Definition at line 67 of file ProcessRegistry.h.
References PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::name, and PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::registerProcess().
|
inlineprotectedvirtual |
Definition at line 68 of file ProcessRegistry.h.
References PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::name, and PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::unregisterProcess().
|
staticprotected |
create an instance of name, given a calibration calib and parent parent
Referenced by PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Factory::create().
|
staticprivate |
return map of all registered processes, allocate if necessary
|
protectedpure virtual |
virtual method to implement by respective processor instance classes
Implemented in PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >.
|
staticprivate |
|
staticprivate |
|
friend |
Definition at line 64 of file ProcessRegistry.h.
|
private |
Definition at line 85 of file ProcessRegistry.h.
Referenced by FWLite.ElectronMVAID::__call__(), dirstructure.Directory::__create_pie_image(), DisplayManager.DisplayManager::__del__(), dqm_interfaces.DirID::__eq__(), dirstructure.Directory::__get_full_path(), dirstructure.Comparison::__get_img_name(), dirstructure.Comparison::__make_image(), dirstructure.Directory::__repr__(), dqm_interfaces.DirID::__repr__(), dirstructure.Comparison::__repr__(), config.CFG::__str__(), FWLite.WorkingPoints::_reformat_cut_definitions(), dirstructure.Directory::calcStats(), validation.Sample::digest(), python.rootplot.utilities.Hist::divide(), python.rootplot.utilities.Hist::divide_wilson(), DisplayManager.DisplayManager::Draw(), utils.StatisticalTest::get_status(), VIDSelectorBase.VIDSelectorBase::initialize(), PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >::instance(), dirstructure.Directory::print_report(), PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::ProcessRegistry(), python.rootplot.utilities.Hist::TGraph(), python.rootplot.utilities.Hist::TH1F(), and PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::~ProcessRegistry().