1 #ifndef FWCore_Framework_ProductRegistryHelper_h 2 #define FWCore_Framework_ProductRegistryHelper_h 16 #include <type_traits> 19 class ModuleDescription;
20 class ProductRegistry;
21 struct DoNotRecordParents;
23 template <Transition B>
89 static_assert(std::is_same_v<T, U>);
104 static void addToRegistry(TypeLabelList::const_iterator
const& iBegin,
105 TypeLabelList::const_iterator
const& iEnd,
109 bool iIsListener =
false);
118 template <Transition Tr = Transition::Event>
122 template <Transition Tr = Transition::Event>
127 template <
class ProductType>
129 return produces<ProductType, InEvent>(
std::string());
132 template <
class ProductType>
134 return produces<ProductType, InEvent>(
std::move(instanceName));
137 template <
typename ProductType, BranchType B>
142 template <
typename ProductType, BranchType B>
144 TypeID tid(
typeid(ProductType));
149 template <
typename ProductType, Transition B>
154 template <
typename ProductType, Transition B>
156 TypeID tid(
typeid(ProductType));
163 bool recordProvenance =
true) {
164 return produces<Transition::Event>(
id,
std::move(instanceName), recordProvenance);
167 template <BranchType B>
170 bool recordProvenance =
true) {
176 template <Transition B>
179 bool recordProvenance =
true) {
208 template <Transition B>
211 template <
typename TYPE>
BranchAliasSetterT< ProductType > produces()
TypeLabelList typeLabelList_
EDPutToken transforms(const TypeID &id, std::string instanceName)
std::string const m_label
std::vector< bool > const & recordProvenanceList() const
BranchAliasSetterT< T > & setBranchAlias(std::string alias)
virtual ~ProductRegistryHelper() noexcept(false)
static void addToRegistry(TypeLabelList::const_iterator const &iBegin, TypeLabelList::const_iterator const &iEnd, ModuleDescription const &iDesc, ProductRegistry &iReg, ProductRegistryHelper *iProd, bool iIsListener=false)
virtual bool hasAbilityToProduceInEndRuns() const
BranchAliasSetterT< ProductType > produces(std::string instanceName)
virtual bool hasAbilityToProduceInBeginLumis() const
BranchAliasSetterT(TypeLabelItem &iItem, EDPutTokenT< T > iToken)
BranchAliasSetter produces(const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
ProductRegistryHelperAdaptor(ProductRegistryHelper &iBase, std::string iLabel)
std::string productInstanceName_
BranchAliasSetter & setSwitchAlias(std::string moduleLabel)
TypeLabelItem(Transition const &transition, TypeID const &tid, std::string pin)
std::vector< TypeLabelItem > TypeLabelList
virtual bool hasAbilityToProduceInEndProcessBlocks() const
ProductRegistryHelperAdaptor(ProductRegistryHelper &iBase)
BranchAliasSetterT< ProductType > produces(std::string instanceName)
EDPutTokenT< T > produces()
auto produces(std::string instanceName) noexcept
declare what type of product will make and with which optional label
EDPutTokenT< TYPE > produces()
TypeLabelList const & typeLabelList() const
used by the fwk to register the list of products of this module
BranchAliasSetter(TypeLabelItem &iItem, EDPutToken iToken)
constexpr Transition convertToTransition(BranchType iValue)
ProductRegistryHelper & m_helper
virtual bool hasAbilityToProduceInBeginProcessBlocks() const
virtual bool hasAbilityToProduceInBeginRuns() const
BranchAliasSetterT< ProductType > produces()
BranchAliasSetter & setBranchAlias(std::string alias)
BranchAliasSetterT(BranchAliasSetter &&iS)
std::vector< bool > recordProvenanceList_
virtual bool hasAbilityToProduceInEndLumis() const
BranchAliasSetter produces(const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)