diff --git a/Detectors/Raw/include/DetectorsRaw/RawFileReader.h b/Detectors/Raw/include/DetectorsRaw/RawFileReader.h index 7deac03d663a6..6f51c2e38ec36 100644 --- a/Detectors/Raw/include/DetectorsRaw/RawFileReader.h +++ b/Detectors/Raw/include/DetectorsRaw/RawFileReader.h @@ -47,7 +47,6 @@ struct ReaderInp { size_t bufferSize = 1024L * 1024L; size_t minSHM = 0; int loop = 1; - int runNumber = 0; uint32_t delay_us = 0; uint32_t errMap = 0xffffffff; uint32_t minTF = 0; diff --git a/Detectors/Raw/src/RawFileReaderWorkflow.cxx b/Detectors/Raw/src/RawFileReaderWorkflow.cxx index a7313f3154ac2..217daaebff4bb 100644 --- a/Detectors/Raw/src/RawFileReaderWorkflow.cxx +++ b/Detectors/Raw/src/RawFileReaderWorkflow.cxx @@ -96,7 +96,7 @@ class RawReaderSpecs : public o2f::Task //___________________________________________________________ RawReaderSpecs::RawReaderSpecs(const ReaderInp& rinp) - : mLoop(rinp.loop < 0 ? INT_MAX : (rinp.loop < 1 ? 1 : rinp.loop)), mDelayUSec(rinp.delay_us), mMinTFID(rinp.minTF), mMaxTFID(rinp.maxTF), mRunNumber(rinp.runNumber), mPartPerSP(rinp.partPerSP), mSup0xccdb(rinp.sup0xccdb), mReader(std::make_unique(rinp.inifile, 0, rinp.bufferSize, rinp.onlyDet)), mRawChannelName(rinp.rawChannelConfig), mPreferCalcTF(rinp.preferCalcTF), mMinSHM(rinp.minSHM) + : mLoop(rinp.loop < 0 ? INT_MAX : (rinp.loop < 1 ? 1 : rinp.loop)), mDelayUSec(rinp.delay_us), mMinTFID(rinp.minTF), mMaxTFID(rinp.maxTF), mPartPerSP(rinp.partPerSP), mSup0xccdb(rinp.sup0xccdb), mReader(std::make_unique(rinp.inifile, 0, rinp.bufferSize, rinp.onlyDet)), mRawChannelName(rinp.rawChannelConfig), mPreferCalcTF(rinp.preferCalcTF), mMinSHM(rinp.minSHM) { mReader->setCheckErrors(rinp.errMap); mReader->setMaxTFToRead(rinp.maxTF); @@ -149,6 +149,7 @@ void RawReaderSpecs::init(o2f::InitContext& ic) mTimer.Start(); mTimer.Stop(); mVerbosity = ic.options().get("verbosity-level"); + mRunNumber = ic.options().get("run-number"); mReader->setVerbosity(mVerbosity); mReader->init(); if (mMaxTFID >= mReader->getNTimeFrames()) { @@ -418,6 +419,8 @@ o2f::DataProcessorSpec getReaderSpec(ReaderInp rinp) spec.algorithm = o2f::adaptFromTask(rinp); spec.options.emplace_back(o2f::ConfigParamSpec{"verbosity-level", o2f::VariantType::Int, 0, {"verbosity level"}}); + spec.options.emplace_back(o2f::ConfigParamSpec{"run-number", o2f::VariantType::Int, 0, {"impose run number"}}); + return spec; } diff --git a/Detectors/Raw/src/rawfile-reader-workflow.cxx b/Detectors/Raw/src/rawfile-reader-workflow.cxx index 3a5440f80ed2d..10de4a729168f 100644 --- a/Detectors/Raw/src/rawfile-reader-workflow.cxx +++ b/Detectors/Raw/src/rawfile-reader-workflow.cxx @@ -30,7 +30,6 @@ void customize(std::vector& workflowOptions) options.push_back(ConfigParamSpec{"onlyDet", VariantType::String, "all", {"list of dectors"}}); options.push_back(ConfigParamSpec{"min-tf", VariantType::Int64, 0L, {"min TF ID to process"}}); options.push_back(ConfigParamSpec{"max-tf", VariantType::Int64, 0xffffffffL, {"max TF ID to process"}}); - options.push_back(ConfigParamSpec{"run-number", VariantType::Int, 0, {"impose run number"}}); options.push_back(ConfigParamSpec{"loop", VariantType::Int, 1, {"loop N times (infinite for N<0)"}}); options.push_back(ConfigParamSpec{"delay", VariantType::Float, 0.f, {"delay in seconds between consecutive TFs sending"}}); options.push_back(ConfigParamSpec{"buffer-size", VariantType::Int64, 5 * 1024L, {"buffer size for files preprocessing"}}); @@ -67,7 +66,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) rinp.onlyDet = configcontext.options().get("onlyDet"); rinp.maxTF = uint32_t(configcontext.options().get("max-tf")); rinp.minTF = uint32_t(configcontext.options().get("min-tf")); - rinp.runNumber = configcontext.options().get("run-number"); rinp.bufferSize = uint64_t(configcontext.options().get("buffer-size")); rinp.spSize = uint64_t(configcontext.options().get("super-page-size")); rinp.partPerSP = configcontext.options().get("part-per-sp");