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;
36 enum class AliasType { kBranchAlias, kSwitchAlias };
39 : transition_(transition),
41 productInstanceName_(
std::
move(pin)),
59 value_.branchAlias_ =
std::move(moduleLabel);
93 static void addToRegistry(TypeLabelList::const_iterator
const& iBegin,
94 TypeLabelList::const_iterator
const& iEnd,
98 bool iIsListener =
false);
107 template <
class ProductType>
109 return produces<ProductType, InEvent>(
std::string());
112 template <
class ProductType>
114 return produces<ProductType, InEvent>(
std::move(instanceName));
117 template <
typename ProductType, BranchType B>
122 template <
typename ProductType, BranchType B>
124 TypeID tid(
typeid(ProductType));
129 template <
typename ProductType, Transition B>
134 template <
typename ProductType, Transition B>
136 TypeID tid(
typeid(ProductType));
143 bool recordProvenance =
true) {
147 template <BranchType B>
150 bool recordProvenance =
true) {
156 template <Transition B>
159 bool recordProvenance =
true) {
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
std::vector< bool > const & recordProvenanceList() const
TypeLabelList typeLabelList_
TypeLabelList const & typeLabelList() const
used by the fwk to register the list of products of this module
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)
BranchAliasSetterT< ProductType > produces(std::string instanceName)
BranchAliasSetterT(TypeLabelItem &iItem, EDPutTokenT< T > iToken)
BranchAliasSetter produces(const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
std::string productInstanceName_
BranchAliasSetter & setSwitchAlias(std::string moduleLabel)
TypeLabelItem(Transition const &transition, TypeID const &tid, std::string pin)
virtual bool hasAbilityToProduceInRuns() const
std::vector< TypeLabelItem > TypeLabelList
BranchAliasSetterT< ProductType > produces(std::string instanceName)
static const std::string B
virtual bool hasAbilityToProduceInLumis() const
BranchAliasSetter(TypeLabelItem &iItem, EDPutToken iToken)
constexpr Transition convertToTransition(BranchType iValue)
BranchAliasSetterT< ProductType > produces()
BranchAliasSetter & setBranchAlias(std::string alias)
BranchAliasSetterT(BranchAliasSetter &&iS)
std::vector< bool > recordProvenanceList_
BranchAliasSetter produces(const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)