CMS 3D CMS Logo

ESProxyFactoryProducer Class Reference

Description: An EventSetup algorithmic Provider that manages Factories of Proxies. More...

#include <FWCore/Framework/interface/ESProxyFactoryProducer.h>


Detailed Description

Description: An EventSetup algorithmic Provider that manages Factories of Proxies.

Usage: This class is used when the algorithms in the EventSetup that are to be run on demand are encapsulated in edm::eventsetup::Proxy's. This 'design pattern' is more flexible than having the algorithm embedded directly in the Provider (see ESProducer for such an implemenation).

Users inherit from this class and then call the 'registerFactory' method in their class' constructor in order to get their Proxies registered. For most users, the already available templated Factory classes should suffice and therefore they should not need to create their own Factories.

Example: register one Factory that creates a proxy that takes no arguments

   class FooProxy : public edm::eventsetup::DataProxy { ... };
   class FooProd : public edm::ESProxyFactoryProducer { ... };

   FooProd::FooProd(const edm::ParameterSet&) {
      registerFactory(new edm::eventsetup::ProxyFactoryTemplate<FooProxy>());
   };

Example: register one Factory that creates a proxy that takes one argument

class BarProxy : public edm::eventsetup::DataProxy { ...
   BarProxy(const edm::ParameterSet&) ;
   ... };
class BarProd : public edm::ESProxyFactoryProducer { ... };

BarProd::BarProd(const edm::ParameterSet& iPS) {
   registerFactory(
      new edm::eventsetup::ProxyArgumentFactoryTemplate<FooProxy,
                                                        edm::ParmeterSet>(iPS));
};

The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:20:25 2009 for CMSSW by  doxygen 1.5.4