Skip to content

Commit

Permalink
Merge pull request #141 from rest-for-physics/nkx-patch-endprocess
Browse files Browse the repository at this point in the history
fixed calling of external process's endprocess() method
  • Loading branch information
nkx111 authored Mar 8, 2022
2 parents 2b04de4 + 55bf0fd commit b8f82a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion source/framework/core/src/TRestProcessRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,14 @@ void TRestProcessRunner::RunProcess() {
if (finish) break;
}

// make analysis tree filled with observables, which may used in EndProcess()
fAnalysisTree->GetEntry(fAnalysisTree->GetEntries() - 1);
for (int i = 0; i < fThreadNumber; i++) {
fThreads[i]->EndProcess();
}

if (fRunInfo->GetFileProcess()) {
fRunInfo->GetFileProcess()->EndProcess();
}
fProcStatus = kFinished;

#ifdef TIME_MEASUREMENT
Expand Down
2 changes: 1 addition & 1 deletion source/framework/core/src/TRestRun.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ Int_t TRestRun::GetNextEvent(TRestEvent* targetevt, TRestAnalysisTree* targettre
goto GetEventExt;
}
fInputEvent = eve;
if (fFileProcess != nullptr) fFileProcess->EndProcess();
// if (fFileProcess != nullptr) fFileProcess->EndProcess();
return -1;
}

Expand Down

0 comments on commit b8f82a4

Please sign in to comment.