From 7b9b15735f25ace8b65498cf6019b05f94b64698 Mon Sep 17 00:00:00 2001 From: nkx Nicholas Date: Mon, 21 Feb 2022 12:43:59 +0800 Subject: [PATCH 1/2] fixed calling of external process's endprocess() method --- source/framework/core/src/TRestProcessRunner.cxx | 3 ++- source/framework/core/src/TRestRun.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/framework/core/src/TRestProcessRunner.cxx b/source/framework/core/src/TRestProcessRunner.cxx index 1064df9dd..612c480cd 100644 --- a/source/framework/core/src/TRestProcessRunner.cxx +++ b/source/framework/core/src/TRestProcessRunner.cxx @@ -466,11 +466,12 @@ 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() != NULL) fRunInfo->GetFileProcess()->EndProcess(); fProcStatus = kFinished; #ifdef TIME_MEASUREMENT diff --git a/source/framework/core/src/TRestRun.cxx b/source/framework/core/src/TRestRun.cxx index 56f801f10..9eb4af106 100644 --- a/source/framework/core/src/TRestRun.cxx +++ b/source/framework/core/src/TRestRun.cxx @@ -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; } From 55bf0fda314536be519c18f6fdff887ff20fecc8 Mon Sep 17 00:00:00 2001 From: Luis Obis <35803280+lobis@users.noreply.github.com> Date: Tue, 8 Mar 2022 11:58:36 +0100 Subject: [PATCH 2/2] TRestProcessRunner - Formatting --- source/framework/core/src/TRestProcessRunner.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/framework/core/src/TRestProcessRunner.cxx b/source/framework/core/src/TRestProcessRunner.cxx index 612c480cd..b8683a56e 100644 --- a/source/framework/core/src/TRestProcessRunner.cxx +++ b/source/framework/core/src/TRestProcessRunner.cxx @@ -471,7 +471,9 @@ void TRestProcessRunner::RunProcess() { for (int i = 0; i < fThreadNumber; i++) { fThreads[i]->EndProcess(); } - if (fRunInfo->GetFileProcess() != NULL) fRunInfo->GetFileProcess()->EndProcess(); + if (fRunInfo->GetFileProcess()) { + fRunInfo->GetFileProcess()->EndProcess(); + } fProcStatus = kFinished; #ifdef TIME_MEASUREMENT