File tree Expand file tree Collapse file tree
Detectors/CTF/workflow/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,10 +195,6 @@ void CTFReaderSpec::run(ProcessingContext& pc)
195195 mInput .tfRateLimit = std::stoi (pc.services ().get <RawDeviceService>().device ()->fConfig ->GetValue <std::string>(" timeframes-rate-limit" ));
196196 }
197197 std::string tfFileName;
198- if (mCTFCounter >= mInput .maxTFs || (!mInput .ctfIDs .empty () && mSelIDEntry >= mInput .ctfIDs .size ())) { // done
199- LOG (info) << " All CTFs from selected range were injected, stopping" ;
200- mRunning = false ;
201- }
202198
203199 while (mRunning ) {
204200 if (mCTFTree ) { // there is a tree open with multiple CTF
@@ -228,6 +224,14 @@ void CTFReaderSpec::run(ProcessingContext& pc)
228224 LOG (info) << " Reading CTF input " << ' ' << tfFileName;
229225 openCTFFile (tfFileName);
230226 }
227+
228+ if (mCTFCounter >= mInput .maxTFs || (!mInput .ctfIDs .empty () && mSelIDEntry >= mInput .ctfIDs .size ())) { // done
229+ LOG (info) << " All CTFs from selected range were injected, stopping" ;
230+ mRunning = false ;
231+ } else if (mRunning && !mCTFTree && mFileFetcher ->getNextFileInQueue ().empty ()) { // previous tree was done, can we read more?
232+ mRunning = false ;
233+ }
234+
231235 if (!mRunning ) {
232236 pc.services ().get <ControlService>().endOfStream ();
233237 pc.services ().get <ControlService>().readyToQuit (QuitRequest::Me);
You can’t perform that action at this time.
0 commit comments