CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ProducerBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_ProducerBase_h
2 #define FWCore_Framework_ProducerBase_h
3 
4 /*----------------------------------------------------------------------
5 
6 EDProducer: The base class of all "modules" that will insert new
7 EDProducts into an Event.
8 
9 ----------------------------------------------------------------------*/
10 
12 #include "boost/bind.hpp"
13 #include "boost/function.hpp"
14 namespace edm {
15  class BranchDescription;
16  class ModuleDescription;
17  class ProductRegistry;
19  public:
21  ProducerBase ();
22  virtual ~ProducerBase();
23 
25  boost::function<void(const BranchDescription&)> registrationCallback() const;
26 
29  ModuleDescription const&);
30 
33 
34  protected:
35  template<class TProducer, class TMethod>
36  void callWhenNewProductsRegistered(TProducer* iProd, TMethod iMethod) {
37  callWhenNewProductsRegistered_ = boost::bind(iMethod,iProd,_1);
38  }
39 
40  private:
41  boost::function<void(const BranchDescription&)> callWhenNewProductsRegistered_;
42  };
43 
44 
45 }
46 
47 #endif
std::list< TypeLabelItem > TypeLabelList
ProductRegistryHelper::TypeLabelList TypeLabelList
Definition: ProducerBase.h:20
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
void callWhenNewProductsRegistered(TProducer *iProd, TMethod iMethod)
Definition: ProducerBase.h:36
TypeLabelList & typeLabelList()
used by the fwk to register the list of products of this module
boost::function< void(const BranchDescription &)> callWhenNewProductsRegistered_
Definition: ProducerBase.h:41
TypeLabelItem const & produces()
declare what type of product will make and with which optional label
boost::function< void(const BranchDescription &)> registrationCallback() const
used by the fwk to register list of products
Definition: ProducerBase.cc:18
virtual ~ProducerBase()
Definition: ProducerBase.cc:16
author Stefano ARGIRO author Bill Tanenbaum