|
|
Go to the documentation of this file. 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>(
205 iThis, iMethod,
id,
createDecoratorFrom(iThis, static_cast<const TRecord*>(
nullptr), iDec));
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");
ret
prodAgent to be discontinued
SerialTaskQueueChain & serialQueueChain() const
~ESProducer() noexcept(false) override
std::vector< std::vector< ESProxyIndex > > itemsToGetFromRecords_
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes(unsigned int iIndex, const Record &iRecord) const
auto setWhatProduced(T *iThis, const std::string &iLabel)
std::vector< std::vector< ESRecordIndex > > recordsUsedDuringGet_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
ESProxyIndex const * getTokenIndices(unsigned int iIndex) const
bool hasMayConsumes() const noexcept
ESConsumesCollectorT< TRecord > setWhatProduced(T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
std::vector< std::unique_ptr< ESConsumesInfo > > consumesInfos_
void registerProducts(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
const TDecorator & createDecoratorFrom(T *, const TRecord *, const TDecorator &iDec)
void usesResources(std::vector< std::string > const &)
static const std::string & def()
void registerFactory(std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
ESProducer const & operator=(const ESProducer &)=delete
size_t numberOfTokenIndices(unsigned int iIndex) const
auto setWhatProduced(T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
void registerProducts(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
ESRecordIndex const * getTokenRecordIndices(unsigned int iIndex) const
SerialTaskQueueChain & queue()
std::unique_ptr< std::vector< std::string > > sharedResourceNames_
void registerProduct(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TProduct *, const TRecord *, const es::Label &iLabel)
std::vector< std::string > labels_
void updateLookup(eventsetup::ESRecordsToProxyIndices const &) final
SharedResourcesAcquirer acquirer_
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
auto setWhatProduced(T *iThis, const char *iLabel)
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)