1 #ifndef FWCore_PluginManager_PluginFactory_h 2 #define FWCore_PluginManager_PluginFactory_h 34 template<
typename R,
typename... Args>
37 friend class DummyFriend;
42 virtual R*
create(Args...)
const = 0;
46 struct PMaker :
public PMakerBase {
51 return new TPlug(std::forward<Args>(
args)...);
80 finishedConstruction();
88 #define CONCATENATE_HIDDEN(a,b) a ## b 89 #define CONCATENATE(a,b) CONCATENATE_HIDDEN(a,b) 90 #define EDM_REGISTER_PLUGINFACTORY(_factory_,_category_) \ 91 namespace edmplugin {\ 92 template<> edmplugin::PluginFactory<_factory_::TemplateArgType>* edmplugin::PluginFactory<_factory_::TemplateArgType>::get() { [[cms::thread_safe]] static edmplugin::PluginFactory<_factory_::TemplateArgType> s_instance; return &s_instance;}\ 93 template<> const std::string& edmplugin::PluginFactory<_factory_::TemplateArgType>::category() const { static const std::string s_cat(_category_); return s_cat;}\ 94 } enum {CONCATENATE(dummy_edm_register_pluginfactory_, __LINE__)} 98 #define EDM_PLUGIN_SYM(x,y) EDM_PLUGIN_SYM2(x,y) 99 #define EDM_PLUGIN_SYM2(x,y) x ## y 101 #define DEFINE_EDM_PLUGIN(factory,type,name) \ 102 static const factory::PMaker<type> EDM_PLUGIN_SYM(s_maker , __LINE__ ) (name)
def create(alignables, pedeDump, additionalData, outputFile, config)
void registerPMaker(void *iPMaker, const std::string &iName)
R * create(const std::string &iName, Args...args) const
virtual R * create(Args...args) const
R * TemplateArgType(Args...)
void registerPMaker(PMakerBase *iPMaker, const std::string &iName)
PMaker(const std::string &iName)
void * findPMaker(const std::string &iName) const
R * tryToCreate(const std::string &iName, Args...args) const
like above but returns 0 if iName is unknown
T get(const Candidate &c)
void * tryToFindPMaker(const std::string &iName) const