diff --git a/DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx b/DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx index 832e403919d55..6754e5cd7f76c 100644 --- a/DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx +++ b/DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx @@ -28,6 +28,11 @@ #include "ReconstructionDataFormats/VtxTrackRef.h" #include "ReconstructionDataFormats/TrackCosmics.h" #include "DataFormatsITSMFT/TrkClusRef.h" +// FIXME: ideally, the data formats definition should be independent of the framework +// collectData is using the input of ProcessingContext to extract the first valid +// header and the TF orbit from it +#include "Framework/ProcessingContext.h" +#include "Framework/DataRefUtils.h" using namespace o2::globaltracking; using namespace o2::framework; @@ -306,7 +311,7 @@ void RecoContainer::collectData(ProcessingContext& pc, const DataRequest& reques { auto& reqMap = requests.requestMap; - const auto* dh = o2::header::get(pc.inputs().getFirstValid(true).header); + const auto* dh = DataRefUtils::getHeader(pc.inputs().getFirstValid(true)); startIR = {0, dh->firstTForbit}; auto req = reqMap.find("trackITS"); diff --git a/Detectors/GlobalTrackingWorkflow/src/TOFMatcherSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/TOFMatcherSpec.cxx index b85dcdf7374b3..0c875101486d6 100644 --- a/Detectors/GlobalTrackingWorkflow/src/TOFMatcherSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/TOFMatcherSpec.cxx @@ -19,7 +19,6 @@ #include "DetectorsBase/Propagator.h" #include "DetectorsCommonDataFormats/NameConf.h" #include "DataFormatsParameters/GRPObject.h" -#include "Headers/DataHeader.h" #include "CommonDataFormat/InteractionRecord.h" #include "DataFormatsGlobalTracking/RecoContainer.h" #include "Framework/Task.h" diff --git a/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx index 3af30c957afbe..9b43c2bc1da1f 100644 --- a/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx @@ -18,6 +18,7 @@ #include "DataFormatsTPC/Constants.h" #include "Framework/DataProcessorSpec.h" #include "Framework/Task.h" +#include "Framework/DataRefUtils.h" #include #include "TStopwatch.h" #include "Framework/ConfigParamRegistry.h" @@ -131,7 +132,7 @@ void TPCITSMatchingDPL::init(InitContext& ic) void TPCITSMatchingDPL::run(ProcessingContext& pc) { - const auto* dh = o2::header::get(pc.inputs().getFirstValid(true).header); + const auto* dh = DataRefUtils::getHeader(pc.inputs().getFirstValid(true)); LOG(INFO) << " startOrbit: " << dh->firstTForbit; mTimer.Start(false); RecoContainer recoData; diff --git a/Detectors/HMPID/workflow/src/DataDecoderSpec2.cxx b/Detectors/HMPID/workflow/src/DataDecoderSpec2.cxx index 904233f2a1bb9..6cf8fbbb969b4 100644 --- a/Detectors/HMPID/workflow/src/DataDecoderSpec2.cxx +++ b/Detectors/HMPID/workflow/src/DataDecoderSpec2.cxx @@ -39,6 +39,7 @@ #include "Framework/WorkflowSpec.h" #include "Framework/Logger.h" #include "Framework/InputRecordWalker.h" +#include "Framework/DataRefUtils.h" #include "Headers/RAWDataHeader.h" #include "DetectorsRaw/RDHUtils.h" @@ -251,13 +252,9 @@ void DataDecoderTask2::decodeRawFile(framework::ProcessingContext& pc) for (auto&& input : pc.inputs()) { if (input.spec->binding == "file") { - const header::DataHeader* header = o2::header::get(input.header); - if (!header) { - return; - } auto const* raw = input.payload; - size_t payloadSize = header->payloadSize; + size_t payloadSize = DataRefUtils::getPayloadSize(input); LOG(INFO) << " payloadSize=" << payloadSize; if (payloadSize == 0) { @@ -265,7 +262,7 @@ void DataDecoderTask2::decodeRawFile(framework::ProcessingContext& pc) } uint32_t* theBuffer = (uint32_t*)input.payload; - int pagesize = header->payloadSize; + int pagesize = payloadSize; mDeco->setUpStream(theBuffer, pagesize); try { if (mFastAlgorithm) { diff --git a/Detectors/MUON/MCH/Calibration/src/pedestal-decoding-workflow.cxx b/Detectors/MUON/MCH/Calibration/src/pedestal-decoding-workflow.cxx index a34f28bf39bc2..5aec03d78dd88 100644 --- a/Detectors/MUON/MCH/Calibration/src/pedestal-decoding-workflow.cxx +++ b/Detectors/MUON/MCH/Calibration/src/pedestal-decoding-workflow.cxx @@ -34,6 +34,7 @@ #include "Framework/WorkflowSpec.h" #include "Framework/ConfigParamSpec.h" #include "Framework/CompletionPolicyHelpers.h" +#include "Framework/DataRefUtils.h" #include "Headers/RDHAny.h" #include "MCHRawDecoder/PageDecoder.h" @@ -283,13 +284,10 @@ class PedestalsTask // the decodeReadout() function processes the messages generated by o2-mch-cru-page-reader-workflow void decodeReadout(const o2::framework::DataRef& input) { - const auto* header = o2::header::get(input.header); - if (!header) { - return; - } - + // Note: DPL allows to extract the san directly from the input + // this would make this function obsolete auto const* raw = input.payload; - size_t payloadSize = header->payloadSize; + size_t payloadSize = DataRefUtils::getPayloadSize(input); gsl::span buffer(reinterpret_cast(raw), payloadSize); decodeBuffer(buffer); diff --git a/Detectors/MUON/MCH/Workflow/src/DataDecoderSpec.cxx b/Detectors/MUON/MCH/Workflow/src/DataDecoderSpec.cxx index b0916ba8ab1d9..79e98778fb518 100644 --- a/Detectors/MUON/MCH/Workflow/src/DataDecoderSpec.cxx +++ b/Detectors/MUON/MCH/Workflow/src/DataDecoderSpec.cxx @@ -33,6 +33,7 @@ #include "Framework/Output.h" #include "Framework/Task.h" #include "Framework/WorkflowSpec.h" +#include "Framework/DataRefUtils.h" #include "Headers/RAWDataHeader.h" #include "DetectorsRaw/RDHUtils.h" @@ -98,7 +99,7 @@ class DataDecoderTask // the decodeTF() function processes the messages generated by the (sub)TimeFrame builder void decodeTF(framework::ProcessingContext& pc) { - const auto* dh = o2::header::get(pc.inputs().getFirstValid(true).header); + const auto* dh = DataRefUtils::getHeader(pc.inputs().getFirstValid(true)); mFirstTForbit = dh->firstTForbit; if (!mDecoder->getFirstOrbitInRun()) { @@ -137,14 +138,9 @@ class DataDecoderTask return; } - const auto* header = o2::header::get(input.header); - if (!header) { - return; - } - auto const* raw = input.payload; // size of payload - size_t payloadSize = header->payloadSize; + size_t payloadSize = DataRefUtils::getPayloadSize(input); if (mDebug) { std::cout << nFrame << " payloadSize=" << payloadSize << std::endl; diff --git a/Detectors/TOF/workflow/src/CompressedDecodingTask.cxx b/Detectors/TOF/workflow/src/CompressedDecodingTask.cxx index 19ed14cc19ded..6ac6e2eedf044 100644 --- a/Detectors/TOF/workflow/src/CompressedDecodingTask.cxx +++ b/Detectors/TOF/workflow/src/CompressedDecodingTask.cxx @@ -27,6 +27,7 @@ #include "Framework/Logger.h" #include "DetectorsRaw/RDHUtils.h" #include "Framework/InputRecordWalker.h" +#include "Framework/DataRefUtils.h" using namespace o2::framework; @@ -123,7 +124,7 @@ void CompressedDecodingTask::run(ProcessingContext& pc) mTimer.Start(false); //RS set the 1st orbit of the TF from the O2 header, relying on rdhHandler is not good (in fact, the RDH might be eliminated in the derived data) - const auto* dh = o2::header::get(pc.inputs().getFirstValid(true).header); + const auto* dh = DataRefUtils::getHeader(pc.inputs().getFirstValid(true)); mInitOrbit = dh->firstTForbit; if (!mConetMode) { mDecoder.setFirstIR({0, mInitOrbit}); diff --git a/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx b/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx index 77c13d5db4785..60e9f906eb8fe 100644 --- a/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx +++ b/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx @@ -29,6 +29,7 @@ #include "TOFCalibration/CalibTOFapi.h" #include "TStopwatch.h" #include "Framework/ConfigParamRegistry.h" +#include "Framework/DataRefUtils.h" #include // for make_shared, make_unique, unique_ptr #include @@ -78,7 +79,7 @@ class TOFDPLClustererTask auto digits = pc.inputs().get>("tofdigits"); auto row = pc.inputs().get>("readoutwin"); - const auto* dh = o2::header::get(pc.inputs().getFirstValid(true).header); + const auto* dh = DataRefUtils::getHeader(pc.inputs().getFirstValid(true)); mClusterer.setFirstOrbit(dh->firstTForbit); auto labelvector = std::make_shared>>(); diff --git a/Detectors/TPC/workflow/src/ZSSpec.cxx b/Detectors/TPC/workflow/src/ZSSpec.cxx index ef8fb660f0135..1290a2b7b612b 100644 --- a/Detectors/TPC/workflow/src/ZSSpec.cxx +++ b/Detectors/TPC/workflow/src/ZSSpec.cxx @@ -17,6 +17,7 @@ #include "Framework/ControlService.h" #include "Framework/ConfigParamRegistry.h" #include "Framework/InputRecordWalker.h" +#include "Framework/DataRefUtils.h" #include "DataFormatsTPC/TPCSectorHeader.h" #include "DataFormatsTPC/ZeroSuppression.h" #include "DataFormatsTPC/Helpers.h" @@ -99,7 +100,7 @@ DataProcessorSpec getZSEncoderSpec(std::vector const& tpcSectors, bool outR const auto& inputs = getWorkflowTPCInput(pc, 0, false, false, tpcSectorMask, true); sizes.resize(NSectors * NEndpoints); - const auto* dh = o2::header::get(pc.inputs().getFirstValid(true).header); + const auto* dh = DataRefUtils::getHeader(pc.inputs().getFirstValid(true)); o2::InteractionRecord ir{0, dh->firstTForbit}; o2::gpu::GPUReconstructionConvert::RunZSEncoder(inputs->inputDigits, &zsoutput, sizes.data(), nullptr, &ir, _GPUParam, true, verify, config.configReconstruction.tpc.zsThreshold); ZeroSuppressedContainer8kb* page = reinterpret_cast(zsoutput.get()); diff --git a/Framework/Core/include/Framework/InputRecord.h b/Framework/Core/include/Framework/InputRecord.h index c26621817e23b..62a0d19fccfac 100644 --- a/Framework/Core/include/Framework/InputRecord.h +++ b/Framework/Core/include/Framework/InputRecord.h @@ -234,7 +234,7 @@ class InputRecord // the buffer to be deleted when it goes out of scope. The string is built // from the data and its lengh, null-termination is not necessary. // return std::string object - auto header = header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); assert(header); return std::string(ref.payload, header->payloadSize); @@ -253,7 +253,7 @@ class InputRecord // substitution for TableConsumer // For the moment this is dummy, as it requires proper support to // create the RDataSource from the arrow buffer. - auto header = header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); assert(header); auto data = reinterpret_cast(ref.payload); return std::make_unique(data, header->payloadSize); @@ -264,7 +264,7 @@ class InputRecord // We have to deserialize the ostringstream. // FIXME: check that the string is null terminated. // @return deserialized copy of payload - auto header = header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); assert(header); auto str = std::string(ref.payload, header->payloadSize); assert(header->payloadSize == sizeof(T)); @@ -279,7 +279,7 @@ class InputRecord // substitution for span of messageable objects // FIXME: there will be std::span in C++20 static_assert(is_messageable::value, "span can only be created for messageable types"); - auto header = header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); assert(header); if (sizeof(typename T::value_type) > 1 && header->payloadSerializationMethod != o2::header::gSerializationMethodNone) { throw runtime_error("Inconsistent serialization method for extracting span"); @@ -297,7 +297,7 @@ class InputRecord } else if constexpr (is_container::value) { // currently implemented only for vectors if constexpr (is_specialization::type, std::vector>::value) { - auto header = o2::header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); auto method = header->payloadSerializationMethod; if (method == o2::header::gSerializationMethodNone) { // TODO: construct a vector spectator @@ -340,7 +340,7 @@ class InputRecord // unserialized objects using DataHeader = o2::header::DataHeader; - auto header = o2::header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); auto method = header->payloadSerializationMethod; if (method != o2::header::gSerializationMethodNone) { // FIXME: we could in principle support serialized content here as well if we @@ -357,7 +357,7 @@ class InputRecord using DataHeader = o2::header::DataHeader; using ValueT = typename std::remove_pointer::type; - auto header = o2::header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); auto method = header->payloadSerializationMethod; if (method == o2::header::gSerializationMethodNone) { if constexpr (is_messageable::value) { @@ -402,7 +402,7 @@ class InputRecord // the operation depends on the transmitted serialization method using DataHeader = o2::header::DataHeader; - auto header = o2::header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); auto method = header->payloadSerializationMethod; if (method == o2::header::gSerializationMethodNone) { // this code path is only selected if the type is non-messageable @@ -425,7 +425,7 @@ class InputRecord T get_boost(char const* binding) const { DataRef ref = get(binding); - auto header = header::get(ref.header); + auto header = DataRefUtils::getHeader(ref); assert(header); auto str = std::string(ref.payload, header->payloadSize); auto desData = o2::utils::BoostDeserialize(str); diff --git a/Framework/Core/test/test_CCDBFetcher.cxx b/Framework/Core/test/test_CCDBFetcher.cxx index b29d9bfd29aa2..51c7ca1a1aec8 100644 --- a/Framework/Core/test/test_CCDBFetcher.cxx +++ b/Framework/Core/test/test_CCDBFetcher.cxx @@ -31,11 +31,11 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) AlgorithmSpec{ adaptStateless([](DataAllocator& outputs, InputRecord& inputs, ControlService& control) { DataRef condition = inputs.get("somecondition"); - auto* header = o2::header::get(condition.header); - if (header->payloadSize != 2048) { - LOGP(ERROR, "Wrong size for condition payload (expected {}, found {}", 2048, header->payloadSize); + auto payloadSize = DataRefUtils::getPayloadSize(condition); + if (payloadSize != 2048) { + LOGP(ERROR, "Wrong size for condition payload (expected {}, found {}", 2048, payloadSize); } - header->payloadSize; + payloadSize; control.readyToQuit(QuitRequest::All); })}, Options{ diff --git a/Framework/Core/test/test_DataAllocator.cxx b/Framework/Core/test/test_DataAllocator.cxx index c70bbf45c6005..1b68cbc852813 100644 --- a/Framework/Core/test/test_DataAllocator.cxx +++ b/Framework/Core/test/test_DataAllocator.cxx @@ -22,6 +22,7 @@ #include "Framework/SerializationMethods.h" #include "Framework/OutputRoute.h" #include "Framework/ConcreteDataMatcher.h" +#include "Framework/DataRefUtils.h" #include "Headers/DataHeader.h" #include "TestClasses.h" #include "Framework/Logger.h" @@ -192,7 +193,7 @@ DataProcessorSpec getSinkSpec() if (iit.isValid() == false) { continue; } - auto* dh = o2::header::get(input.header); + auto* dh = DataRefUtils::getHeader(input); LOG(INFO) << "{" << dh->dataOrigin.str << ":" << dh->dataDescription.str << ":" << dh->subSpecification << "}" << " payload size " << dh->payloadSize; @@ -322,7 +323,7 @@ DataProcessorSpec getSinkSpec() auto pmrspan = pc.inputs().get>("inputPMR"); ASSERT_ERROR((pmrspan[0] == o2::test::TriviallyCopyable{1, 2, 3})); auto dataref = pc.inputs().get("inputPMR"); - auto header = o2::header::get(dataref.header); + auto header = DataRefUtils::getHeader(dataref); ASSERT_ERROR((header->payloadSize == sizeof(o2::test::TriviallyCopyable))); LOG(INFO) << "extracting POD vector"; @@ -371,7 +372,7 @@ DataProcessorSpec getSpectatorSinkSpec() if (iit.isValid() == false) { continue; } - auto* dh = o2::header::get(input.header); + auto* dh = DataRefUtils::getHeader(input); LOG(INFO) << "{" << dh->dataOrigin.str << ":" << dh->dataDescription.str << ":" << dh->subSpecification << "}" << " payload size " << dh->payloadSize; diff --git a/Framework/Core/test/test_Parallel.cxx b/Framework/Core/test/test_Parallel.cxx index 63a9220382715..7017049064e64 100644 --- a/Framework/Core/test/test_Parallel.cxx +++ b/Framework/Core/test/test_Parallel.cxx @@ -13,6 +13,7 @@ #include "Framework/ControlService.h" #include "Framework/DataProcessorSpec.h" #include "Framework/DataSpecUtils.h" +#include "Framework/DataRefUtils.h" #include "Framework/ParallelContext.h" #include "Framework/runDataProcessing.h" @@ -111,7 +112,7 @@ std::vector defineDataProcessing(ConfigContext const&) LOG(DEBUG) << "DataSampler sends data from subSpec: " << matcher.subSpec; - const auto* inputHeader = o2::header::get(input.header); + const auto* inputHeader = DataRefUtils::getHeader(input); auto& output = ctx.outputs().make(description, inputHeader->size()); //todo: use some std function or adopt(), when it is available for POD data diff --git a/Framework/Core/test/test_SimpleRDataFrameProcessing.cxx b/Framework/Core/test/test_SimpleRDataFrameProcessing.cxx index fdf4daddcfb6a..5c61f3b4a86a3 100644 --- a/Framework/Core/test/test_SimpleRDataFrameProcessing.cxx +++ b/Framework/Core/test/test_SimpleRDataFrameProcessing.cxx @@ -24,7 +24,6 @@ #include using namespace o2::framework; -using DataHeader = o2::header::DataHeader; /// Example of how to use ROOT::RDataFrame using DPL. WorkflowSpec defineDataProcessing(ConfigContext const&) diff --git a/Framework/Core/test/test_SimpleWildcard02.cxx b/Framework/Core/test/test_SimpleWildcard02.cxx index 06eb49aecc6a4..47d255bb2933b 100644 --- a/Framework/Core/test/test_SimpleWildcard02.cxx +++ b/Framework/Core/test/test_SimpleWildcard02.cxx @@ -15,6 +15,7 @@ #include "Framework/ControlService.h" #include "Framework/EndOfStreamContext.h" #include "Framework/Logger.h" +#include "Framework/DataRefUtils.h" #include #include #include @@ -59,7 +60,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) } for (size_t i = 0; i < n; ++i) { auto ref = inputs.getByPos(0, i); - auto dh = o2::header::get(ref.header); + auto dh = DataRefUtils::getHeader(ref); LOG(INFO) << "String is " << s->GetString().Data() << " " << dh->subSpecification; } }); })}}}; diff --git a/Framework/TestWorkflows/src/o2DummyWorkflow.cxx b/Framework/TestWorkflows/src/o2DummyWorkflow.cxx index dcf681d6b2afe..3dfcd95239e7c 100644 --- a/Framework/TestWorkflows/src/o2DummyWorkflow.cxx +++ b/Framework/TestWorkflows/src/o2DummyWorkflow.cxx @@ -106,9 +106,9 @@ std::vector defineDataProcessing(ConfigContext const&) AlgorithmSpec{ [](ProcessingContext& ctx) { // We verify we got inputs in the correct order - auto h0 = o2::header::get(ctx.inputs().get("clusters").header); - auto h1 = o2::header::get(ctx.inputs().get("summary").header); - auto h2 = o2::header::get(ctx.inputs().get("other_summary").header); + auto h0 = DataRefUtils::getHeader(ctx.inputs().get("clusters")); + auto h1 = DataRefUtils::getHeader(ctx.inputs().get("summary")); + auto h2 = DataRefUtils::getHeader(ctx.inputs().get("other_summary")); // This should always be the case, since the // test for an actual DataHeader should happen in the device itself. assert(h0 && h1 && h2); diff --git a/Framework/TestWorkflows/src/o2_sim_its_ALP3.cxx b/Framework/TestWorkflows/src/o2_sim_its_ALP3.cxx index 58e67b5779ece..70c67dce74355 100644 --- a/Framework/TestWorkflows/src/o2_sim_its_ALP3.cxx +++ b/Framework/TestWorkflows/src/o2_sim_its_ALP3.cxx @@ -29,8 +29,6 @@ using namespace o2::framework; -using DataHeader = o2::header::DataHeader; - double radii2Turbo(double rMin, double rMid, double rMax, double sensW) { // compute turbo angle from radii and sensor width diff --git a/Framework/TestWorkflows/src/o2_sim_tpc.cxx b/Framework/TestWorkflows/src/o2_sim_tpc.cxx index bb7aa6262f59d..f9265615a6c31 100644 --- a/Framework/TestWorkflows/src/o2_sim_tpc.cxx +++ b/Framework/TestWorkflows/src/o2_sim_tpc.cxx @@ -34,8 +34,6 @@ using namespace o2::framework; -using DataHeader = o2::header::DataHeader; - #define BOX_GENERATOR 1 namespace o2 diff --git a/Framework/TestWorkflows/src/test_CCDBFetchToTimeframe.cxx b/Framework/TestWorkflows/src/test_CCDBFetchToTimeframe.cxx index 1cfd38a24ff2a..426de87ce3381 100644 --- a/Framework/TestWorkflows/src/test_CCDBFetchToTimeframe.cxx +++ b/Framework/TestWorkflows/src/test_CCDBFetchToTimeframe.cxx @@ -12,12 +12,12 @@ #include "Framework/Logger.h" #include "Framework/ControlService.h" #include "Framework/CCDBParamSpec.h" +#include "Framework/DataRefUtils.h" #include #include using namespace o2::framework; -using namespace o2::header; // Set a start value which might correspond to a real timestamp of an object in CCDB, for example: // o2-testworkflows-ccdb-fetch-to-timeframe --condition-backend http://ccdb-test.cern.ch:8080 --start-value-enumeration 1575985965925000 @@ -32,9 +32,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) AlgorithmSpec{ adaptStateless([](DataAllocator& outputs, InputRecord& inputs, ControlService& control) { DataRef condition = inputs.get("somecondition"); - auto* header = o2::header::get(condition.header); - if (header->payloadSize != 2048) { - LOGP(ERROR, "Wrong size for condition payload (expected {}, found {})", 2048, header->payloadSize); + auto payloadSize = DataRefUtils::getPayloadSize(condition); + if (payloadSize != 2048) { + LOGP(ERROR, "Wrong size for condition payload (expected {}, found {})", 2048, payloadSize); } control.readyToQuit(QuitRequest::All); })}, diff --git a/Framework/TestWorkflows/src/test_CCDBFetcher.cxx b/Framework/TestWorkflows/src/test_CCDBFetcher.cxx index 817b901dfa9cd..b289608778659 100644 --- a/Framework/TestWorkflows/src/test_CCDBFetcher.cxx +++ b/Framework/TestWorkflows/src/test_CCDBFetcher.cxx @@ -12,13 +12,13 @@ #include "Framework/ServiceRegistry.h" #include "Framework/ControlService.h" #include "Framework/CCDBParamSpec.h" +#include "Framework/DataRefUtils.h" #include "DataFormatsTOF/CalibLHCphaseTOF.h" #include #include using namespace o2::framework; -using namespace o2::header; // This is how you can define your processing in a declarative way WorkflowSpec defineDataProcessing(ConfigContext const&) @@ -32,9 +32,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) AlgorithmSpec{ adaptStateless([](DataAllocator& outputs, InputRecord& inputs, ControlService& control) { auto ref = inputs.get("somecondition"); - auto header = o2::header::get(ref.header); - if (header->payloadSize != 2048) { - LOGP(ERROR, "Wrong size for condition payload (expected {}, found {}", 2048, header->payloadSize); + auto payloadSize = DataRefUtils::getPayloadSize(ref); + if (payloadSize != 2048) { + LOGP(ERROR, "Wrong size for condition payload (expected {}, found {}", 2048, payloadSize); } auto condition = inputs.get("somecondition"); for (size_t pi = 0; pi < condition->size(); pi++) { diff --git a/Framework/TestWorkflows/src/test_RawDeviceInjector.cxx b/Framework/TestWorkflows/src/test_RawDeviceInjector.cxx index 9247d6a2555c5..f1c154df9a7a1 100644 --- a/Framework/TestWorkflows/src/test_RawDeviceInjector.cxx +++ b/Framework/TestWorkflows/src/test_RawDeviceInjector.cxx @@ -15,7 +15,6 @@ using namespace o2::framework; -using DataHeader = o2::header::DataHeader; using DataOrigin = o2::header::DataOrigin; // A simple workflow which takes heartbeats from diff --git a/Framework/TestWorkflows/src/test_o2ITSCluserizer.cxx b/Framework/TestWorkflows/src/test_o2ITSCluserizer.cxx index 7ef971367eeb8..d6d3cb1242f7c 100644 --- a/Framework/TestWorkflows/src/test_o2ITSCluserizer.cxx +++ b/Framework/TestWorkflows/src/test_o2ITSCluserizer.cxx @@ -23,10 +23,6 @@ using namespace o2::framework; using namespace o2::workflows; -using DataHeader = o2::header::DataHeader; -using DataOrigin = o2::header::DataOrigin; -using DataDescription = o2::header::DataDescription; - // This is how you can define your processing in a declarative way WorkflowSpec defineDataProcessing(ConfigContext const&) { diff --git a/Framework/Utils/include/DPLUtils/DPLRawPageSequencer.h b/Framework/Utils/include/DPLUtils/DPLRawPageSequencer.h index ee1302810249d..1b36cac62e75c 100644 --- a/Framework/Utils/include/DPLUtils/DPLRawPageSequencer.h +++ b/Framework/Utils/include/DPLUtils/DPLRawPageSequencer.h @@ -21,7 +21,6 @@ #include "Framework/DataRefUtils.h" #include "Framework/Logger.h" #include "Framework/InputRecordWalker.h" -#include "Headers/DataHeader.h" #include // std::declval namespace o2::framework diff --git a/Framework/Utils/src/DPLBroadcaster.cxx b/Framework/Utils/src/DPLBroadcaster.cxx index 38aa12905fdfc..4ea5e5747cd42 100644 --- a/Framework/Utils/src/DPLBroadcaster.cxx +++ b/Framework/Utils/src/DPLBroadcaster.cxx @@ -17,6 +17,7 @@ #include "DPLUtils/Utils.h" #include "Framework/DataProcessorSpec.h" #include "Framework/DataProcessingHeader.h" +#include "Framework/DataRefUtils.h" #include "Headers/DataHeader.h" namespace o2f = o2::framework; @@ -69,8 +70,8 @@ o2f::DataProcessorSpec defineBroadcaster(std::string devName, o2f::InputSpec usr o2f::DataProcessorSpec defineBroadcaster(std::string devName, o2f::InputSpec usrInput, o2f::Outputs usrOutputs) { // This lambda retrieves the message size using the API - auto funcSize = [](o2f::DataRef d) -> size_t { - return (o2::header::get(d.header))->payloadSize; + auto funcSize = [](o2f::DataRef ref) -> size_t { + return o2::framework::DataRefUtils::getPayloadSize(ref); }; // Callling complete implementation return defineBroadcaster(devName, usrInput, usrOutputs, funcSize); diff --git a/Framework/Utils/src/DPLGatherer.cxx b/Framework/Utils/src/DPLGatherer.cxx index 4205b33226090..039e6720980d1 100644 --- a/Framework/Utils/src/DPLGatherer.cxx +++ b/Framework/Utils/src/DPLGatherer.cxx @@ -16,6 +16,7 @@ #include "DPLUtils/Utils.h" #include "Framework/DataProcessorSpec.h" +#include "Framework/DataRefUtils.h" #include namespace o2f = o2::framework; @@ -41,7 +42,7 @@ o2f::DataProcessorSpec defineGatherer(std::string devName, o2f::Inputs usrInputs // Iterating over the Inputs to forward them on the same Output for (const auto& itInputs : ctx.inputs()) { // Retrieving message size from API - auto msgSize = (o2::header::get(itInputs.header))->payloadSize; + auto msgSize = o2::framework::DataRefUtils::getPayloadSize(itInputs); // Allocating new chunk auto& fwdMsg = ctx.outputs().newChunk((*outputPtr), msgSize); // Moving the input to the output chunk diff --git a/Framework/Utils/src/DPLMerger.cxx b/Framework/Utils/src/DPLMerger.cxx index f5cbb0de5f38c..6f91df32a4cca 100644 --- a/Framework/Utils/src/DPLMerger.cxx +++ b/Framework/Utils/src/DPLMerger.cxx @@ -16,6 +16,7 @@ #include "DPLUtils/Utils.h" #include "Framework/DataProcessorSpec.h" +#include "Framework/DataRefUtils.h" #include namespace o2f = o2::framework; @@ -56,10 +57,10 @@ o2f::DataProcessorSpec defineMerger(std::string devName, o2f::Inputs usrInputs, o2f::DataProcessorSpec defineMerger(std::string devName, o2f::Inputs usrInputs, o2f::OutputSpec usrOutput) { // This lambda retrieves the payload size through the API and back-inserts it on the output buffer - auto funcMerge = [](OutputBuffer& buf, const o2f::DataRef d) { - auto msgSize = (o2::header::get(d.header))->payloadSize; + auto funcMerge = [](OutputBuffer& buf, const o2f::DataRef ref) { + auto msgSize = o2::framework::DataRefUtils::getPayloadSize(ref); buf.resize(buf.size() + msgSize); - std::copy(&(d.payload[0]), &(d.payload[msgSize - 1]), std::back_inserter(buf)); + std::copy(&(ref.payload[0]), &(ref.payload[msgSize - 1]), std::back_inserter(buf)); }; // Callling complete implementation return defineMerger(devName, usrInputs, usrOutput, funcMerge); diff --git a/Framework/Utils/src/DPLRouter.cxx b/Framework/Utils/src/DPLRouter.cxx index a79d016aee46f..7795cb37d4ea0 100644 --- a/Framework/Utils/src/DPLRouter.cxx +++ b/Framework/Utils/src/DPLRouter.cxx @@ -16,6 +16,7 @@ #include "DPLUtils/Utils.h" #include "Framework/DataProcessorSpec.h" +#include "Framework/DataRefUtils.h" #include namespace o2f = o2::framework; @@ -40,7 +41,7 @@ o2f::DataProcessorSpec defineRouter(std::string devName, o2f::Inputs usrInput, o // Defining the ProcessCallback as returned object of InitCallback return [outputsPtr, mappingFuncPtr](o2f::ProcessingContext& ctx) { auto inputMsg = ctx.inputs().getByPos(0); - auto msgSize = (o2::header::get(inputMsg.header))->payloadSize; + auto msgSize = o2::framework::DataRefUtils::getPayloadSize(inputMsg); auto& outputCh = (*outputsPtr)[(*mappingFuncPtr)(inputMsg)]; auto& fwdMsg = ctx.outputs().newChunk(outputCh, msgSize); diff --git a/Framework/Utils/test/DPLBroadcasterMerger.cxx b/Framework/Utils/test/DPLBroadcasterMerger.cxx index 8bb8a6ea3c030..2535e1a052d90 100644 --- a/Framework/Utils/test/DPLBroadcasterMerger.cxx +++ b/Framework/Utils/test/DPLBroadcasterMerger.cxx @@ -16,6 +16,7 @@ #include "DPLUtils/Utils.h" #include "Framework/DataProcessorSpec.h" #include "Framework/ControlService.h" +#include "Framework/DataRefUtils.h" #include "random" #include "Framework/Logger.h" #include @@ -83,7 +84,7 @@ o2f::DataProcessorSpec definePipeline(std::string devName, o2f::InputSpec usrInp // Processing context in captured from return on InitCallback return [output_sharedptr](o2f::ProcessingContext& ctx) { auto inputMsg = ctx.inputs().getByPos(0); - auto msgSize = (o2::header::get(inputMsg.header))->payloadSize; + auto msgSize = o2::framework::DataRefUtils::getPayloadSize(inputMsg); auto& fwdMsg = ctx.outputs().newChunk((*output_sharedptr), msgSize); std::memcpy(fwdMsg.data(), inputMsg.payload, msgSize); diff --git a/Framework/Utils/test/test_RootTreeReader.cxx b/Framework/Utils/test/test_RootTreeReader.cxx index 843caae55bd46..e723ba641f931 100644 --- a/Framework/Utils/test/test_RootTreeReader.cxx +++ b/Framework/Utils/test/test_RootTreeReader.cxx @@ -18,6 +18,7 @@ #include "Framework/InputSpec.h" #include "Framework/OutputSpec.h" #include "Framework/ControlService.h" +#include "Framework/DataRefUtils.h" #include "DPLUtils/RootTreeReader.h" #include "Headers/DataHeader.h" #include "Headers/NameHeader.h" @@ -109,7 +110,7 @@ DataProcessorSpec getSinkSpec() static int counter = 0; using DataHeader = o2::header::DataHeader; for (auto& input : pc.inputs()) { - auto dh = o2::header::get(input.header); + auto dh = DataRefUtils::getHeader(input); LOG(INFO) << dh->dataOrigin.str << " " << dh->dataDescription.str << " " << dh->payloadSize; } auto data = pc.inputs().get>("input1"); diff --git a/Steer/DigitizerWorkflow/src/CPVDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/CPVDigitizerSpec.cxx index 14462cbbd4e57..49745e3745173 100644 --- a/Steer/DigitizerWorkflow/src/CPVDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/CPVDigitizerSpec.cxx @@ -15,7 +15,6 @@ #include "Framework/DataProcessorSpec.h" #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" -#include "Headers/DataHeader.h" #include "TStopwatch.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "TChain.h" diff --git a/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx b/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx index 283592b5c870d..edd7dbc47c98a 100644 --- a/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx +++ b/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx @@ -17,7 +17,6 @@ #include "Framework/Task.h" #include "Framework/Lifetime.h" #include "DataFormatsParameters/GRPObject.h" -#include "Headers/DataHeader.h" #include #include #include // for make_shared, make_unique, unique_ptr diff --git a/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.cxx index d4c63da6e1b43..29c5b7f4169de 100644 --- a/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.cxx @@ -16,7 +16,6 @@ #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" #include "Framework/Task.h" -#include "Headers/DataHeader.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "DataFormatsITSMFT/Digit.h" #include "SimulationDataFormat/ConstMCTruthContainer.h" diff --git a/Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx index 625a24f34287f..d84f73d400991 100644 --- a/Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx @@ -16,7 +16,6 @@ #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" #include "Framework/Task.h" -#include "Headers/DataHeader.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "DataFormatsITSMFT/Digit.h" #include "SimulationDataFormat/ConstMCTruthContainer.h" diff --git a/Steer/DigitizerWorkflow/src/MCHDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/MCHDigitizerSpec.cxx index 8674a4f66bce3..739f993290753 100644 --- a/Steer/DigitizerWorkflow/src/MCHDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/MCHDigitizerSpec.cxx @@ -21,7 +21,6 @@ #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" #include "Framework/Task.h" -#include "Headers/DataHeader.h" #include "MCHSimulation/Detector.h" #include "MCHSimulation/Digitizer.h" #include "MCHSimulation/DigitizerParam.h" diff --git a/Steer/DigitizerWorkflow/src/MIDDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/MIDDigitizerSpec.cxx index eebab21d59fad..b4f5c184a503f 100644 --- a/Steer/DigitizerWorkflow/src/MIDDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/MIDDigitizerSpec.cxx @@ -17,7 +17,6 @@ #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" #include "Framework/Task.h" -#include "Headers/DataHeader.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "DetectorsBase/BaseDPLDigitizer.h" #include "SimulationDataFormat/MCTruthContainer.h" diff --git a/Steer/DigitizerWorkflow/src/PHOSDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/PHOSDigitizerSpec.cxx index 00543d52b28ce..9f571929d1f92 100644 --- a/Steer/DigitizerWorkflow/src/PHOSDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/PHOSDigitizerSpec.cxx @@ -15,11 +15,9 @@ #include "Framework/DataProcessorSpec.h" #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" -#include "Headers/DataHeader.h" #include "TStopwatch.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "TChain.h" - #include "CommonDataFormat/EvIndex.h" #include "DataFormatsPHOS/TriggerRecord.h" #include "PHOSSimulation/Digitizer.h" diff --git a/Steer/DigitizerWorkflow/src/SimReaderSpec.cxx b/Steer/DigitizerWorkflow/src/SimReaderSpec.cxx index dfa82b8a3b8b2..c1c8c7e991add 100644 --- a/Steer/DigitizerWorkflow/src/SimReaderSpec.cxx +++ b/Steer/DigitizerWorkflow/src/SimReaderSpec.cxx @@ -16,7 +16,6 @@ #include "Framework/ControlService.h" #include "Framework/ConfigParamRegistry.h" #include "Framework/Lifetime.h" -#include "Headers/DataHeader.h" #include "Steer/HitProcessingManager.h" #include "Steer/InteractionSampler.h" #include "CommonDataFormat/InteractionRecord.h" diff --git a/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx index 2cc344fd9cab7..086a4e7a91ea7 100644 --- a/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx @@ -16,7 +16,6 @@ #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" #include "Framework/Task.h" -#include "Headers/DataHeader.h" #include "TStopwatch.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "TChain.h" diff --git a/Steer/DigitizerWorkflow/src/ZDCDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/ZDCDigitizerSpec.cxx index eb98e4f64c174..ed22206a9c423 100644 --- a/Steer/DigitizerWorkflow/src/ZDCDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/ZDCDigitizerSpec.cxx @@ -19,7 +19,6 @@ #include "Framework/DataProcessorSpec.h" #include "Framework/DataRefUtils.h" #include "Framework/Lifetime.h" -#include "Headers/DataHeader.h" #include "TStopwatch.h" #include "Steer/HitProcessingManager.h" // for DigitizationContext #include "TChain.h" diff --git a/Utilities/DataSampling/src/Dispatcher.cxx b/Utilities/DataSampling/src/Dispatcher.cxx index 710bd9faa8c84..d143419671fd3 100644 --- a/Utilities/DataSampling/src/Dispatcher.cxx +++ b/Utilities/DataSampling/src/Dispatcher.cxx @@ -23,6 +23,7 @@ #include "Framework/ConfigParamRegistry.h" #include "Framework/InputRecordWalker.h" #include "Framework/Monitoring.h" +#include "Framework/DataRefUtils.h" #include #include @@ -87,7 +88,7 @@ void Dispatcher::run(ProcessingContext& ctx) if (firstPart.header == nullptr) { continue; } - const auto* firstInputHeader = header::get(firstPart.header); + const auto* firstInputHeader = DataRefUtils::getHeader(firstPart); ConcreteDataMatcher inputMatcher{firstInputHeader->dataOrigin, firstInputHeader->dataDescription, firstInputHeader->subSpecification}; for (auto& policy : mPolicies) { @@ -106,7 +107,7 @@ void Dispatcher::run(ProcessingContext& ctx) header::Stack headerStack{ std::move(extractAdditionalHeaders(part.header)), dsheader}; - const auto* partInputHeader = header::get(part.header); + const auto* partInputHeader = DataRefUtils::getHeader(part); Output output{ routeAsConcreteDataType.origin, @@ -168,7 +169,7 @@ header::Stack Dispatcher::extractAdditionalHeaders(const char* inputHeaderStack) void Dispatcher::send(DataAllocator& dataAllocator, const DataRef& inputData, const Output& output) const { - const auto* inputHeader = header::get(inputData.header); + const auto* inputHeader = DataRefUtils::getHeader(inputData); dataAllocator.snapshot(output, inputData.payload, inputHeader->payloadSize, inputHeader->payloadSerializationMethod); } diff --git a/Utilities/DataSampling/test/dataSamplingParallel.cxx b/Utilities/DataSampling/test/dataSamplingParallel.cxx index 9969800a3c487..496697219e17a 100644 --- a/Utilities/DataSampling/test/dataSamplingParallel.cxx +++ b/Utilities/DataSampling/test/dataSamplingParallel.cxx @@ -30,6 +30,7 @@ void customize(std::vector& policies) #include "Framework/DataSpecUtils.h" #include "Framework/ParallelContext.h" #include "Framework/runDataProcessing.h" +#include "Framework/DataRefUtils.h" #include #include @@ -109,7 +110,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) auto inputDataTpcProcessed = reinterpret_cast(ctx.inputs().get( "TPC_CLUSTERS_P_S").payload); - const auto* header = o2::header::get(ctx.inputs().get("TPC_CLUSTERS_S").header); + const auto* header = DataRefUtils::getHeader(ctx.inputs().get("TPC_CLUSTERS_S")); bool dataGood = true; for (int j = 0; j < header->payloadSize / sizeof(FakeCluster); ++j) { diff --git a/Utilities/DataSampling/test/dataSamplingPodAndRoot.cxx b/Utilities/DataSampling/test/dataSamplingPodAndRoot.cxx index 94a0ae0e5010a..34df12c60072d 100644 --- a/Utilities/DataSampling/test/dataSamplingPodAndRoot.cxx +++ b/Utilities/DataSampling/test/dataSamplingPodAndRoot.cxx @@ -31,6 +31,7 @@ void customize(std::vector& policies) #include "Framework/TMessageSerializer.h" #include "DataSampling/DataSamplingHeader.h" #include "Framework/Logger.h" +#include "Framework/DataRefUtils.h" #include #include #include @@ -98,8 +99,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) auto inputDataTpcProcessed = reinterpret_cast(ctx.inputs().get( "TPC_CLUSTERS_P_S").payload); - const auto* header = ctx.inputs().get("TPC_CLUSTERS_S").header; - const auto* dataHeader = o2::header::get(header); + auto ref = ctx.inputs().get("TPC_CLUSTERS_S"); + const auto* dataHeader = DataRefUtils::getHeader(ref); bool dataGood = true; for (int j = 0; j < dataHeader->payloadSize / sizeof(FakeCluster); ++j) { @@ -115,7 +116,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) LOG(INFO) << "qcTaskTPC - received data is " << (dataGood ? "correct" : "wrong"); - const auto* dsHeader = o2::header::get(header); + const auto* dsHeader = DataRefUtils::getHeader(ref); if (dsHeader) { LOG(INFO) << "Matching messages seen by Dispatcher: " << dsHeader->totalEvaluatedMessages << ", accepted: " << dsHeader->totalAcceptedMessages diff --git a/Utilities/DataSampling/test/dataSamplingTimePipeline.cxx b/Utilities/DataSampling/test/dataSamplingTimePipeline.cxx index 4cdd17aa2310b..ec5c9075cde44 100644 --- a/Utilities/DataSampling/test/dataSamplingTimePipeline.cxx +++ b/Utilities/DataSampling/test/dataSamplingTimePipeline.cxx @@ -10,6 +10,7 @@ // or submit itself to any jurisdiction. #include "DataSampling/DataSampling.h" +#include "Framework/DataRefUtils.h" #include @@ -96,7 +97,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&) auto inputDataTpcProcessed = reinterpret_cast(ctx.inputs().get( "TPC_CLUSTERS_P_S").payload); - const auto* header = o2::header::get(ctx.inputs().get("TPC_CLUSTERS_S").header); + const auto* header = DataRefUtils::getHeader(ctx.inputs().get("TPC_CLUSTERS_S")); bool dataGood = true; for (int j = 0; j < header->payloadSize / sizeof(FakeCluster); ++j) { diff --git a/Utilities/Mergers/src/ObjectStore.cxx b/Utilities/Mergers/src/ObjectStore.cxx index 43bc400a0387e..82645a8586487 100644 --- a/Utilities/Mergers/src/ObjectStore.cxx +++ b/Utilities/Mergers/src/ObjectStore.cxx @@ -37,7 +37,7 @@ ObjectStore extractObjectFrom(const framework::DataRef& ref) const static std::string errorPrefix = "Could not extract object to be merged: "; using DataHeader = o2::header::DataHeader; - auto header = o2::header::get(ref.header); + auto header = framework::DataRefUtils::getHeader(ref); if (header->payloadSerializationMethod != o2::header::gSerializationMethodROOT) { throw std::runtime_error(errorPrefix + "It is not ROOT-serialized"); } @@ -79,4 +79,4 @@ ObjectStore extractObjectFrom(const framework::DataRef& ref) } // namespace object_store_helpers -} // namespace o2::mergers \ No newline at end of file +} // namespace o2::mergers