8 __attribute((init_priority(500)));
19 EXCEPTION_RAISE(
"ExistingEventProcessorDefinition",
20 "Already have a module registered with the classname '" +
24 mi.classname = classname;
25 mi.classtype = classtype;
32 const std::string& classname,
int classtype,
36 EXCEPTION_RAISE(
"ExistingEventProcessorDefinition",
37 "Already have a module registered with the classname '" +
41 mi.classname = classname;
42 mi.classtype = classtype;
49 std::vector<std::string> classes;
51 if (ptr.second.ep_maker != 0) classes.push_back(ptr.first);
58 if (ptr ==
moduleInfo_.end() || ptr->second.ep_maker == 0) {
62 return ptr->second.classtype;
67 const std::string& classname,
const std::string& moduleInstanceName,
70 if (ptr ==
moduleInfo_.end() || ptr->second.ep_maker == 0) {
73 return ptr->second.ep_maker(moduleInstanceName, process);
77 const std::string& classname,
const std::string& objName,
81 if (ptr ==
moduleInfo_.end() || ptr->second.cop_maker == 0) {
84 return ptr->second.cop_maker(objName, tagname, params, process);
92 void* handle = dlopen(libname.c_str(), RTLD_NOW);
93 if (handle ==
nullptr) {
94 EXCEPTION_RAISE(
"LibraryLoadFailure",
95 "Error loading library '" + libname +
"':" + dlerror());
Base classes for all user event processing components to extend.
Class which provides a singleton module factory that creates EventProcessor objects.
Base class for all providers of conditions objects.
Base class for all event processing components.
Singleton module factory that creates EventProcessor objects.
void registerConditionsObjectProvider(const std::string &classname, int classtype, ConditionsObjectProviderMaker *maker)
Register a conditions object provider.
ConditionsObjectProvider * createConditionsObjectProvider(const std::string &classname, const std::string &objName, const std::string &tagname, const framework::config::Parameters ¶ms, Process &process)
Make a conditions object provider.
static PluginFactory theFactory_
Factory for creating the plugin objects.
int getEventProcessorClasstype(const std::string &) const
Get the class type for the event processor.
PluginFactory()
Constructor.
std::vector< std::string > getEventProcessorClasses() const
Get the classes associated with the processor.
std::map< std::string, PluginInfo > moduleInfo_
A map of names to processor containers.
EventProcessor * createEventProcessor(const std::string &classname, const std::string &moduleInstanceName, Process &process)
Make an event processor.
std::set< std::string > librariesLoaded_
A set of names of loaded libraries.
void loadLibrary(const std::string &libname)
Load a library.
void registerEventProcessor(const std::string &classname, int classtype, EventProcessorMaker *maker)
Register the event processor.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
All classes in the ldmx-sw project use this namespace.
EventProcessor * EventProcessorMaker(const std::string &name, Process &process)
Typedef for EventProcessorFactory use.
ConditionsObjectProvider * ConditionsObjectProviderMaker(const std::string &objname, const std::string &tagname, const framework::config::Parameters ¶ms, Process &process)
Typedef for PluginFactory use.
info container to hold classname, class type and maker.