Skip to content

[15_0_X] Remove FinalPath from the framework #47583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions FWCore/Framework/interface/EDConsumerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ namespace edm {
return ESGetTokenGeneric(static_cast<unsigned int>(Tr), index, iRecord.type());
}

//used for FinalPath
void resetItemsToGetFrom(BranchType iType) { itemsToGetFromBranch_[iType].clear(); }

private:
virtual void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const&);
virtual void registerLateConsumes(eventsetup::ESRecordsToProductResolverIndices const&) {}
Expand Down
2 changes: 0 additions & 2 deletions FWCore/Framework/interface/OutputModuleCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ namespace edm {
bool wantAllEvents_;
std::vector<detail::TriggerResultsBasedEventSelector> selectors_;
ParameterSet selectEvents_;
std::vector<EDGetToken> tokensForEndPaths_; //needed for FinalPath
bool onFinalPath_ = false;
// ID of the ParameterSet that configured the event selector
// subsystem.
ParameterSetID selector_config_id_;
Expand Down
33 changes: 2 additions & 31 deletions FWCore/Framework/src/OutputModuleCore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,6 @@ namespace edm {
selectors_.resize(1);
wantAllEvents_ = detail::configureEventSelector(
selectEvents_, process_name_, getAllTriggerNames(), selectors_[0], consumesCollector());

//Check if on final path
if (pset.exists("@onFinalPath")) {
onFinalPath_ = pset.getUntrackedParameter<bool>("@onFinalPath");
}
if (onFinalPath_) {
wantAllEvents_ = false;
if (not getAllTriggerNames().empty() and selectors_.front().numberOfTokens() == 0) {
//need to wait for trigger paths to finish
tokensForEndPaths_.push_back(consumes<TriggerResults>(edm::InputTag("TriggerResults", "", process_name_)));
}
//need to wait for EndPaths to finish
for (auto const& n : tns->getEndPaths()) {
if (n == "@finalPath") {
continue;
}
tokensForEndPaths_.push_back(consumes<EndPathStatus>(edm::InputTag(n, "", process_name_)));
}
}
}

void OutputModuleCore::configure(OutputModuleDescription const& desc) {
Expand Down Expand Up @@ -249,13 +230,7 @@ namespace edm {

void OutputModuleCore::preallocLumis(unsigned int) {}

void OutputModuleCore::doBeginJob_() {
this->beginJob();
if (onFinalPath_) {
//this stops prefetching of the data products
resetItemsToGetFrom(edm::InEvent);
}
}
void OutputModuleCore::doBeginJob_() { this->beginJob(); }

void OutputModuleCore::doEndJob() { endJob(); }

Expand All @@ -273,14 +248,11 @@ namespace edm {
std::vector<ProductResolverIndexAndSkipBit> returnValue;
auto const& s = selectors_[0];
auto const n = s.numberOfTokens();
returnValue.reserve(n + tokensForEndPaths_.size());
returnValue.reserve(n);

for (unsigned int i = 0; i < n; ++i) {
returnValue.emplace_back(uncheckedIndexFrom(s.token(i)));
}
for (auto token : tokensForEndPaths_) {
returnValue.emplace_back(uncheckedIndexFrom(token));
}
return returnValue;
}

Expand Down Expand Up @@ -400,7 +372,6 @@ namespace edm {
std::vector<std::string> const& defaultOutputCommands) {
ProductSelectorRules::fillDescription(desc, "outputCommands", defaultOutputCommands);
EventSelector::fillDescription(desc);
desc.addOptionalNode(ParameterDescription<bool>("@onFinalPath", false, false), false);
}

void OutputModuleCore::prevalidate(ConfigurationDescriptions&) {}
Expand Down
1 change: 0 additions & 1 deletion FWCore/Framework/src/Schedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ namespace edm {
std::string("PathStatusInserter"));

if (endPathNames_->size() > 1) {
//NOTE: FinalPaths are a type of EndPath
makePathStatusInserters(endPathStatusInserters_,
*endPathNames_,
prealloc,
Expand Down
2 changes: 0 additions & 2 deletions FWCore/Integration/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@
<flags PRE_TEST="TestIntegrationProcessBlock23"/>
<flags PRE_TEST="TestIntegrationProcessBlock24"/>
</test>
<test name="TestIntegrationFinalPath" command="test_finalpath.sh"/>

<test name="TestIntegrationGetByLabel" command="run_TestGetByLabel.sh"/>

<test name="TestMaybeUninitializedIntProduct" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/testMaybeUninitializedIntProductPart1_cfg.py &amp;&amp; cmsRun ${LOCALTOP}/src/FWCore/Integration/test/testMaybeUninitializedIntProductPart2_cfg.py"/>
Expand Down
76 changes: 0 additions & 76 deletions FWCore/Integration/test/test_finalpath.sh

This file was deleted.

65 changes: 0 additions & 65 deletions FWCore/Integration/test/test_finalpath_cfg.py

This file was deleted.

Loading