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 
28  public:
30  ProducerBase ();
31  virtual ~ProducerBase();
32 
34  std::function<void(BranchDescription const&)> registrationCallback() const;
35 
38  ModuleDescription const&);
39 
42 
43  protected:
46  }
47 
48  private:
49  friend class EDProducer;
50  friend class EDFilter;
51  friend class one::EDProducerBase;
52  friend class one::EDFilterBase;
53 
54  template< typename P>
55  void commit_(P& iPrincipal) {
56  iPrincipal.commit_();
57  }
58 
59  template< typename P, typename L, typename I>
60  void commit_(P& iPrincipal, L* iList, I* iID) {
61  iPrincipal.commit_(iList,iID);
62  }
63 
64  std::function<void(BranchDescription const&)> callWhenNewProductsRegistered_;
65  };
66 }
67 #endif
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
Definition: ProducerBase.h:44
std::list< TypeLabelItem > TypeLabelList
ProductRegistryHelper::TypeLabelList TypeLabelList
Definition: ProducerBase.h:29
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
#define P
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
Definition: ProducerBase.h:64
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:60
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:55