Skip to content

Commit e175131

Browse files
committed
Remove FinalPath from the framework
The feature was a bit of a workaround that constrained the task scheduling system in weird ways, and is no longer being used in HLT.
1 parent 4eeb0e8 commit e175131

File tree

10 files changed

+7
-356
lines changed

10 files changed

+7
-356
lines changed

FWCore/Framework/interface/EDConsumerBase.h

-3
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ namespace edm {
234234
return ESGetTokenGeneric(static_cast<unsigned int>(Tr), index, iRecord.type());
235235
}
236236

237-
//used for FinalPath
238-
void resetItemsToGetFrom(BranchType iType) { itemsToGetFromBranch_[iType].clear(); }
239-
240237
private:
241238
virtual void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const&);
242239
virtual void registerLateConsumes(eventsetup::ESRecordsToProductResolverIndices const&) {}

FWCore/Framework/interface/OutputModuleCore.h

-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ namespace edm {
180180
bool wantAllEvents_;
181181
std::vector<detail::TriggerResultsBasedEventSelector> selectors_;
182182
ParameterSet selectEvents_;
183-
std::vector<EDGetToken> tokensForEndPaths_; //needed for FinalPath
184-
bool onFinalPath_ = false;
185183
// ID of the ParameterSet that configured the event selector
186184
// subsystem.
187185
ParameterSetID selector_config_id_;

FWCore/Framework/src/OutputModuleCore.cc

+2-31
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,6 @@ namespace edm {
7777
selectors_.resize(1);
7878
wantAllEvents_ = detail::configureEventSelector(
7979
selectEvents_, process_name_, getAllTriggerNames(), selectors_[0], consumesCollector());
80-
81-
//Check if on final path
82-
if (pset.exists("@onFinalPath")) {
83-
onFinalPath_ = pset.getUntrackedParameter<bool>("@onFinalPath");
84-
}
85-
if (onFinalPath_) {
86-
wantAllEvents_ = false;
87-
if (not getAllTriggerNames().empty() and selectors_.front().numberOfTokens() == 0) {
88-
//need to wait for trigger paths to finish
89-
tokensForEndPaths_.push_back(consumes<TriggerResults>(edm::InputTag("TriggerResults", "", process_name_)));
90-
}
91-
//need to wait for EndPaths to finish
92-
for (auto const& n : tns->getEndPaths()) {
93-
if (n == "@finalPath") {
94-
continue;
95-
}
96-
tokensForEndPaths_.push_back(consumes<EndPathStatus>(edm::InputTag(n, "", process_name_)));
97-
}
98-
}
9980
}
10081

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

250231
void OutputModuleCore::preallocLumis(unsigned int) {}
251232

252-
void OutputModuleCore::doBeginJob_() {
253-
this->beginJob();
254-
if (onFinalPath_) {
255-
//this stops prefetching of the data products
256-
resetItemsToGetFrom(edm::InEvent);
257-
}
258-
}
233+
void OutputModuleCore::doBeginJob_() { this->beginJob(); }
259234

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

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

278253
for (unsigned int i = 0; i < n; ++i) {
279254
returnValue.emplace_back(uncheckedIndexFrom(s.token(i)));
280255
}
281-
for (auto token : tokensForEndPaths_) {
282-
returnValue.emplace_back(uncheckedIndexFrom(token));
283-
}
284256
return returnValue;
285257
}
286258

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

406377
void OutputModuleCore::prevalidate(ConfigurationDescriptions&) {}

FWCore/Framework/src/Schedule.cc

-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@ namespace edm {
515515
std::string("PathStatusInserter"));
516516

517517
if (endPathNames_->size() > 1) {
518-
//NOTE: FinalPaths are a type of EndPath
519518
makePathStatusInserters(endPathStatusInserters_,
520519
*endPathNames_,
521520
prealloc,

FWCore/Integration/test/BuildFile.xml

-2
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@
220220
<flags PRE_TEST="TestIntegrationProcessBlock23"/>
221221
<flags PRE_TEST="TestIntegrationProcessBlock24"/>
222222
</test>
223-
<test name="TestIntegrationFinalPath" command="test_finalpath.sh"/>
224-
225223
<test name="TestIntegrationGetByLabel" command="run_TestGetByLabel.sh"/>
226224

227225
<test name="TestMaybeUninitializedIntProduct" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/testMaybeUninitializedIntProductPart1_cfg.py &amp;&amp; cmsRun ${LOCALTOP}/src/FWCore/Integration/test/testMaybeUninitializedIntProductPart2_cfg.py"/>

FWCore/Integration/test/test_finalpath.sh

-76
This file was deleted.

FWCore/Integration/test/test_finalpath_cfg.py

-65
This file was deleted.

0 commit comments

Comments
 (0)