1 #ifndef FWCore_Framework_ESProducer_h 2 #define FWCore_Framework_ESProducer_h 92 namespace eventsetup {
98 template <
typename T,
typename TRecord,
typename TDecorator>
135 template <
typename Record>
142 for (
size_t i = 0;
i <
info->size(); ++
i) {
143 auto chooserBase = (*info)[
i].chooser_.get();
146 ret[
i] = chooser->makeChoice(iRecord);
162 template <
typename T>
167 template <
typename T>
171 template <
typename T>
176 template <
typename T,
typename TDecorator>
185 template <
typename T,
typename TReturn,
typename TRecord>
195 template <
typename T,
typename TReturn,
typename TRecord,
typename TArg>
197 TReturn (
T ::*iMethod)(
const TRecord&),
203 unsigned int iovIndex = 0;
204 auto temp = std::make_shared<CallbackType>(
207 std::make_shared<std::pair<unsigned int, std::shared_ptr<CallbackType>>>(iovIndex,
std::move(
temp));
210 static_cast<const TRecord*>(
nullptr),
217 template <
typename CallbackT,
typename TList,
typename TRecord>
218 void registerProducts(std::shared_ptr<std::pair<
unsigned int, std::shared_ptr<CallbackT>>> iCallback,
220 const TRecord* iRecord,
222 registerProduct(iCallback, static_cast<const typename TList::tail_type*>(
nullptr), iRecord, iLabel);
226 template <
typename CallbackT,
typename TRecord>
227 void registerProducts(std::shared_ptr<std::pair<
unsigned int, std::shared_ptr<CallbackT>>>,
234 template <
typename CallbackT,
typename TProduct,
typename TRecord>
235 void registerProduct(std::shared_ptr<std::pair<
unsigned int, std::shared_ptr<CallbackT>>> iCallback,
244 template <
typename CallbackT,
typename TProduct,
typename TRecord,
int IIndex>
245 void registerProduct(std::shared_ptr<std::pair<
unsigned int, std::shared_ptr<CallbackT>>> iCallback,
251 "Unnamed Label\nthe index ",
253 " was never assigned a name in the 'setWhatProduced' method");
auto setWhatProduced(T *iThis, const std::string &iLabel)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
static const std::string & def()
std::vector< std::vector< ESRecordIndex > > recordsUsedDuringGet_
ret
prodAgent to be discontinued
std::vector< std::unique_ptr< ESConsumesInfo > > consumesInfos_
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes(unsigned int iIndex, const Record &iRecord) const
ESConsumesCollectorT< TRecord > setWhatProduced(T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
ESProducer const & operator=(const ESProducer &)=delete
ESProxyIndex const * getTokenIndices(unsigned int iIndex) const
bool hasMayConsumes() const noexcept
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
void usesResources(std::vector< std::string > const &)
const TDecorator & createDecoratorFrom(T *, const TRecord *, const TDecorator &iDec)
auto setWhatProduced(T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
SerialTaskQueueChain & serialQueueChain() const
void registerProduct(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TProduct *, const TRecord *, const es::Label &iLabel)
size_t numberOfTokenIndices(unsigned int iIndex) const
void registerProducts(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
ESRecordIndex const * getTokenRecordIndices(unsigned int iIndex) const
std::unique_ptr< std::vector< std::string > > sharedResourceNames_
void updateLookup(eventsetup::ESRecordsToProxyIndices const &) final
SerialTaskQueueChain & queue()
void registerFactory(std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
void registerProducts(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
SharedResourcesAcquirer acquirer_
auto setWhatProduced(T *iThis, const char *iLabel)
~ESProducer() noexcept(false) override
auto setWhatProduced(T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
void registerProduct(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const es::L< TProduct, IIndex > *, const TRecord *, const es::Label &iLabel)
std::vector< std::string > labels_
std::vector< std::vector< ESProxyIndex > > itemsToGetFromRecords_