42 <<
"Principal::" << where <<
": Found " << nFound <<
" products rather than one which match all criteria\n"
43 <<
"Looking for type: " << productType <<
"\n";
50 <<
"Principal::" << where <<
": no product with given branch id: "<< bid <<
"\n";
57 <<
"Principal::" << where <<
": Product on branch " << branchName <<
" occurs twice in the same event.\n";
61 boost::shared_ptr<cms::Exception>
64 *exception <<
"Principal::" << where <<
": Found zero products matching all criteria\nLooking for type: " << productType <<
"\n";
69 boost::shared_ptr<cms::Exception>
72 *exception <<
"Principal::" << where <<
": Found zero products matching all criteria\nLooking for type: " << productType <<
"\n"
73 <<
"Looking for module label: " << label <<
"\n" <<
"Looking for productInstanceName: " << instance <<
"\n"
74 << (process.empty() ?
"" :
"Looking for process: ") << process <<
"\n";
82 *exception <<
"Principal::" << where <<
": The product matching all criteria\nLooking for type: " << productType <<
"\n"
83 <<
"Looking for module label: " << label <<
"\n" <<
"Looking for productInstanceName: " << instance <<
"\n"
84 << (process.empty() ?
"" :
"Looking for process: ") << process <<
"\n"
85 <<
"Was already deleted. This means there is a configuration error.\nThe module which is asking for this data must be configured to state that it will read this data.";
104 processHistoryPtr_(0),
106 processConfiguration_(&pc),
112 historyAppender_(historyAppender) {
115 std::string
const source(
"source");
117 for(ProductRegistry::ProductList::const_iterator itProdInfo = prodsList.begin(),
118 itProdInfoEnd = prodsList.end();
119 itProdInfo != itProdInfoEnd;
121 if(itProdInfo->second.branchType() ==
branchType_) {
124 if(bd->moduleLabel() ==
source) {
126 }
else if(bd->onDemand()) {
164 for(ProductRegistry::ProductList::const_iterator itProdInfo = prodsList.begin(),
165 itProdInfoEnd = prodsList.end();
166 itProdInfo != itProdInfoEnd;
168 if(!itProdInfo->second.produced() && (itProdInfo->second.branchType() ==
branchType_)) {
211 (*i)->resetProductData();
246 inputProcessHistory = registry->
getMapped(hist);
247 if (inputProcessHistory == 0) {
249 <<
"Principal::fillPrincipal\n"
250 <<
"Input ProcessHistory not found in registry\n"
251 <<
"Contact a Framework developer\n";
260 preg_->productLookup().reorderIfNecessary(
branchType_, *inputProcessHistory,
262 preg_->elementLookup().reorderIfNecessary(
branchType_, *inputProcessHistory,
301 <<
"addGroupOrThrow: Problem found while adding product, "
302 <<
"product already exists for ("
328 if(resolveProd && !g->productUnavailable()) {
340 preg_->productLookup(),
356 std::string
const&
label,
357 std::string
const& productInstanceName,
358 std::string
const& processName,
359 size_t& cachedOffset,
360 int& fillCount)
const {
363 preg_->productLookup(),
371 boost::shared_ptr<cms::Exception> whyFailed =
makeNotFoundException(
"getByLabel", productType, label, productInstanceName, processName);
384 preg_->productLookup(),
398 preg_->productLookup(),
420 preg_->productLookup(),
434 preg_->elementLookup(),
444 assert(results.empty());
451 if(range.first == range.second) {
455 results.reserve(range.second - range.first);
459 if(selector.
match(*(it->branchDescription()))) {
464 if(group && group->productWasDeleted()) {
467 it->branchDescription()->moduleLabel(),
468 it->branchDescription()->productInstanceName(),
469 it->branchDescription()->processName());
473 if(group && !group->productUnavailable()) {
478 if(group->product() && !group->productUnavailable() && !group->onDemand()) {
481 results.push_back(bh);
486 return results.size();
503 if(range.first == range.second) {
509 if(it->processIndex() > processLevelFound) {
514 if(selector.
match(*(it->branchDescription()))) {
518 if(group && group->productWasDeleted()) {
521 it->branchDescription()->moduleLabel(),
522 it->branchDescription()->productInstanceName(),
523 it->branchDescription()->processName());
527 if(group && !group->productUnavailable()) {
532 if(group->product() && !group->productUnavailable() && !group->onDemand()) {
533 if(it->processIndex() < processLevelFound) {
534 processLevelFound = it->processIndex();
553 std::string
const& moduleLabel,
554 std::string
const& productInstanceName,
555 std::string
const& processName,
556 size_t& cachedOffset,
557 int& fillCount)
const {
560 bool isCached = (fillCount > 0 && fillCount == typeLookup.
fillCount());
561 bool toBeCached = (fillCount >= 0 && !isCached);
563 std::pair<TypeLookup::const_iterator, TypeLookup::const_iterator> range =
567 cachedOffset = range.first - typeLookup.
begin();
571 if(range.first == range.second) {
573 cachedOffset = typeLookup.
end() - typeLookup.
begin();
580 if(typeRange.first == typeRange.second) {
586 if(!processName.empty()) {
588 assert(processName == range.first->branchDescription()->processName());
589 range.second = range.first + 1;
590 }
else if(toBeCached) {
591 bool processFound =
false;
593 if(it->isFirst() && it != range.first) {
596 if(processName == it->branchDescription()->processName()) {
599 cachedOffset = range.first - typeLookup.
begin();
600 range.second = range.first + 1;
605 cachedOffset = typeLookup.
end() - typeLookup.
begin();
612 if(it->isFirst() && it != range.first) {
615 if(!processName.empty() && processName != it->branchDescription()->processName()) {
620 if(group && group->productWasDeleted()) {
629 if(group && !group->productUnavailable()) {
633 if(group->product() && !group->productUnavailable() && !group->onDemand()) {
635 return &group->productData();
646 preg_->productLookup(),
652 if(productData == 0) {
664 if (g->productWasDeleted()) {
667 g->productInstanceName(),
670 if(!g->provenance() || (!g->product() && !g->productProvenancePtr())) {
673 return OutputHandle(
WrapperHolder(g->product().get(), g->productData().getInterface()), &g->branchDescription(), g->productProvenancePtr());
692 return *g->provenance();
702 if((*i)->provenanceAvailable()) {
705 if((*i)->provenance()->product().present()) {
706 provenances.push_back((*i)->provenance());
714 for (std::vector<BranchID>::const_iterator it = bids.begin(), itEnd = bids.end(); it != itEnd; ++it) {
794 for(ProductRegistry::ProductList::const_iterator itProdInfo = prodsList.begin(),
795 itProdInfoEnd = prodsList.end();
796 itProdInfo != itProdInfoEnd;
798 if(itProdInfo->second.branchType() ==
branchType_) {
803 assert(!itProdInfo->second.produced());
std::string const & processName() const
void maybeFlushCache(TypeID const &tid, InputTag const &tag) const
ProductRegistry const & productRegistry() const
size_t findGroup(TypeID const &typeID, TypeLookup const &typeLookup, SelectorBase const &selector, BasicHandle &result) const
void addGroupScheduled(boost::shared_ptr< ConstBranchDescription > bd)
HistoryAppender * historyAppender_
ConstProductList & constProductList() const
static void throwNotFoundException(char const *where, TypeID const &productType, InputTag const &tag)
BasicHandle getByLabel(TypeID const &tid, std::string const &label, std::string const &productInstanceName, std::string const &processName, size_t &cachedOffset, int &fillCount) const
const_iterator end() const
const_iterator end() const
void addGroup_(std::auto_ptr< Group > g)
static PFTauRenderPlugin instance
Group * getExistingGroup(BranchID const &branchID)
void addGroupOrThrow(std::auto_ptr< Group > g)
ConstGroupPtr getGroup(BranchID const &oid, bool resolveProd, bool fillOnDemand) const
std::map< BranchKey, BranchDescription > ProductList
ProcessHistoryID processHistoryID_
void mergeReaders(DelayedReader *other)
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstGroupPtr const g)
static ProductTransientIndex const kInvalidIndex
static boost::shared_ptr< cms::Exception > makeNotFoundException(char const *where, TypeID const &productType)
void getAllProvenance(std::vector< Provenance const * > &provenances) const
static void throwCorruptionException(char const *where, std::string const &branchName)
static ThreadSafeRegistry * instance()
CachedHistory const & appendToProcessHistory(ProcessHistoryID const &inputPHID, ProcessConfiguration const &pc)
boost::shared_ptr< ProductRegistry const > preg_
ProcessHistory const * processHistoryPtr_
std::string const & friendlyClassName() const
void addGroupSource(boost::shared_ptr< ConstBranchDescription > bd)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
ProductData const * findGroupByTag(TypeID const &typeID, InputTag const &tag) const
void resolveProduct(Group const &g, bool fillOnDemand) const
ProductLookupIndexList::const_iterator const_iterator
bool match(ConstBranchDescription const &p) const
std::string const & processName() const
Group const * ConstGroupPtr
ProductList const & productList() const
U second(std::pair< T, U > const &p)
ProcessHistoryID const & processHistoryID() const
static void throwGroupNotFoundException(char const *where, errors::ErrorCodes error, BranchID const &bid)
const_iterator begin() const
bool const & dropped() const
bool getMapped(key_type const &k, value_type &result) const
boost::shared_ptr< Group > SharedGroupPtr
const T & max(const T &a, const T &b)
void getMany(TypeID const &tid, SelectorBase const &, BasicHandleVec &results) const
std::string const & productInstanceName() const
BranchType const & branchType() const
size_t findGroups(TypeID const &typeID, TypeLookup const &typeLookup, SelectorBase const &selector, BasicHandleVec &results) const
ProductData const * findGroupByLabel(TypeID const &typeID, TypeLookup const &typeLookup, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, size_t &cachedOffset, int &fillCount) const
void checkDictionaries(std::string const &name, bool noComponents=false)
size_t getMatchingSequence(TypeID const &typeID, SelectorBase const &selector, BasicHandle &result) const
BranchID const & branchID() const
OutputHandle getForOutput(BranchID const &bid, bool getProd) const
static void throwMultiFoundException(char const *where, int nFound, TypeID const &productType)
std::string className() const
Hash< ProcessHistoryType > ProcessHistoryID
void throwMissingDictionariesException()
std::set< void const * > productPtrs_
bool putOrMergeProduct() const
DelayedReader * reader() const
ConstGroupPtr getGroupByIndex(ProductTransientIndex const &oid, bool resolveProd, bool fillOnDemand) const
static void maybeThrowMissingDictionaryException(TypeID const &productType, bool isElement, std::vector< std::string > const &missingDictionaries)
std::string const & className() const
boost::shared_ptr< void const > product() const
std::string wrappedClassName(std::string const &iFullName)
std::pair< const_iterator, const_iterator > equal_range(TypeInBranchType const &) const
returns a pair of iterators that define the range for items matching the TypeInBranchType ...
const_iterator begin() const
void mergeProduct(WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
virtual WrapperHolder getIt(ProductID const &) const
void checkType(WrapperOwningHolder const &prod) const
void getManyByType(TypeID const &tid, BasicHandleVec &results) const
std::string const & branchName() const
void addGroupInput(boost::shared_ptr< ConstBranchDescription > bd)
BasicHandle getByType(TypeID const &tid) const
boost::filter_iterator< FilledGroupPtr, GroupCollection::const_iterator > const_iterator
author Stefano ARGIRO author Bill Tanenbaum
virtual bool unscheduledFill(std::string const &moduleLabel) const =0
bool adjustToNewProductRegistry(ProductRegistry const ®)
BasicHandle getBySelector(TypeID const &tid, SelectorBase const &s) const
Principal(boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender)
void resetBranchDescription(boost::shared_ptr< ConstBranchDescription > bd)
std::vector< boost::shared_ptr< Group > > GroupCollection
void fillPrincipal(ProcessHistoryID const &hist, DelayedReader *reader)
bool binary_search_all(ForwardSequence const &s, Datum const &d)
wrappers for std::binary_search
TransientProductLookupMap TypeLookup
void adjustIndexesAfterProductRegistryAddition()
bool productUnavailable() const
void const * wrapper() const
void putProduct(WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
ProcessHistory const * processHistory() const
static ProcessHistory emptyProcessHistory_
void reset(double vett[256])
Provenance getProvenance(BranchID const &bid) const
void recombine(Principal &other, std::vector< BranchID > const &bids)
ProcessHistory const * inputProcessHistory() const
void checkUniquenessAndType(WrapperOwningHolder const &prod, Group const *group) const
ProcessConfiguration const * processConfiguration_
tuple size
Write out results.
ConstBranchDescription const & branchDescription() const
std::vector< BasicHandle > BasicHandleVec
std::string const & moduleLabel() const
void addOnDemandGroup(boost::shared_ptr< ConstBranchDescription > bd)
void putOrMerge(WrapperOwningHolder const &prod, Group const *group) const
void deleteProduct(BranchID const &id)