-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47117 from Dr15Jones/droppedResolver
Created DroppedDataProductResolver
- Loading branch information
Showing
13 changed files
with
389 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*---------------------------------------------------------------------- | ||
----------------------------------------------------------------------*/ | ||
#include "DroppedDataProductResolver.h" | ||
#include "FWCore/Framework/interface/ProductProvenanceRetriever.h" | ||
|
||
namespace edm { | ||
|
||
DroppedDataProductResolver::Resolution DroppedDataProductResolver::resolveProduct_( | ||
Principal const& principal, | ||
bool skipCurrentProcess, | ||
SharedResourcesAcquirer* sra, | ||
ModuleCallingContext const* mcc) const { | ||
return Resolution(nullptr); | ||
} | ||
void DroppedDataProductResolver::prefetchAsync_(WaitingTaskHolder waitTask, | ||
Principal const& principal, | ||
bool skipCurrentProcess, | ||
ServiceToken const& token, | ||
SharedResourcesAcquirer* sra, | ||
ModuleCallingContext const* mcc) const noexcept {} | ||
|
||
void DroppedDataProductResolver::retrieveAndMerge_( | ||
Principal const& principal, MergeableRunProductMetadata const* mergeableRunProductMetadata) const {} | ||
|
||
void DroppedDataProductResolver::setProductProvenanceRetriever_(ProductProvenanceRetriever const* provRetriever) { | ||
m_provenance.setStore(provRetriever); | ||
} | ||
|
||
} // namespace edm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#ifndef FWCore_Framework_DroppedDataProductResolver_h | ||
#define FWCore_Framework_DroppedDataProductResolver_h | ||
|
||
/*---------------------------------------------------------------------- | ||
DroppedDataProductResolver: Handles case of a DataProduct which was dropped on output | ||
----------------------------------------------------------------------*/ | ||
|
||
#include "FWCore/Framework/interface/ProductResolverBase.h" | ||
|
||
namespace edm { | ||
class DroppedDataProductResolver : public ProductResolverBase { | ||
public: | ||
DroppedDataProductResolver(std::shared_ptr<BranchDescription const> bd) | ||
: ProductResolverBase(), m_provenance(std::move(bd), {}) {} | ||
|
||
void connectTo(ProductResolverBase const&, Principal const*) final {} | ||
|
||
private: | ||
Resolution resolveProduct_(Principal const& principal, | ||
bool skipCurrentProcess, | ||
SharedResourcesAcquirer* sra, | ||
ModuleCallingContext const* mcc) const final; | ||
void prefetchAsync_(WaitingTaskHolder waitTask, | ||
Principal const& principal, | ||
bool skipCurrentProcess, | ||
ServiceToken const& token, | ||
SharedResourcesAcquirer* sra, | ||
ModuleCallingContext const* mcc) const noexcept final; | ||
|
||
void retrieveAndMerge_(Principal const& principal, | ||
MergeableRunProductMetadata const* mergeableRunProductMetadata) const final; | ||
bool productUnavailable_() const final { return true; } | ||
bool productResolved_() const final { return true; } | ||
bool productWasDeleted_() const final { return false; } | ||
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final { return false; } | ||
bool unscheduledWasNotRun_() const final { return false; } | ||
void resetProductData_(bool deleteEarly) final {} | ||
BranchDescription const& branchDescription_() const final { return m_provenance.branchDescription(); } | ||
void resetBranchDescription_(std::shared_ptr<BranchDescription const> bd) final { | ||
m_provenance.setBranchDescription(bd); | ||
} | ||
Provenance const* provenance_() const final { return &m_provenance; } | ||
|
||
std::string const& resolvedModuleLabel_() const final { return moduleLabel(); } | ||
void setProductProvenanceRetriever_(ProductProvenanceRetriever const* provRetriever) final; | ||
void setProductID_(ProductID const& pid) final { m_provenance.setProductID(pid); } | ||
ProductProvenance const* productProvenancePtr_() const final { return m_provenance.productProvenance(); } | ||
bool singleProduct_() const final { return true; } | ||
|
||
Provenance m_provenance; | ||
}; | ||
} // namespace edm | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.