From f6f0f5869f5219e50aedc5ae0ecda817557df2dd Mon Sep 17 00:00:00 2001 From: shahoian Date: Fri, 24 Jan 2025 16:48:45 +0100 Subject: [PATCH] Push CTF/SELIRFRAMES/0 even if run was not matched --- Detectors/CTF/workflow/CMakeLists.txt | 2 ++ Detectors/CTF/workflow/src/CTFReaderSpec.cxx | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Detectors/CTF/workflow/CMakeLists.txt b/Detectors/CTF/workflow/CMakeLists.txt index b4fefa894263c..f7adeaed991c0 100644 --- a/Detectors/CTF/workflow/CMakeLists.txt +++ b/Detectors/CTF/workflow/CMakeLists.txt @@ -9,6 +9,8 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. +#add_compile_options(-O0 -g -fPIC) + o2_add_library(CTFWorkflow SOURCES src/CTFWriterSpec.cxx src/CTFReaderSpec.cxx diff --git a/Detectors/CTF/workflow/src/CTFReaderSpec.cxx b/Detectors/CTF/workflow/src/CTFReaderSpec.cxx index bcf3b5d975b74..aadc059ecd4fa 100644 --- a/Detectors/CTF/workflow/src/CTFReaderSpec.cxx +++ b/Detectors/CTF/workflow/src/CTFReaderSpec.cxx @@ -102,6 +102,7 @@ class CTFReaderSpec : public o2::framework::Task std::unique_ptr mCTFTree; bool mRunning = false; bool mUseLocalTFCounter = false; + bool mIFRamesOut = false; int mConvRunTimeRangesToOrbits = -1; // not defined yet int mCTFCounter = 0; int mCTFCounterAcc = 0; @@ -172,9 +173,11 @@ void CTFReaderSpec::init(InitContext& ic) const auto& hbfu = o2::raw::HBFUtils::Instance(); mTFLength = hbfu.nHBFPerTF; LOGP(info, "IRFrames will be selected from {}, assumed TF length: {} HBF", mInput.fileIRFrames, mTFLength); + mIFRamesOut = true; } if (!mInput.fileRunTimeSpans.empty()) { loadRunTimeSpans(mInput.fileRunTimeSpans); + mIFRamesOut = true; } } @@ -418,11 +421,11 @@ bool CTFReaderSpec::processTF(ProcessingContext& pc) runTimeRangesToIRFrameSelector(timingInfo); } mRunNumberPrev = timingInfo.runNumber; - + gsl::span irSpan{}; if (mIRFrameSelector.isSet()) { o2::InteractionRecord ir0(0, timingInfo.firstTForbit); o2::InteractionRecord ir1(o2::constants::lhc::LHCMaxBunches - 1, timingInfo.firstTForbit < 0xffffffff - (mTFLength - 1) ? timingInfo.firstTForbit + (mTFLength - 1) : 0xffffffff); - auto irSpan = mIRFrameSelector.getMatchingFrames({ir0, ir1}); + irSpan = mIRFrameSelector.getMatchingFrames({ir0, ir1}); bool acc = true; if (mInput.skipSkimmedOutTF) { acc = (irSpan.size() > 0) ? !mInput.invertIRFramesSelection : mInput.invertIRFramesSelection; @@ -435,13 +438,14 @@ bool CTFReaderSpec::processTF(ProcessingContext& pc) if (mInput.checkTFLimitBeforeReading) { limiter.check(pc, mInput.tfRateLimit, mInput.minSHM); } - auto outVec = pc.outputs().make>(OutputRef{"selIRFrames"}, irSpan.begin(), irSpan.end()); } else { if (mInput.checkTFLimitBeforeReading) { limiter.check(pc, mInput.tfRateLimit, mInput.minSHM); } } - + if (mIFRamesOut) { + auto outVec = pc.outputs().make>(OutputRef{"selIRFrames"}, irSpan.begin(), irSpan.end()); + } // send CTF Header pc.outputs().snapshot({"header", mInput.subspec}, ctfHeader);