CMS 3D CMS Logo

ProducesCollector.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_ProducesCollector_h
2 #define FWCore_Framework_ProducesCollector_h
3 
4 // Package: FWCore/Framework
5 // Class : edm::ProducesCollector
6 //
28 //
29 // Original Author: W. David Dagenhart
30 // Created: 24 September 2019
31 
35 
36 #include <string>
37 #include <utility>
38 
39 namespace edm {
40 
41  class TypeID;
42  template <Transition B>
44 
46  public:
47  ProducesCollector() = delete;
52 
53  template <class ProductType>
55  return helper_->produces<ProductType>();
56  }
57 
58  template <class ProductType>
60  return helper_->produces<ProductType>(std::move(instanceName));
61  }
62 
63  template <typename ProductType, Transition B>
65  return helper_->produces<ProductType, B>();
66  }
67 
68  template <typename ProductType, Transition B>
70  return helper_->produces<ProductType, B>(std::move(instanceName));
71  }
72 
73  template <Transition Tr = Transition::Event>
74  [[nodiscard]] auto produces(std::string instanceName) noexcept {
76  }
77  template <Transition Tr = Transition::Event>
78  [[nodiscard]] auto produces() noexcept {
79  return ProducesCollectorAdaptor<Tr>(*this);
80  }
81 
84  bool recordProvenance = true);
85 
86  template <Transition B>
89  bool recordProvenance = true) {
90  return helper_->produces<B>(id, std::move(instanceName), recordProvenance);
91  }
92 
93  private:
94  friend class ProducerBase;
96 
98  };
99 
100  template <Transition B>
102  public:
104 
105  template <typename TYPE>
107  return m_producer.template produces<TYPE, B>(m_label);
108  }
109 
110  private:
111  //only ProducesCollector is allowed to make an instance of this class
112  friend class ProducesCollector;
113 
115  : m_producer(iBase), m_label(std::move(iLabel)) {}
117 
120  };
121 
122 } // namespace edm
123 #endif
Definition: helper.py:1
Definition: APVGainStruct.h:7
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
ProductRegistryHelper::BranchAliasSetter produces(const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces(std::string instanceName)
auto produces(std::string instanceName) noexcept
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces(std::string instanceName)
auto produces() noexcept
ProducesCollector & operator=(ProducesCollector const &)
propagate_const< ProductRegistryHelper * > helper_
EDPutTokenT< TYPE > produces()
ProducesCollectorAdaptor(ProducesCollector iBase)
HLT enums.
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
ProducesCollectorAdaptor(ProducesCollector iBase, std::string iLabel)
def move(src, dest)
Definition: eostools.py:511