From 168fa246fc390b44aaa34fc9cf68004f692350b6 Mon Sep 17 00:00:00 2001 From: David Dobrigkeit Chinellato Date: Sun, 31 Aug 2025 10:13:56 -0300 Subject: [PATCH] [Common] Cleanup: remove test tasks --- Common/TableProducer/CMakeLists.txt | 10 -- Common/TableProducer/timestampTester.cxx | 72 ----------- .../TableProducer/trackPropagationTester.cxx | 115 ------------------ 3 files changed, 197 deletions(-) delete mode 100644 Common/TableProducer/timestampTester.cxx delete mode 100644 Common/TableProducer/trackPropagationTester.cxx diff --git a/Common/TableProducer/CMakeLists.txt b/Common/TableProducer/CMakeLists.txt index cdd408d4bff..b1805257bb9 100644 --- a/Common/TableProducer/CMakeLists.txt +++ b/Common/TableProducer/CMakeLists.txt @@ -59,11 +59,6 @@ o2physics_add_dpl_workflow(timestamp PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(timestamptester - SOURCES timestampTester.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore - COMPONENT_NAME Analysis) - o2physics_add_dpl_workflow(weak-decay-indices SOURCES weakDecayIndices.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore @@ -84,11 +79,6 @@ o2physics_add_dpl_workflow(track-dca-cov-filler-run2 PUBLIC_LINK_LIBRARIES O2::DetectorsBase O2Physics::AnalysisCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(track-propagation-tester - SOURCES trackPropagationTester.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::trackSelectionRequest - COMPONENT_NAME Analysis) - o2physics_add_dpl_workflow(calo-clusters SOURCES caloClusterProducer.cxx PUBLIC_LINK_LIBRARIES O2::DataFormatsPHOS O2::PHOSBase O2::PHOSReconstruction O2Physics::DataModel diff --git a/Common/TableProducer/timestampTester.cxx b/Common/TableProducer/timestampTester.cxx deleted file mode 100644 index 037cd4e38f3..00000000000 --- a/Common/TableProducer/timestampTester.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// -/// \file timestamp.cxx -/// \author Nicolò Jacazio -/// \since 2020-06-22 -/// \brief A task to fill the timestamp table from run number. -/// Uses headers from CCDB -/// -#include "MetadataHelper.h" - -#include "Common/Tools/timestampModule.h" - -#include "CCDB/BasicCCDBManager.h" -#include "CommonDataFormat/InteractionRecord.h" -#include "DetectorsRaw/HBFUtils.h" -#include "Framework/AnalysisTask.h" -#include "Framework/runDataProcessing.h" - -#include -#include - -using namespace o2::framework; -using namespace o2::header; -using namespace o2; - -o2::common::core::MetadataHelper metadataInfo; // Metadata helper - -struct TimestampTask { - Produces timestampTable; /// Table with SOR timestamps produced by the task - Service ccdb; /// CCDB manager to access orbit-reset timestamp - o2::ccdb::CcdbApi ccdb_api; /// API to access CCDB headers - - Configurable ccdb_url{"ccdb-url", "http://alice-ccdb.cern.ch", "URL of the CCDB database"}; - - o2::common::timestamp::timestampConfigurables timestampConfigurables; - o2::common::timestamp::TimestampModule timestampMod; - - std::vector timestampBuffer; - - void init(o2::framework::InitContext&) - { - // CCDB initialization - ccdb->setURL(ccdb_url.value); - ccdb_api.init(ccdb_url.value); - - // timestamp configuration + init - timestampMod.init(timestampConfigurables, metadataInfo); - } - - void process(aod::BCs const& bcs) - { - timestampMod.process(bcs, ccdb, timestampBuffer, timestampTable); - } -}; - -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ - // Parse the metadata - metadataInfo.initMetadata(cfgc); - - return WorkflowSpec{adaptAnalysisTask(cfgc)}; -} diff --git a/Common/TableProducer/trackPropagationTester.cxx b/Common/TableProducer/trackPropagationTester.cxx deleted file mode 100644 index 18543ee0994..00000000000 --- a/Common/TableProducer/trackPropagationTester.cxx +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// \file trackPropagationTester.cxx -/// \brief testing ground for track propagation -/// \author ALICE - -//=============================================================== -// -// Experimental version of the track propagation task -// this utilizes an analysis task module that can be employed elsewhere -// and allows for the re-utilization of a material LUT -// -// candidate approach for core service approach -// -//=============================================================== - -#include "Common/Core/trackUtilities.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/Tools/StandardCCDBLoader.h" -#include "Common/Tools/TrackPropagationModule.h" -#include "Common/Tools/TrackTuner.h" - -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "CommonConstants/GeomConstants.h" -#include "CommonUtils/NameConf.h" -#include "DataFormatsCalibration/MeanVertexObject.h" -#include "DataFormatsParameters/GRPMagField.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/Propagator.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/DCA.h" - -#include - -// The Run 3 AO2D stores the tracks at the point of innermost update. For a track with ITS this is the innermost (or second innermost) -// ITS layer. For a track without ITS, this is the TPC inner wall or for loopers in the TPC even a radius beyond that. -// In order to use the track parameters, the tracks have to be propagated to the collision vertex which is done by this task. -// The task consumes the TracksIU and TracksCovIU tables and produces Tracks and TracksCov to which then the user analysis can subscribe. -// -// This task is not needed for Run 2 converted data. -// There are two versions of the task (see process flags), one producing also the covariance matrix and the other only the tracks table. - -using namespace o2; -using namespace o2::framework; -// using namespace o2::framework::expressions; - -struct TrackPropagationTester { - o2::common::StandardCCDBLoaderConfigurables standardCCDBLoaderConfigurables; - o2::common::TrackPropagationProducts trackPropagationProducts; - o2::common::TrackPropagationConfigurables trackPropagationConfigurables; - - // the track tuner object -> needs to be here as it inherits from ConfigurableGroup (+ has its own copy of ccdbApi) - TrackTuner trackTunerObj; - - // CCDB boilerplate declarations - o2::framework::Configurable ccdburl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Service ccdb; - - o2::common::StandardCCDBLoader ccdbLoader; - o2::common::TrackPropagationModule trackPropagation; - - HistogramRegistry registry{"registry"}; - - void init(o2::framework::InitContext& initContext) - { - // CCDB boilerplate init - ccdb->setCaching(true); - ccdb->setLocalObjectValidityChecking(); - ccdb->setURL(ccdburl.value); - - // task-specific - trackPropagation.init(trackPropagationConfigurables, trackTunerObj, registry, initContext); - } - - void processReal(aod::Collisions const& collisions, soa::Join const& tracks, aod::Collisions const&, aod::BCs const& bcs) - { - // task-specific - ccdbLoader.initCCDBfromBCs(standardCCDBLoaderConfigurables, ccdb, bcs); - trackPropagation.fillTrackTables(trackPropagationConfigurables, trackTunerObj, ccdbLoader, collisions, tracks, trackPropagationProducts, registry); - } - PROCESS_SWITCH(TrackPropagationTester, processReal, "Process Real Data", true); - - // ----------------------- - void processMc(aod::Collisions const& collisions, soa::Join const& tracks, aod::McParticles const&, aod::Collisions const&, aod::BCs const& bcs) - { - ccdbLoader.initCCDBfromBCs(standardCCDBLoaderConfigurables, ccdb, bcs); - trackPropagation.fillTrackTables(trackPropagationConfigurables, trackTunerObj, ccdbLoader, collisions, tracks, trackPropagationProducts, registry); - } - PROCESS_SWITCH(TrackPropagationTester, processMc, "Process Monte Carlo", false); -}; - -//**************************************************************************************** -/** - * Workflow definition. - */ -//**************************************************************************************** -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ - WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; - return workflow; -}