1 #ifndef FWCore_Framework_LuminosityBlock_h 2 #define FWCore_Framework_LuminosityBlock_h 38 class ModuleCallingContext;
44 class ProducingModuleAdaptorBase;
69 CacheIdentifier_t cacheIdentifier()
const;
78 template <
typename PROD>
81 template <
typename PROD>
85 template <
typename PROD>
88 template <
typename PROD>
91 template <
typename PROD>
94 template <
typename PROD>
97 template <
typename PROD>
100 template <
typename PROD>
101 void getManyByType(std::vector<
Handle<PROD>>& results)
const;
106 template <
typename PROD>
107 void put(std::unique_ptr<PROD> product) {
112 template <
typename PROD>
113 void put(std::unique_ptr<PROD> product,
std::string const& productInstanceName);
115 template <
typename PROD>
118 template <
typename PROD>
122 template <
typename PROD,
typename... Args>
125 template <
typename PROD,
typename... Args>
130 void getAllStableProvenance(std::vector<StableProvenance const*>& provenances)
const;
139 provRecorder_.labelsForToken(iToken, oLabels);
146 BasicHandle getByLabelImpl(std::type_info
const& iWrapperType,
147 std::type_info
const& iProductType,
148 InputTag const& iTag)
const override;
150 template <
typename PROD>
153 template <
typename PROD,
typename... Args>
156 typedef std::vector<edm::propagate_const<std::unique_ptr<WrapperBase>>>
ProductPtrVec;
166 template <
typename T>
169 void commit_(std::vector<edm::ProductResolverIndex>
const& iShouldPut);
174 std::shared_ptr<Run const>
const run_;
180 template <
typename PROD>
185 maybe_inserter(product.get());
187 assert(index < putProducts().
size());
193 template <
typename PROD>
195 if (
UNLIKELY(product.get() ==
nullptr)) {
199 auto index = provRecorder_.getPutTokenIndex(
TypeID(*product), productInstanceName);
203 template <
typename PROD>
208 "LuminosityBlock", typeID, provRecorder_.productInstanceLabel(token));
216 template <
typename PROD>
221 "LuminosityBlock", typeID, provRecorder_.productInstanceLabel(token));
228 provRecorder_.getTypeIDForPutTokenIndex(token.
index()));
234 template <
typename PROD,
typename... Args>
239 emplaceImpl<PROD>(token.
index(), std::forward<Args>(
args)...);
242 template <
typename PROD,
typename... Args>
249 provRecorder_.getTypeIDForPutTokenIndex(token.
index()));
252 emplaceImpl(token.
index(), std::forward<Args>(
args)...);
255 template <
typename PROD,
typename... Args>
257 assert(index < putProducts().
size());
264 maybe_inserter(&(wp->bareProduct()));
269 template <
typename PROD>
271 return getByLabel(label, emptyString_, result);
274 template <
typename PROD>
278 if (!provRecorder_.checkIfComplete<PROD>()) {
283 TypeID(
typeid(PROD)), label, productInstanceName, emptyString_, moduleCallingContext_);
284 result = convert_handle<PROD>(
std::move(bh));
292 template <
typename PROD>
294 if (!provRecorder_.checkIfComplete<PROD>()) {
298 BasicHandle bh = provRecorder_.getByLabel_(
TypeID(
typeid(PROD)), tag, moduleCallingContext_);
299 result = convert_handle<PROD>(
std::move(bh));
306 template <
typename PROD>
308 if (!provRecorder_.checkIfComplete<PROD>()) {
313 result = convert_handle<PROD>(
std::move(bh));
320 template <
typename PROD>
322 if (!provRecorder_.checkIfComplete<PROD>()) {
327 result = convert_handle<PROD>(
std::move(bh));
334 template <
typename PROD>
337 UNLIKELY(!provRecorder_.checkIfComplete<PROD>()) {
341 return convert_handle<PROD>(
std::move(bh));
344 template <
typename PROD>
347 UNLIKELY(!provRecorder_.checkIfComplete<PROD>()) {
351 return *convert_handle<PROD>(
std::move(bh));
354 template <
typename PROD>
356 if (!provRecorder_.checkIfComplete<PROD>()) {
359 return provRecorder_.getManyByType(results, moduleCallingContext_);
365 template <
typename T>
368 event.getByLabel(
tag, handle);
373 template <
typename T>
376 event.getByToken(token, handle);
381 template <
typename T>
384 event.getByToken(token, handle);
391 #endif // FWCore_Framework_LuminosityBlock_h
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
ProductPtrVec putProducts_
PROD const & get(EDGetTokenT< PROD > token) const (false)
std::shared_ptr< Run const > const run_
static const std::string emptyString_
ModuleCallingContext const * moduleCallingContext() const
bool getByLabel(std::string const &label, Handle< PROD > &result) const
void emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
ProductPtrVec const & putProducts() const
void put(edm::Event &evt, double value, const char *instanceName)
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
LuminosityBlockAuxiliary const & luminosityBlockAuxiliary() const override
unsigned long CacheIdentifier_t
bool isUninitialized() const
LuminosityBlockAuxiliary const & aux_
void put(std::unique_ptr< PROD > product)
Put a new product.
void throwOnPutOfWrongType(std::type_info const &wrongType, TypeID const &rightType)
ProductPtrVec & putProducts()
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 emplaceImpl(EDPutToken::value_type token, Args &&...args)
void getManyByType(std::vector< Handle< PROD >> &results) const
std::vector< edm::propagate_const< std::unique_ptr< WrapperBase > > > ProductPtrVec
void labelsForToken(EDGetToken const &iToken, ProductLabels &oLabels) const
T const * product() const
ModuleCallingContext const * moduleCallingContext_
bool isUninitialized() const
PrincipalGetAdapter provRecorder_
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Run const & getRun() const