From ae870c72e566a2e75eb30766ea21fbeacc884f0d Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sun, 29 Jun 2025 17:37:55 +0000 Subject: [PATCH] Please consider the following formatting changes --- Common/TableProducer/timestampTester.cxx | 21 +++++++++------- Common/Tools/timestampModule.h | 31 +++++++++++++----------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Common/TableProducer/timestampTester.cxx b/Common/TableProducer/timestampTester.cxx index 1c2b097a184..6a7f829e950 100644 --- a/Common/TableProducer/timestampTester.cxx +++ b/Common/TableProducer/timestampTester.cxx @@ -16,15 +16,18 @@ /// \brief A task to fill the timestamp table from run number. /// Uses headers from CCDB /// -#include -#include -#include "Framework/runDataProcessing.h" -#include "Framework/AnalysisTask.h" +#include "MetadataHelper.h" + +#include "Common/Tools/timestampModule.h" + #include "CCDB/BasicCCDBManager.h" #include "CommonDataFormat/InteractionRecord.h" #include "DetectorsRaw/HBFUtils.h" -#include "MetadataHelper.h" -#include "Common/Tools/timestampModule.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +#include +#include using namespace o2::framework; using namespace o2::header; @@ -33,9 +36,9 @@ using namespace o2; 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 + 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"}; diff --git a/Common/Tools/timestampModule.h b/Common/Tools/timestampModule.h index 24d5fb2dc80..36cf507f398 100644 --- a/Common/Tools/timestampModule.h +++ b/Common/Tools/timestampModule.h @@ -12,11 +12,12 @@ #ifndef COMMON_TOOLS_TIMESTAMPMODULEH_ #define COMMON_TOOLS_TIMESTAMPMODULEH_ -#include -#include -#include #include "Framework/AnalysisDataModel.h" +#include +#include +#include + namespace o2 { namespace common @@ -31,13 +32,13 @@ struct timestampConfigurables : o2::framework::ConfigurableGroup { o2::framework::Configurable fatalOnInvalidTimestamp{"fatalOnInvalidTimestamp", false, "Generate fatal error for invalid timestamps"}; o2::framework::Configurable rct_path{"rct-path", "RCT/Info/RunInformation", "path to the ccdb RCT objects for the SOR timestamps"}; o2::framework::Configurable orbit_reset_path{"orbit-reset-path", "CTP/Calib/OrbitReset", "path to the ccdb orbit-reset objects"}; - o2::framework::Configurable isRun2MC{"isRun2MC", -1, "Running mode: enable only for Run 2 MC. Timestamps are set to SOR timestamp. Default: -1 (autoset from metadata) 0 (Standard) 1 (Run 2 MC)"}; // o2-linter: disable=name/configurable (temporary fix) + o2::framework::Configurable isRun2MC{"isRun2MC", -1, "Running mode: enable only for Run 2 MC. Timestamps are set to SOR timestamp. Default: -1 (autoset from metadata) 0 (Standard) 1 (Run 2 MC)"}; // o2-linter: disable=name/configurable (temporary fix) }; //__________________________________________ // time stamp module -// -// class to acquire time stamps to be used in +// +// class to acquire time stamps to be used in // modular (plugin) fashion class TimestampModule @@ -53,14 +54,15 @@ class TimestampModule o2::common::timestamp::timestampConfigurables timestampOpts; // objects necessary during processing - std::map mapRunToOrbitReset; /// Cache of orbit reset timestamps + std::map mapRunToOrbitReset; /// Cache of orbit reset timestamps std::map> mapRunToRunDuration; /// Cache of run duration timestamps - int lastRunNumber; /// Last run number processed - int64_t orbitResetTimestamp; /// Orbit-reset timestamp in us - std::pair runDuration; /// Pair of SOR and EOR timestamps + int lastRunNumber; /// Last run number processed + int64_t orbitResetTimestamp; /// Orbit-reset timestamp in us + std::pair runDuration; /// Pair of SOR and EOR timestamps template - void init(TTimestampOpts const& external_timestampOpts, TMetadatahelper const& metadataInfo ){ + void init(TTimestampOpts const& external_timestampOpts, TMetadatahelper const& metadataInfo) + { timestampOpts = external_timestampOpts; if (timestampOpts.isRun2MC.value == -1) { @@ -74,9 +76,10 @@ class TimestampModule } template - void process(TBCs const& bcs, Tccdb const& ccdb, TTimestampBuffer& timestampbuffer, TCursor& timestampTable){ + void process(TBCs const& bcs, Tccdb const& ccdb, TTimestampBuffer& timestampbuffer, TCursor& timestampTable) + { timestampbuffer.clear(); - for(auto const& bc : bcs){ + for (auto const& bc : bcs) { int runNumber = bc.runNumber(); // We need to set the orbit-reset timestamp for the run number. // This is done with caching if the run number was already processed before. @@ -141,4 +144,4 @@ class TimestampModule } // namespace common } // namespace o2 -#endif // COMMON_TOOLS_TIMESTAMPMODULEH_ \ No newline at end of file +#endif // COMMON_TOOLS_TIMESTAMPMODULEH_