diff --git a/source/framework/core/inc/TRestRun.h b/source/framework/core/inc/TRestRun.h index 2c80279dd..a830bd6aa 100644 --- a/source/framework/core/inc/TRestRun.h +++ b/source/framework/core/inc/TRestRun.h @@ -60,6 +60,8 @@ class TRestRun : public TRestMetadata { bool fHangUpEndFile = false; //! bool fFromRML = false; //! + Long64_t fFeminosDaqTotalEvents = 0; //! + void InitFromConfigFile() override; private: @@ -216,6 +218,9 @@ class TRestRun : public TRestMetadata { inline void HangUpEndFile() { fHangUpEndFile = true; } inline void ReleaseEndFile() { fHangUpEndFile = false; } + inline void SetFeminosDaqTotalEvents(Long64_t n) { fFeminosDaqTotalEvents = n; } + inline Long64_t GetFeminosDaqTotalEvents() const { return fFeminosDaqTotalEvents; } + // Printers void PrintStartDate(); void PrintEndDate(); diff --git a/source/framework/core/src/TRestProcessRunner.cxx b/source/framework/core/src/TRestProcessRunner.cxx index 68fe8b928..2ff4d4ff0 100644 --- a/source/framework/core/src/TRestProcessRunner.cxx +++ b/source/framework/core/src/TRestProcessRunner.cxx @@ -1087,7 +1087,9 @@ void TRestProcessRunner::PrintProcessedEvents(Int_t rateE) { double progspeed = progsum / ncalculated / printInterval * 1000000; double prog = 0; - if (fEventsToProcess == REST_MAXIMUM_EVENTS && fRunInfo->GetFileProcess() != nullptr) + if (fRunInfo->GetFeminosDaqTotalEvents() > 0) { + prog = fProcessedEvents / (double)fRunInfo->GetFeminosDaqTotalEvents() * 100; + } else if (fEventsToProcess == REST_MAXIMUM_EVENTS && fRunInfo->GetFileProcess() != nullptr) // Nevents is unknown, reading external data file { prog = fRunInfo->GetBytesRead() / (double)fRunInfo->GetTotalBytes() * 100; @@ -1104,7 +1106,7 @@ void TRestProcessRunner::PrintProcessedEvents(Int_t rateE) { } char* buffer = new char[500](); - if (fRunInfo->GetFileProcess() != nullptr) { + if (fRunInfo->GetFileProcess() != nullptr && speedbyte > 0) { sprintf(buffer, "%d Events (%.1fMB/s), ", fProcessedEvents, speedbyte / 1024 / 1024); } else { sprintf(buffer, "%d Events, ", fProcessedEvents);