CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConstProductRegistry.h
Go to the documentation of this file.
1 #ifndef Framework_ConstProductRegistry_h
2 #define Framework_ConstProductRegistry_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : ConstProductRegistry
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu Sep 22 18:01:21 CEST 2005
19 //
20 
21 // system include files
22 #include <vector>
23 #include <string>
24 
25 #include "boost/bind.hpp"
26 
27 // user include files
30 
31 // forward declarations
32 namespace edm {
34  {
35 
36  public:
38 
40 
41  ConstProductRegistry(ConstProductRegistry const&) = delete; // Disallow copying and moving
42  ConstProductRegistry& operator=(ConstProductRegistry const&) = delete; // Disallow copying and moving
43 
44  // ---------- const member functions ---------------------
45  ProductRegistry const& productRegistry() const {return *reg_;}
46 
47  ProductList const& productList() const {return reg_->productList();}
48 
49  // Return all the branch names currently known to *this. This
50  // does a return-by-value of the vector so that it may be used in
51  // a colon-initialization list.
52  std::vector<std::string> allBranchNames() const {return reg_->allBranchNames();}
53 
54  // Return pointers to (const) BranchDescriptions for all the
55  // BranchDescriptions known to *this. This does a
56  // return-by-value of the vector so that it may be used in a
57  // colon-initialization list.
58  std::vector<BranchDescription const*> allBranchDescriptions() const {return reg_->allBranchDescriptions();}
59 
60  bool anyProductProduced() const {return reg_->anyProductProduced();}
61 
62  template< class T>
63  void watchProductAdditions(const T& iFunc)
64  {
66  iFunc);
67  }
68  template< class T, class TMethod>
69  void watchProductAdditions(T const& iObj, TMethod iMethod)
70  {
72  boost::bind(iMethod, iObj,_1));
73  }
74 
75  private:
76 
77  // ---------- member data --------------------------------
79  };
80 }
81 
82 #endif
std::vector< std::string > allBranchNames() const
std::map< BranchKey, BranchDescription > ProductList
ProductRegistry const & productRegistry() const
signalslot::Signal< void(BranchDescription const &)> productAddedSignal_
void watchProductAdditions(T const &iObj, TMethod iMethod)
ProductList const & productList() const
ProductRegistry::ProductList ProductList
void watchProductAdditions(const T &iFunc)
std::vector< BranchDescription const * > allBranchDescriptions() const
ConstProductRegistry & operator=(ConstProductRegistry const &)=delete
ConstProductRegistry(SignallingProductRegistry &iReg)
bool anyProductProduced() const
std::vector< std::string > allBranchNames() const
SignallingProductRegistry * reg_
std::vector< BranchDescription const * > allBranchDescriptions() const
long double T
ProductList const & productList() const
void connect_but_block_self(Signal &oSignal, const Func &iFunc)