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 
13 #include <functional>
14 
15 namespace edm {
16  class BranchDescription;
17  class ModuleDescription;
18  class ProductRegistry;
19 
20  class EDProducer;
21  class EDFilter;
22  namespace one {
23  class EDProducerBase;
24  class EDFilterBase;
25  }
26  namespace global {
27  class EDProducerBase;
28  class EDFilterBase;
29  }
30  namespace stream {
31  template<typename T> class ProducingModuleAdaptorBase;
32  }
33 
35  public:
37  ProducerBase ();
38  virtual ~ProducerBase();
39 
41  std::function<void(BranchDescription const&)> registrationCallback() const;
42 
45  ModuleDescription const&);
46 
49 
52  }
53 
54  private:
55  friend class EDProducer;
56  friend class EDFilter;
57  friend class one::EDProducerBase;
58  friend class one::EDFilterBase;
59  friend class global::EDProducerBase;
60  friend class global::EDFilterBase;
61  template<typename T> friend class stream::ProducingModuleAdaptorBase;
62 
63  template< typename P>
64  void commit_(P& iPrincipal) {
65  iPrincipal.commit_();
66  }
67 
68  template< typename P, typename L, typename I>
69  void commit_(P& iPrincipal, L* iList, I* iID) {
70  iPrincipal.commit_(iList,iID);
71  }
72 
73  std::function<void(BranchDescription const&)> callWhenNewProductsRegistered_;
74  };
75 }
76 #endif
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
Definition: ProducerBase.h:50
std::list< TypeLabelItem > TypeLabelList
ProductRegistryHelper::TypeLabelList TypeLabelList
Definition: ProducerBase.h:36
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
#define P
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
Definition: ProducerBase.h:73
TypeLabelList & typeLabelList()
used by the fwk to register the list of products of this module
helper::RootFunctionHelper< F, args >::root_function function(F &f)
Definition: rootFunction.h:14
TypeLabelItem const & produces()
declare what type of product will make and with which optional label
const std::complex< double > I
Definition: I.h:8
virtual ~ProducerBase()
Definition: ProducerBase.cc:16
void commit_(P &iPrincipal, L *iList, I *iID)
Definition: ProducerBase.h:69
std::function< void(BranchDescription const &)> registrationCallback() const
used by the fwk to register list of products
Definition: ProducerBase.cc:18
void commit_(P &iPrincipal)
Definition: ProducerBase.h:64