CMS 3D CMS Logo

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
29 
30 // forward declarations
31 namespace edm {
33  public:
35 
37 
38  ConstProductRegistry(ConstProductRegistry const&) = delete; // Disallow copying and moving
39  ConstProductRegistry& operator=(ConstProductRegistry const&) = delete; // Disallow copying and moving
40 
41  // ---------- const member functions ---------------------
42  ProductRegistry const& productRegistry() const { return *reg_; }
43 
44  ProductList const& productList() const { return reg_->productList(); }
45 
46  // Return all the branch names currently known to *this. This
47  // does a return-by-value of the vector so that it may be used in
48  // a colon-initialization list.
49  std::vector<std::string> allBranchNames() const { return reg_->allBranchNames(); }
50 
51  // Return pointers to (const) BranchDescriptions for all the
52  // BranchDescriptions known to *this. This does a
53  // return-by-value of the vector so that it may be used in a
54  // colon-initialization list.
55  std::vector<BranchDescription const*> allBranchDescriptions() const { return reg_->allBranchDescriptions(); }
56 
57  bool anyProductProduced() const { return reg_->anyProductProduced(); }
58 
59  template <class T>
60  void watchProductAdditions(const T& iFunc) {
61  serviceregistry::connect_but_block_self(reg_->productAddedSignal_, iFunc);
62  }
63  template <class T, class TMethod>
64  void watchProductAdditions(T const& iObj, TMethod iMethod) {
65  using std::placeholders::_1;
66  serviceregistry::connect_but_block_self(reg_->productAddedSignal_, std::bind(iMethod, iObj, _1));
67  }
68 
69  private:
70  // ---------- member data --------------------------------
72  };
73 } // namespace edm
74 
75 #endif
propagate_const.h
edm
HLT enums.
Definition: AlignableModifier.h:19
connect_but_block_self.h
edm::ConstProductRegistry::productList
ProductList const & productList() const
Definition: ConstProductRegistry.h:44
SignallingProductRegistry.h
edm::ConstProductRegistry
Definition: ConstProductRegistry.h:32
edm::ConstProductRegistry::watchProductAdditions
void watchProductAdditions(const T &iFunc)
Definition: ConstProductRegistry.h:60
edm::ConstProductRegistry::watchProductAdditions
void watchProductAdditions(T const &iObj, TMethod iMethod)
Definition: ConstProductRegistry.h:64
edm::ConstProductRegistry::productRegistry
ProductRegistry const & productRegistry() const
Definition: ConstProductRegistry.h:42
edm::ProductRegistry
Definition: ProductRegistry.h:37
edm::propagate_const
Definition: propagate_const.h:32
edm::ConstProductRegistry::allBranchDescriptions
std::vector< BranchDescription const * > allBranchDescriptions() const
Definition: ConstProductRegistry.h:55
edm::ConstProductRegistry::ConstProductRegistry
ConstProductRegistry(SignallingProductRegistry &iReg)
Definition: ConstProductRegistry.h:36
edm::ConstProductRegistry::operator=
ConstProductRegistry & operator=(ConstProductRegistry const &)=delete
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:39
edm::serviceregistry::connect_but_block_self
void connect_but_block_self(Signal &oSignal, const Func &iFunc)
Definition: connect_but_block_self.h:59
edm::ConstProductRegistry::allBranchNames
std::vector< std::string > allBranchNames() const
Definition: ConstProductRegistry.h:49
edm::ConstProductRegistry::reg_
edm::propagate_const< SignallingProductRegistry * > reg_
Definition: ConstProductRegistry.h:71
T
long double T
Definition: Basic3DVectorLD.h:48
edm::SignallingProductRegistry
Definition: SignallingProductRegistry.h:32
edm::ConstProductRegistry::ProductList
ProductRegistry::ProductList ProductList
Definition: ConstProductRegistry.h:34
edm::ConstProductRegistry::anyProductProduced
bool anyProductProduced() const
Definition: ConstProductRegistry.h:57