hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ProcessorFactory.h
Go to the documentation of this file.
1
8#ifndef __PROCESSOR_FACTORY_H__
9#define __PROCESSOR_FACTORY_H__
10
11//----------------//
12// C++ StdLib //
13//----------------//
14#include <iostream>
15#include <set>
16#include <stdexcept>
17#include <string>
18
19
20#include "Processor.h"
21
23
24 public:
31
33 static ProcessorFactory instance_;
34
35 return instance_;
36 }
37
44 void registerProcessor(const std::string& classname, ProcessorMaker* maker);
45
46 /*
47 * @brief Get the classes associated with the processor.
48 *
49 * @return a vector of strings corresponding to processor classes.
50 */
51 //std::vector<std::string> getProcessorClasses() const;
52
60 Processor* createProcessor(const std::string& classname, const std::string& module_instance_name, Process& process);
61
67 void loadLibrary(const std::string& libname);
68
69 private:
72
78 std::string classname;
80 };
81
83 std::map<std::string, ProcessorInfo> module_info_;
84
86 std::set<std::string> libs_loaded_;
87
88};
89
90#endif // ProcessorFactory
Base classes for all user event processing components to extend.
Processor * ProcessorMaker(const std::string &name, Process &process)
Definition Processor.h:28
void loadLibrary(const std::string &libname)
Load a library.
std::map< std::string, ProcessorInfo > module_info_
static ProcessorFactory & instance()
Get the factory instance.
std::set< std::string > libs_loaded_
void registerProcessor(const std::string &classname, ProcessorMaker *maker)
Register the event processor.
Processor * createProcessor(const std::string &classname, const std::string &module_instance_name, Process &process)
Make an event processor.
Base class for all event processing components.
Definition Processor.h:34
Processor info container to hold classname, class type and maker.