1 #ifndef FWCore_Framework_Run_h 2 #define FWCore_Framework_Run_h 36 class ModuleCallingContext;
42 class ProducingModuleAdaptorBase;
54 provRecorder_.setSharedResourcesAcquirer(iResourceAcquirer);
79 CacheIdentifier_t cacheIdentifier()
const;
81 template <
typename PROD>
84 template <
typename PROD>
88 template <
typename PROD>
91 template <
typename PROD>
94 template <
typename PROD>
97 template <
typename PROD>
100 template <
typename PROD>
103 template <
typename PROD>
104 void getManyByType(std::vector<
Handle<PROD>>& results)
const;
107 template <
typename PROD>
108 void put(std::unique_ptr<PROD> product) {
113 template <
typename PROD>
114 void put(std::unique_ptr<PROD> product,
std::string const& productInstanceName);
116 template <
typename PROD>
119 template <
typename PROD>
123 template <
typename PROD,
typename... Args>
126 template <
typename PROD,
typename... Args>
131 void getAllStableProvenance(std::vector<StableProvenance const*>& provenances)
const;
150 provRecorder_.labelsForToken(iToken, oLabels);
157 BasicHandle getByLabelImpl(std::type_info
const& iWrapperType,
158 std::type_info
const& iProductType,
159 InputTag const& iTag)
const override;
161 template <
typename PROD>
164 template <
typename PROD,
typename... Args>
167 typedef std::vector<edm::propagate_const<std::unique_ptr<WrapperBase>>>
ProductPtrVec;
177 template <
typename T>
180 void commit_(std::vector<edm::ProductResolverIndex>
const& iShouldPut);
192 template <
typename PROD>
197 maybe_inserter(product.get());
199 assert(index < putProducts().
size());
205 template <
typename PROD>
207 if (
UNLIKELY(product.get() ==
nullptr)) {
211 auto index = provRecorder_.getPutTokenIndex(
TypeID(*product), productInstanceName);
215 template <
typename PROD>
227 template <
typename PROD>
238 provRecorder_.getTypeIDForPutTokenIndex(token.
index()));
244 template <
typename PROD,
typename... Args>
249 emplaceImpl<PROD>(token.
index(), std::forward<Args>(
args)...);
252 template <
typename PROD,
typename... Args>
259 provRecorder_.getTypeIDForPutTokenIndex(token.
index()));
262 emplaceImpl(token.
index(), std::forward<Args>(
args)...);
265 template <
typename PROD,
typename... Args>
267 assert(index < putProducts().
size());
274 maybe_inserter(&(wp->bareProduct()));
279 template <
typename PROD>
281 return getByLabel(label, emptyString_, result);
284 template <
typename PROD>
286 if (!provRecorder_.checkIfComplete<PROD>()) {
291 TypeID(
typeid(PROD)), label, productInstanceName, emptyString_, moduleCallingContext_);
292 result = convert_handle<PROD>(
std::move(bh));
300 template <
typename PROD>
302 if (!provRecorder_.checkIfComplete<PROD>()) {
306 BasicHandle bh = provRecorder_.getByLabel_(
TypeID(
typeid(PROD)), tag, moduleCallingContext_);
307 result = convert_handle<PROD>(
std::move(bh));
314 template <
typename PROD>
316 if (!provRecorder_.checkIfComplete<PROD>()) {
321 result = convert_handle<PROD>(
std::move(bh));
328 template <
typename PROD>
330 if (!provRecorder_.checkIfComplete<PROD>()) {
335 result = convert_handle<PROD>(
std::move(bh));
342 template <
typename PROD>
344 if (!provRecorder_.checkIfComplete<PROD>()) {
348 return convert_handle<PROD>(
std::move(bh));
351 template <
typename PROD>
353 if (!provRecorder_.checkIfComplete<PROD>()) {
357 return *convert_handle<PROD>(
std::move(bh));
360 template <
typename PROD>
362 if (!provRecorder_.checkIfComplete<PROD>()) {
365 return provRecorder_.getManyByType(results, moduleCallingContext_);
371 template <
typename T>
374 event.getByLabel(
tag, handle);
379 template <
typename T>
382 event.getByToken(token, handle);
387 template <
typename T>
390 event.getByToken(token, handle);
397 #endif // FWCore_Framework_Run_h
bool getByLabel(std::string const &label, Handle< PROD > &result) const
static const std::string emptyString_
PROD const & get(EDGetTokenT< PROD > token) const (false)
ProductPtrVec putProducts_
ProductPtrVec const & putProducts() const
RunAuxiliary const & aux_
std::vector< edm::propagate_const< std::unique_ptr< WrapperBase > > > ProductPtrVec
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
void emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
void put(edm::Event &evt, double value, const char *instanceName)
unsigned long CacheIdentifier_t
bool isUninitialized() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
void throwOnPutOfWrongType(std::type_info const &wrongType, TypeID const &rightType)
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
RunAuxiliary const & runAuxiliary() const override
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void setSharedResourcesAcquirer(SharedResourcesAcquirer *iResourceAcquirer)
SharedResourcesAcquirer * sharedResourcesAcquirer_
void getManyByType(std::vector< Handle< PROD >> &results) const
T const * product() const
ProductPtrVec & putProducts()
void put(std::unique_ptr< PROD > product)
Put a new product.
bool isUninitialized() const
void labelsForToken(EDGetToken const &iToken, ProductLabels &oLabels) const
ModuleCallingContext const * moduleCallingContext() const
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
void emplaceImpl(EDPutToken::value_type token, Args &&...args)
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
void setConsumer(EDConsumerBase const *iConsumer)
PrincipalGetAdapter provRecorder_