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 // user include files
28 
29 // forward declarations
30 namespace edm {
32  {
33 
34  public:
36 
38 
39  ConstProductRegistry(ConstProductRegistry const&) = delete; // Disallow copying and moving
40  ConstProductRegistry& operator=(ConstProductRegistry const&) = delete; // Disallow copying and moving
41 
42  // ---------- const member functions ---------------------
43  ProductRegistry const& productRegistry() const {return *reg_;}
44 
45  ProductList const& productList() const {return reg_->productList();}
46 
47  // Return all the branch names currently known to *this. This
48  // does a return-by-value of the vector so that it may be used in
49  // a colon-initialization list.
50  std::vector<std::string> allBranchNames() const {return reg_->allBranchNames();}
51 
52  // Return pointers to (const) BranchDescriptions for all the
53  // BranchDescriptions known to *this. This does a
54  // return-by-value of the vector so that it may be used in a
55  // colon-initialization list.
56  std::vector<BranchDescription const*> allBranchDescriptions() const {return reg_->allBranchDescriptions();}
57 
58  bool anyProductProduced() const {return reg_->anyProductProduced();}
59 
60  template< class T>
61  void watchProductAdditions(const T& iFunc)
62  {
64  iFunc);
65  }
66  template< class T, class TMethod>
67  void watchProductAdditions(T const& iObj, TMethod iMethod)
68  {
69  using std::placeholders::_1;
71  std::bind(iMethod, iObj,_1));
72  }
73 
74  private:
75 
76  // ---------- member data --------------------------------
78  };
79 }
80 
81 #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)