1 #ifndef Framework_ESProducer_h 2 #define Framework_ESProducer_h 88 namespace eventsetup {
93 template<
typename T,
typename TRecord,
typename TDecorator >
117 return setWhatProduced(iThis , &T::produce, iLabel);
122 return setWhatProduced(iThis ,
es::Label(iLabel));
126 return setWhatProduced(iThis ,
es::Label(iLabel));
129 template<
typename T,
typename TDecorator >
131 return setWhatProduced(iThis , &T::produce, iDec, iLabel);
138 template<
typename T,
typename TReturn,
typename TRecord>
140 TReturn (
T ::* iMethod)(
const TRecord&),
150 template<
typename T,
typename TReturn,
typename TRecord,
typename TArg>
152 TReturn (
T ::* iMethod)(
const TRecord&),
161 static_cast<const TRecord*>(
nullptr),
165 static_cast<const TRecord*>(
nullptr),
175 template<
typename CallbackT,
typename TList,
typename TRecord>
176 void registerProducts(std::shared_ptr<CallbackT> iCallback,
const TList*,
const TRecord* iRecord,
178 registerProduct(iCallback, static_cast<const typename TList::tail_type*>(
nullptr), iRecord, iLabel);
179 registerProducts(iCallback, static_cast<const typename TList::head_type*>(
nullptr), iRecord, iLabel);
182 template<
typename T,
typename TRecord>
187 template<
typename T,
typename TProduct,
typename TRecord>
191 registerFactory(std::make_unique<FactoryType>(iCallback), iLabel.
default_);
194 template<
typename T,
typename TProduct,
typename TRecord,
int IIndex>
196 if(iLabel.
labels_.size() <= IIndex ||
199 "Unnamed Label\nthe index ",
201 " was never assigned a name in the 'setWhatProduced' method");
205 registerFactory(std::make_unique<FactoryType>(iCallback), iLabel.
labels_[IIndex]);
auto setWhatProduced(T *iThis, const std::string &iLabel)
void registerProduct(std::shared_ptr< T > iCallback, const es::L< TProduct, IIndex > *, const TRecord *, const es::Label &iLabel)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
static const std::string & def()
auto setWhatProduced(T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
void registerProduct(std::shared_ptr< T > iCallback, const TProduct *, const TRecord *, const es::Label &iLabel)
const TDecorator & createDecoratorFrom(T *, const TRecord *, const TDecorator &iDec)
ESConsumesCollector setWhatProduced(T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
void registerProducts(std::shared_ptr< T >, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
auto setWhatProduced(T *iThis, const char *iLabel)
void registerProducts(std::shared_ptr< CallbackT > iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
auto setWhatProduced(T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
std::vector< std::string > labels_