From a9ed1d33ffbf735fe527d02edc89a22299a64a21 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Mon, 19 Aug 2024 00:54:16 +0200 Subject: [PATCH 1/2] typo in variable name --- source/framework/core/src/TRestProcessRunner.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/framework/core/src/TRestProcessRunner.cxx b/source/framework/core/src/TRestProcessRunner.cxx index f74b45e9b..479eabc92 100644 --- a/source/framework/core/src/TRestProcessRunner.cxx +++ b/source/framework/core/src/TRestProcessRunner.cxx @@ -52,7 +52,7 @@ high_resolution_clock::time_point tS, tE; #endif int ncalculated = 10; -Long64_t bytesReaded_last = 0; +Long64_t bytesRead_last = 0; Double_t prog_last = 0; Int_t prog_last_printed = 0; vector bytesAdded(ncalculated, 0); @@ -1140,8 +1140,8 @@ void TRestProcessRunner::PrintProcessedEvents(Int_t rateE) { fflush(stdout); } - bytesAdded[poscalculated] = fRunInfo->GetBytesRead() - bytesReaded_last; - bytesReaded_last = fRunInfo->GetBytesRead(); + bytesAdded[poscalculated] = fRunInfo->GetBytesRead() - bytesRead_last; + bytesRead_last = fRunInfo->GetBytesRead(); progAdded[poscalculated] = prog - prog_last; prog_last = prog; From 037c1783b47a3db8a933f13d513d8c3339663be5 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Mon, 19 Aug 2024 00:56:37 +0200 Subject: [PATCH 2/2] rename some variables --- .../src/TRestEventRateAnalysisProcess.cxx | 2 +- .../src/TRestEventSelectionProcess.cxx | 2 +- .../framework/core/src/TRestProcessRunner.cxx | 34 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/source/framework/analysis/src/TRestEventRateAnalysisProcess.cxx b/source/framework/analysis/src/TRestEventRateAnalysisProcess.cxx index d1e0eb493..93c9103b1 100644 --- a/source/framework/analysis/src/TRestEventRateAnalysisProcess.cxx +++ b/source/framework/analysis/src/TRestEventRateAnalysisProcess.cxx @@ -65,7 +65,7 @@ /// ///
/// -/// \warning **⚠ REST is under continous development.** This documentation +/// \warning **⚠ REST is under continuous development.** This documentation /// is offered to you by the REST community. Your HELP is needed to keep this /// code up to date. Your feedback will be worth to support this software, please /// report any problems/suggestions you may find will using it at [The REST Framework diff --git a/source/framework/analysis/src/TRestEventSelectionProcess.cxx b/source/framework/analysis/src/TRestEventSelectionProcess.cxx index 01b3c7daa..f0f740575 100644 --- a/source/framework/analysis/src/TRestEventSelectionProcess.cxx +++ b/source/framework/analysis/src/TRestEventSelectionProcess.cxx @@ -46,7 +46,7 @@ /// ///
/// -/// \warning ** REST is under continous development.** This documentation +/// \warning ** REST is under continuous development.** This documentation /// is offered to you by the REST community. Your HELP is needed to keep this code /// up to date. Your feedback will be worth to support this software, please report /// any problems/suggestions you may find while using it at [The REST Framework diff --git a/source/framework/core/src/TRestProcessRunner.cxx b/source/framework/core/src/TRestProcessRunner.cxx index 479eabc92..68fe8b928 100644 --- a/source/framework/core/src/TRestProcessRunner.cxx +++ b/source/framework/core/src/TRestProcessRunner.cxx @@ -52,14 +52,14 @@ high_resolution_clock::time_point tS, tE; #endif int ncalculated = 10; -Long64_t bytesRead_last = 0; -Double_t prog_last = 0; -Int_t prog_last_printed = 0; +Long64_t bytesReadLast = 0; +Double_t progressLast = 0; +Int_t progressLastPrinted = 0; vector bytesAdded(ncalculated, 0); vector progAdded(ncalculated, 0); -int poscalculated = 0; +int positionCalculated = 0; int printInterval = 200000; // 0.2s -int inputtreeentries = 0; +int inputTreeEntries = 0; ClassImp(TRestProcessRunner); @@ -428,7 +428,7 @@ void TRestProcessRunner::RunProcess() { fProcessedEvents = 0; fRunInfo->ResetEntry(); fRunInfo->SetCurrentEntry(fFirstEntry); - inputtreeentries = fRunInfo->GetEntries(); + inputTreeEntries = fRunInfo->GetEntries(); // set root mutex //!!!!!!!!!!!!Important!!!!!!!!!!!! @@ -1098,7 +1098,7 @@ void TRestProcessRunner::PrintProcessedEvents(Int_t rateE) { } else if (fEventsToProcess == REST_MAXIMUM_EVENTS) // Nevents is unknown, reading root file { - prog = fRunInfo->GetCurrentEntry() / (double)inputtreeentries * 100; + prog = fRunInfo->GetCurrentEntry() / (double)inputTreeEntries * 100; } else { prog = fProcessedEvents / (double)fEventsToProcess * 100; } @@ -1113,9 +1113,9 @@ void TRestProcessRunner::PrintProcessedEvents(Int_t rateE) { string s1(buffer); if (fProcStatus == kNormal) { - sprintf(buffer, "%.1f min ETA, (Pause: \"p\") ", (100 - prog_last) / progspeed / 60); + sprintf(buffer, "%.1f min ETA, (Pause: \"p\") ", (100 - progressLast) / progspeed / 60); } else { - sprintf(buffer, "%.1f min ETA, (Pause Disabled) ", (100 - prog_last) / progspeed / 60); + sprintf(buffer, "%.1f min ETA, (Pause Disabled) ", (100 - progressLast) / progspeed / 60); } string s2(buffer); @@ -1131,22 +1131,22 @@ void TRestProcessRunner::PrintProcessedEvents(Int_t rateE) { delete[] buffer; if (REST_Display_CompatibilityMode) { - if (((int)prog) != prog_last_printed) { + if (((int)prog) != progressLastPrinted) { cout << s1 << s2 << s3 << endl; - prog_last_printed = (int)prog; + progressLastPrinted = (int)prog; } } else if (fThreads[0]->GetVerboseLevel() < TRestStringOutput::REST_Verbose_Level::REST_Debug) { printf("%s", (s1 + s2 + s3 + "\r").c_str()); fflush(stdout); } - bytesAdded[poscalculated] = fRunInfo->GetBytesRead() - bytesRead_last; - bytesRead_last = fRunInfo->GetBytesRead(); - progAdded[poscalculated] = prog - prog_last; - prog_last = prog; + bytesAdded[positionCalculated] = fRunInfo->GetBytesRead() - bytesReadLast; + bytesReadLast = fRunInfo->GetBytesRead(); + progAdded[positionCalculated] = prog - progressLast; + progressLast = prog; - poscalculated++; - if (poscalculated >= ncalculated) poscalculated -= ncalculated; + positionCalculated++; + if (positionCalculated >= ncalculated) positionCalculated -= ncalculated; } }