CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/FWCore/Framework/src/Factory.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_Factory_h
00002 #define FWCore_Framework_Factory_h
00003 
00004 #include "FWCore/PluginManager/interface/PluginFactory.h"
00005 #include "FWCore/Framework/src/Worker.h"
00006 #include "FWCore/Framework/src/WorkerMaker.h"
00007 #include "FWCore/Framework/src/WorkerParams.h"
00008 
00009 #include <map>
00010 #include <string>
00011 #include <memory>
00012 #include "FWCore/Utilities/interface/Signal.h"
00013 
00014 namespace edm {
00015   typedef edmplugin::PluginFactory<Maker* ()> MakerPluginFactory;
00016   
00017   class Factory  
00018   {
00019   public:
00020     typedef std::map<std::string, Maker*> MakerMap;
00021 
00022     ~Factory();
00023 
00024     static Factory* get();
00025 
00026     std::unique_ptr<Worker> makeWorker(const WorkerParams&,
00027                                      signalslot::Signal<void(const ModuleDescription&)>& pre,
00028                                      signalslot::Signal<void(const ModuleDescription&)>& post) const;
00029 
00030 
00031   private:
00032     Factory();
00033     static Factory singleInstance_;
00034     mutable MakerMap makers_;
00035   };
00036 
00037 }
00038 #endif