11 #include "cetlib/HorizontalRule.h" 12 #include "cetlib/container_algorithms.h" 24 bool const recordParents,
25 cet::exempt_ptr<Consumer> consumer)
62 string const& productInstanceName,
63 string const& processName)
const 66 wrapped, label, productInstanceName, processName);
71 string const& productInstanceName,
72 string const& processName)
const 92 auto const& parents = prov.
parents();
102 std::vector<ProductID> result;
110 std::set<TypeLabel>
const& expectedProducts,
116 std::vector<std::string> missing;
117 for (
auto const& typeLabel : expectedProducts) {
118 if (putProducts.find(typeLabel) != putProducts.cend())
121 std::ostringstream desc;
123 typeLabel.productInstanceName());
124 missing.emplace_back(desc.str());
127 if (!missing.empty()) {
128 std::ostringstream errmsg;
129 HorizontalRule rule{25};
130 errmsg <<
"The following products have been declared with 'produces',\n" 131 <<
"but they have not been placed onto the event:\n" 132 << rule(
'=') <<
'\n';
133 for (
auto const& desc : missing) {
134 errmsg << desc << rule(
'=') <<
'\n';
143 string const& productInstanceName)
const 150 productInstanceName);
159 auto not_convertible = [&requestedElementType](
auto const& query_result) {
163 auto group = query_result.result();
164 assert(group->productDescription().supportsView());
165 auto p = group->uniqueProduct();
169 results.erase(std::remove_if(
begin(results),
end(results), not_convertible),
176 std::string
const& moduleLabel,
177 std::string
const& productInstanceName,
178 std::string
const& processName)
const 184 e <<
"getView: Found " 185 << (nFound == 0 ?
"no products" :
"more than one product")
186 <<
" matching all criteria\n" 187 <<
"Looking for sequence of type: " << typeID <<
"\n" 188 <<
"Looking for module label: " << moduleLabel <<
"\n" 189 <<
"Looking for productInstanceName: " << productInstanceName <<
"\n";
190 if (!processName.empty())
191 e <<
"Looking for processName: " << processName <<
"\n";
std::vector< ProductID > const & parents() const
BranchDescription const & get_ProductDescription(BranchType branch_type, std::string const &module_label, std::string const &instance_name)
Principal const & principal_
void recordAsParent(Provenance const &prov) const
void ensureUniqueProduct_(std::size_t nFound, TypeID const &typeID, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName) const
GroupQueryResult get_(WrappedTypeID const &wrapped, SelectorBase const &) const
void removeCachedProduct(ProductID const pid) const
ProcessHistory const & processHistory() const
GroupQueryResult getBySelector(WrappedTypeID const &wrapped, SelectorBase const &) const
BranchDescription const & getProductDescription(TypeID const &type, std::string const &productInstanceName) const
BranchType const branchType_
cet::exempt_ptr< Consumer > consumer_
ProductID const & productID() const
void removeNonViewableMatches_(TypeID const &requestedElementType, GroupQueryResultVec &results) const
std::map< TypeLabel, PMValue > TypeLabelMap
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
std::vector< ProductID > RetrievedProductIDs
GroupQueryResultVec getMatchingSequence(SelectorBase const &) const
std::type_info const & typeInfo() const
ModuleDescription const & md_
std::string const & processName() const
GroupQueryResult getByProductID_(ProductID const pid) const
GroupQueryResult getByLabel_(WrappedTypeID const &wrapped, std::string const &label, std::string const &productInstanceName, std::string const &processName) const
GroupQueryResultVec getMany(WrappedTypeID const &wrapped, SelectorBase const &) const
GroupQueryResultVec getMany_(WrappedTypeID const &wrapped, SelectorBase const &sel) const
std::string const & moduleLabel() const
GroupQueryResultVec getMatchingSequenceByLabel_(std::string const &label, std::string const &productInstanceName, std::string const &processName) const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::vector< GroupQueryResult > GroupQueryResultVec
void removeCachedProduct_(ProductID const pid) const
RetrievedProductSet retrievedProducts_
TypeLabelMap & putProducts()
ProcessHistory const & processHistory() const
RetrievedProductIDs retrievedProductIDs() const
bool upcastAllowed(std::type_info const &tiFrom, std::type_info const &tiTo)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
BranchDescription const & productDescription() const
TypeLabelMap putProducts_
void checkPutProducts(bool checkProducts, std::set< TypeLabel > const &expectedProducts, TypeLabelMap const &putProducts)
GroupQueryResult getByProductID(ProductID const pid) const
GroupQueryResult getByLabel(WrappedTypeID const &wrapped, std::string const &label, std::string const &productInstanceName, std::string const &processName) const
bool const recordParents_