From 196273f492a0a9cc1c9da58f3666cd13ce573a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Wed, 23 Sep 2026 16:59:31 +0200 Subject: [PATCH 01/11] Fix build/header_guard --- ALICE3/Core/ALICE3CoreLinkDef.h | 2 ++ ALICE3/Core/FastTrackerLinkDef.h | 5 +---- Common/CCDB/AnalysisCCDBLinkDef.h | 5 +---- Common/Core/AnalysisCoreLinkDef.h | 5 +---- Common/Core/EventFilteringUtilsLinkDef.h | 2 ++ Common/Core/FFitWeightsLinkDef.h | 5 +---- Common/Tools/Multiplicity/multToolsLinkDef.h | 2 ++ Common/Tools/trackSelectionRequestLinkDef.h | 2 ++ PWGCF/Core/PWGCFCoreLinkDef.h | 5 ++--- PWGCF/GenericFramework/Core/GenericFrameworkLinkDef.h | 5 +---- PWGCF/JCorran/Core/JCORRANLinkDef.h | 5 +---- PWGCF/TwoParticleCorrelations/Core/TwoPartCorrLinkDef.h | 6 ++---- PWGEM/Dilepton/Core/PWGEMDileptonCoreLinkDef.h | 5 +---- PWGEM/Dilepton/DataModel/EvSelFlags.h | 6 +++--- PWGHF/D2H/Macros/HFInvMassFitterLinkDef.h | 5 +---- PWGJE/Core/PWGJECoreLinkDef.h | 5 +---- PWGLF/Utils/collisionCutsGroupLinkDef.h | 5 +---- PWGLF/Utils/v0SelectionGroupLinkDef.h | 5 +---- PWGUD/Core/DGCutparHolderLinkDef.h | 6 ++---- PWGUD/Core/DGPIDSelectorLinkDef.h | 2 ++ PWGUD/Core/FITCutParHolderLinkDef.h | 5 +---- PWGUD/Core/SGCutParHolderLinkDef.h | 5 +---- PWGUD/Core/UDFSParserLinkDef.h | 6 ++---- PWGUD/Core/UDGoodRunSelectorLinkDef.h | 2 ++ PWGUD/Core/UPCCutparHolderLinkDef.h | 2 ++ PWGUD/Core/decayTreeLinkDef.h | 6 ++---- Tutorials/src/ConfigurableCutLinkDef.h | 2 ++ 27 files changed, 42 insertions(+), 74 deletions(-) diff --git a/ALICE3/Core/ALICE3CoreLinkDef.h b/ALICE3/Core/ALICE3CoreLinkDef.h index bdd3c955d51..10706fa14cc 100644 --- a/ALICE3/Core/ALICE3CoreLinkDef.h +++ b/ALICE3/Core/ALICE3CoreLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/ALICE3/Core/FastTrackerLinkDef.h b/ALICE3/Core/FastTrackerLinkDef.h index 9885d281a4d..03e3a3c3f86 100644 --- a/ALICE3/Core/FastTrackerLinkDef.h +++ b/ALICE3/Core/FastTrackerLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef ALICE3_CORE_FASTTRACKERLINKDEF_H_ -#define ALICE3_CORE_FASTTRACKERLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -19,5 +18,3 @@ #pragma link C++ class o2::fastsim::GeometryContainer + ; #pragma link C++ class o2::fastsim::FastTracker + ; #pragma link C++ class o2::fastsim::FlatLutWriter + ; - -#endif // ALICE3_CORE_FASTTRACKERLINKDEF_H_ diff --git a/Common/CCDB/AnalysisCCDBLinkDef.h b/Common/CCDB/AnalysisCCDBLinkDef.h index bb2da231284..b8253021f88 100644 --- a/Common/CCDB/AnalysisCCDBLinkDef.h +++ b/Common/CCDB/AnalysisCCDBLinkDef.h @@ -14,8 +14,7 @@ /// /// \author Evgeny Kryshen -#ifndef COMMON_CCDB_ANALYSISCCDBLINKDEF_H_ -#define COMMON_CCDB_ANALYSISCCDBLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -24,5 +23,3 @@ #pragma link C++ class EventSelectionParams + ; #pragma link C++ class TriggerAliases + ; #pragma link C++ class std::map < uint64_t, uint32_t> + ; - -#endif // COMMON_CCDB_ANALYSISCCDBLINKDEF_H_ diff --git a/Common/Core/AnalysisCoreLinkDef.h b/Common/Core/AnalysisCoreLinkDef.h index b376ccc7f10..21eb52ac586 100644 --- a/Common/Core/AnalysisCoreLinkDef.h +++ b/Common/Core/AnalysisCoreLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef COMMON_CORE_ANALYSISCORELINKDEF_H_ -#define COMMON_CORE_ANALYSISCORELINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -25,5 +24,3 @@ #pragma link C++ class o2::pid::tpc::Response + ; #pragma link C++ class OrbitRange + ; - -#endif // COMMON_CORE_ANALYSISCORELINKDEF_H_ diff --git a/Common/Core/EventFilteringUtilsLinkDef.h b/Common/Core/EventFilteringUtilsLinkDef.h index 3f029b8aa9a..394c051784f 100644 --- a/Common/Core/EventFilteringUtilsLinkDef.h +++ b/Common/Core/EventFilteringUtilsLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/Common/Core/FFitWeightsLinkDef.h b/Common/Core/FFitWeightsLinkDef.h index 1960be8f4df..3c604376da9 100644 --- a/Common/Core/FFitWeightsLinkDef.h +++ b/Common/Core/FFitWeightsLinkDef.h @@ -14,9 +14,6 @@ /// /// \author Joachim C. K. B. Hansen -#ifndef COMMON_CORE_FFITWEIGHTSLINKDEF_H_ -#define COMMON_CORE_FFITWEIGHTSLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link C++ class FFitWeights + ; - -#endif // COMMON_CORE_FFITWEIGHTSLINKDEF_H_ diff --git a/Common/Tools/Multiplicity/multToolsLinkDef.h b/Common/Tools/Multiplicity/multToolsLinkDef.h index f8740f5afcb..2f2cd969c20 100644 --- a/Common/Tools/Multiplicity/multToolsLinkDef.h +++ b/Common/Tools/Multiplicity/multToolsLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/Common/Tools/trackSelectionRequestLinkDef.h b/Common/Tools/trackSelectionRequestLinkDef.h index ae9e95b415b..93b201ce15a 100644 --- a/Common/Tools/trackSelectionRequestLinkDef.h +++ b/Common/Tools/trackSelectionRequestLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/PWGCF/Core/PWGCFCoreLinkDef.h b/PWGCF/Core/PWGCFCoreLinkDef.h index fcc73500be2..235b4a7d2b7 100644 --- a/PWGCF/Core/PWGCFCoreLinkDef.h +++ b/PWGCF/Core/PWGCFCoreLinkDef.h @@ -8,8 +8,8 @@ // 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. -#ifndef PWGCF_CORE_PWGCFCORELINKDEF_H_ -#define PWGCF_CORE_PWGCFCORELINKDEF_H_ + +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -23,4 +23,3 @@ #pragma link C++ class o2::analysis::TrackSelectionPIDCfg + ; #pragma link C++ class o2::analysis::SimpleInclusiveCut + ; #pragma link C++ class CorrelationContainer + ; -#endif // PWGCF_CORE_PWGCFCORELINKDEF_H_ diff --git a/PWGCF/GenericFramework/Core/GenericFrameworkLinkDef.h b/PWGCF/GenericFramework/Core/GenericFrameworkLinkDef.h index 3fea9523064..e3907fec165 100644 --- a/PWGCF/GenericFramework/Core/GenericFrameworkLinkDef.h +++ b/PWGCF/GenericFramework/Core/GenericFrameworkLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGCF_GENERICFRAMEWORK_CORE_GENERICFRAMEWORKLINKDEF_H_ -#define PWGCF_GENERICFRAMEWORK_CORE_GENERICFRAMEWORKLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -28,5 +27,3 @@ #pragma link C++ class o2::analysis::genericframework::GFWBinningCuts + ; #pragma link C++ class o2::analysis::genericframework::GFWRegions + ; #pragma link C++ class o2::analysis::genericframework::GFWCorrConfigs + ; - -#endif // PWGCF_GENERICFRAMEWORK_CORE_GENERICFRAMEWORKLINKDEF_H_ diff --git a/PWGCF/JCorran/Core/JCORRANLinkDef.h b/PWGCF/JCorran/Core/JCORRANLinkDef.h index d0e9bef308d..e48231cbdf1 100644 --- a/PWGCF/JCorran/Core/JCORRANLinkDef.h +++ b/PWGCF/JCorran/Core/JCORRANLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGCF_JCORRAN_CORE_JCORRANLINKDEF_H_ -#define PWGCF_JCORRAN_CORE_JCORRANLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -22,5 +21,3 @@ #pragma link C++ class FlowJSPCAnalysis + ; #pragma link C++ class FlowJSPCObservables + ; #pragma link C++ class JEPFlowAnalysis + ; - -#endif // PWGCF_JCORRAN_CORE_JCORRANLINKDEF_H_ diff --git a/PWGCF/TwoParticleCorrelations/Core/TwoPartCorrLinkDef.h b/PWGCF/TwoParticleCorrelations/Core/TwoPartCorrLinkDef.h index 3bb61740aaa..3b3bddb5118 100644 --- a/PWGCF/TwoParticleCorrelations/Core/TwoPartCorrLinkDef.h +++ b/PWGCF/TwoParticleCorrelations/Core/TwoPartCorrLinkDef.h @@ -8,8 +8,8 @@ // 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. -#ifndef PWGCF_TWOPARTICLECORRELATIONS_CORE_TWOPARTCORRLINKDEF_H_ -#define PWGCF_TWOPARTICLECORRELATIONS_CORE_TWOPARTCORRLINKDEF_H_ + +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -51,5 +51,3 @@ #pragma link C++ class o2::analysis::PWGCF::EventSelectionFilterAndAnalysis + ; #pragma link C++ class o2::analysis::PWGCF::FilterAndAnalysisFramework + ; #pragma link C++ class DihadronContainer + ; - -#endif // PWGCF_TWOPARTICLECORRELATIONS_CORE_TWOPARTCORRLINKDEF_H_ diff --git a/PWGEM/Dilepton/Core/PWGEMDileptonCoreLinkDef.h b/PWGEM/Dilepton/Core/PWGEMDileptonCoreLinkDef.h index fe78534478e..a0ba6d2b630 100644 --- a/PWGEM/Dilepton/Core/PWGEMDileptonCoreLinkDef.h +++ b/PWGEM/Dilepton/Core/PWGEMDileptonCoreLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGEM_DILEPTON_CORE_PWGEMDILEPTONCORELINKDEF_H_ -#define PWGEM_DILEPTON_CORE_PWGEMDILEPTONCORELINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -20,5 +19,3 @@ #pragma link C++ class DielectronCut + ; #pragma link C++ class DimuonCut + ; #pragma link C++ class EMTrackCut + ; - -#endif // PWGEM_DILEPTON_CORE_PWGEMDILEPTONCORELINKDEF_H_ diff --git a/PWGEM/Dilepton/DataModel/EvSelFlags.h b/PWGEM/Dilepton/DataModel/EvSelFlags.h index 0b05ff288eb..ae4d65a548b 100644 --- a/PWGEM/Dilepton/DataModel/EvSelFlags.h +++ b/PWGEM/Dilepton/DataModel/EvSelFlags.h @@ -9,8 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGEM_DILEPTON_CORE_EVSELFLAGS_H -#define PWGEM_DILEPTON_CORE_EVSELFLAGS_H +#ifndef PWGEM_DILEPTON_DATAMODEL_EVSELFLAGS_H_ +#define PWGEM_DILEPTON_DATAMODEL_EVSELFLAGS_H_ namespace o2::aod::emevsel { @@ -37,4 +37,4 @@ enum EventSelectionFlags { }; } // namespace o2::aod::emevsel -#endif // PWGEM_DILEPTON_CORE_EVSELFLAGS_H +#endif // PWGEM_DILEPTON_DATAMODEL_EVSELFLAGS_H_ diff --git a/PWGHF/D2H/Macros/HFInvMassFitterLinkDef.h b/PWGHF/D2H/Macros/HFInvMassFitterLinkDef.h index cc755de478f..f5ddd506b55 100644 --- a/PWGHF/D2H/Macros/HFInvMassFitterLinkDef.h +++ b/PWGHF/D2H/Macros/HFInvMassFitterLinkDef.h @@ -18,8 +18,7 @@ /// \author Biao Zhang /// \author Oleksii Lubynets -#ifndef PWGHF_D2H_MACROS_HFINVMASSFITTERLINKDEF_H_ -#define PWGHF_D2H_MACROS_HFINVMASSFITTERLINKDEF_H_ +// NOLINT(build/header_guard) #ifdef __CINT__ #pragma link off all globals; @@ -27,5 +26,3 @@ #pragma link off all functions; #pragma link C++ class HFInvMassFitter + ; #endif - -#endif // PWGHF_D2H_MACROS_HFINVMASSFITTERLINKDEF_H_ diff --git a/PWGJE/Core/PWGJECoreLinkDef.h b/PWGJE/Core/PWGJECoreLinkDef.h index 869be064e38..cd25d7b94be 100644 --- a/PWGJE/Core/PWGJECoreLinkDef.h +++ b/PWGJE/Core/PWGJECoreLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGJE_CORE_PWGJECORELINKDEF_H_ -#define PWGJE_CORE_PWGJECORELINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -21,5 +20,3 @@ #pragma link C++ namespace jetutilities + ; #pragma link C++ namespace fastjetutilities + ; #pragma link C++ namespace jettaggingutilities + ; - -#endif // PWGJE_CORE_PWGJECORELINKDEF_H_ diff --git a/PWGLF/Utils/collisionCutsGroupLinkDef.h b/PWGLF/Utils/collisionCutsGroupLinkDef.h index e327556fbd2..a6aa000a66e 100644 --- a/PWGLF/Utils/collisionCutsGroupLinkDef.h +++ b/PWGLF/Utils/collisionCutsGroupLinkDef.h @@ -17,8 +17,7 @@ /// /// \author Bong-Hwi Lim -#ifndef PWGLF_UTILS_COLLISIONCUTSGROUPLINKDEF_H_ -#define PWGLF_UTILS_COLLISIONCUTSGROUPLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -30,5 +29,3 @@ #pragma link C++ class std::vector < int> + ; #pragma link C++ class std::vector < float> + ; #pragma link C++ class std::vector < bool> + ; - -#endif // PWGLF_UTILS_COLLISIONCUTSGROUPLINKDEF_H_ diff --git a/PWGLF/Utils/v0SelectionGroupLinkDef.h b/PWGLF/Utils/v0SelectionGroupLinkDef.h index 3c81add2fc2..c40840a0625 100644 --- a/PWGLF/Utils/v0SelectionGroupLinkDef.h +++ b/PWGLF/Utils/v0SelectionGroupLinkDef.h @@ -9,8 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGLF_UTILS_V0SELECTIONGROUPLINKDEF_H_ -#define PWGLF_UTILS_V0SELECTIONGROUPLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; @@ -21,5 +20,3 @@ #pragma link C++ class std::vector < float> + ; #pragma link C++ class std::vector < double> + ; #pragma link C++ class std::vector < bool> + ; - -#endif // PWGLF_UTILS_V0SELECTIONGROUPLINKDEF_H_ diff --git a/PWGUD/Core/DGCutparHolderLinkDef.h b/PWGUD/Core/DGCutparHolderLinkDef.h index b6b7c63efca..722796d015f 100644 --- a/PWGUD/Core/DGCutparHolderLinkDef.h +++ b/PWGUD/Core/DGCutparHolderLinkDef.h @@ -8,12 +8,10 @@ // 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. -#ifndef PWGUD_CORE_DGCUTPARHOLDERLINKDEF_H_ -#define PWGUD_CORE_DGCUTPARHOLDERLINKDEF_H_ + +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class DGCutparHolder + ; - -#endif // PWGUD_CORE_DGCUTPARHOLDERLINKDEF_H_ diff --git a/PWGUD/Core/DGPIDSelectorLinkDef.h b/PWGUD/Core/DGPIDSelectorLinkDef.h index 2d0b181ba19..837079914e1 100644 --- a/PWGUD/Core/DGPIDSelectorLinkDef.h +++ b/PWGUD/Core/DGPIDSelectorLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/PWGUD/Core/FITCutParHolderLinkDef.h b/PWGUD/Core/FITCutParHolderLinkDef.h index 3194a6754b2..5e0644779cb 100644 --- a/PWGUD/Core/FITCutParHolderLinkDef.h +++ b/PWGUD/Core/FITCutParHolderLinkDef.h @@ -13,12 +13,9 @@ // \author Sandor Lokos, sandor.lokos@cern.ch // \since March 2026 -#ifndef PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_ -#define PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class FITCutParHolder + ; - -#endif // PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_ diff --git a/PWGUD/Core/SGCutParHolderLinkDef.h b/PWGUD/Core/SGCutParHolderLinkDef.h index 5dcadadc69e..f5d3a6f5a82 100644 --- a/PWGUD/Core/SGCutParHolderLinkDef.h +++ b/PWGUD/Core/SGCutParHolderLinkDef.h @@ -9,12 +9,9 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_ -#define PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_ +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class SGCutParHolder + ; - -#endif // PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_ diff --git a/PWGUD/Core/UDFSParserLinkDef.h b/PWGUD/Core/UDFSParserLinkDef.h index f7caf1a0ab0..8f6e10eabd6 100644 --- a/PWGUD/Core/UDFSParserLinkDef.h +++ b/PWGUD/Core/UDFSParserLinkDef.h @@ -8,12 +8,10 @@ // 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. -#ifndef PWGUD_CORE_UDFSPARSERLINKDEF_H_ -#define PWGUD_CORE_UDFSPARSERLINKDEF_H_ + +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class UDFSParser + ; - -#endif // PWGUD_CORE_UDFSPARSERLINKDEF_H_ diff --git a/PWGUD/Core/UDGoodRunSelectorLinkDef.h b/PWGUD/Core/UDGoodRunSelectorLinkDef.h index c26b4622809..c439e2e1094 100644 --- a/PWGUD/Core/UDGoodRunSelectorLinkDef.h +++ b/PWGUD/Core/UDGoodRunSelectorLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/PWGUD/Core/UPCCutparHolderLinkDef.h b/PWGUD/Core/UPCCutparHolderLinkDef.h index 49d4802838d..6391b991669 100644 --- a/PWGUD/Core/UPCCutparHolderLinkDef.h +++ b/PWGUD/Core/UPCCutparHolderLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; diff --git a/PWGUD/Core/decayTreeLinkDef.h b/PWGUD/Core/decayTreeLinkDef.h index 92d99ccf1bc..6ed7643f91b 100644 --- a/PWGUD/Core/decayTreeLinkDef.h +++ b/PWGUD/Core/decayTreeLinkDef.h @@ -8,12 +8,10 @@ // 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. -#ifndef PWGUD_CORE_DECAYTREELINKDEF_H_ -#define PWGUD_CORE_DECAYTREELINKDEF_H_ + +// NOLINT(build/header_guard) #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class decayTree + ; - -#endif // PWGUD_CORE_DECAYTREELINKDEF_H_ diff --git a/Tutorials/src/ConfigurableCutLinkDef.h b/Tutorials/src/ConfigurableCutLinkDef.h index f2667e6b6cc..397ee540c36 100644 --- a/Tutorials/src/ConfigurableCutLinkDef.h +++ b/Tutorials/src/ConfigurableCutLinkDef.h @@ -9,6 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +// NOLINT(build/header_guard) + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; From 01db8c3da28ee0a8e7799aa237a5bdddf51a26a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:16:17 +0200 Subject: [PATCH 02/11] Fix build/include_what_you_use --- PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx | 3 ++- PWGCF/Femto3D/Tasks/multEstimator.cxx | 1 + .../TableProducer/femtoWorldProducerReducedTask.cxx | 2 ++ .../TableProducer/femtoWorldProducerTaskV0Only.cxx | 5 ++++- PWGEM/Tasks/phosCalibration.cxx | 1 + PWGLF/TableProducer/Nuspex/hyhe4builder.cxx | 1 + PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx | 1 + PWGLF/Tasks/Nuspex/AntimatterAbsorptionHMPID.cxx | 1 + PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx | 1 + PWGMM/Mult/TableProducer/percentiles.cxx | 1 + PWGMM/Mult/Tasks/dndeta.cxx | 1 + PWGMM/Mult/Tasks/puremc-dndeta.cxx | 1 + PWGUD/Tasks/sgFITAnalyzer.cxx | 1 + PWGUD/Tasks/sgSpectraAnalyzer.cxx | 1 + Tutorials/ML/applyMlSelection.cxx | 1 + Tutorials/src/preprocess.cxx | 1 + Tutorials/src/reweighting.cxx | 1 + 17 files changed, 22 insertions(+), 2 deletions(-) diff --git a/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx b/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx index 68f4b4bc7a8..4f7c7de7d4c 100644 --- a/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -69,7 +70,7 @@ struct NetProtonCumulants_Table_QA { // Filter command*********** Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl); + Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl); // Connect to ccdb Service ccdb; diff --git a/PWGCF/Femto3D/Tasks/multEstimator.cxx b/PWGCF/Femto3D/Tasks/multEstimator.cxx index fc284861c28..b73b1822985 100644 --- a/PWGCF/Femto3D/Tasks/multEstimator.cxx +++ b/PWGCF/Femto3D/Tasks/multEstimator.cxx @@ -45,6 +45,7 @@ #include #include +#include #include #include #include diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx index 28ef5d0ea9e..b477e97f4e5 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx @@ -37,6 +37,8 @@ #include #include +#include + using namespace o2; using namespace o2::analysis::femtoWorld; using namespace o2::framework; diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx index 091afad61ba..c4d9491f507 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx @@ -35,9 +35,12 @@ #include #include -#include +#include // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h) +#include #include +#include + using namespace o2; using namespace o2::analysis::femtoWorld; using namespace o2::framework; diff --git a/PWGEM/Tasks/phosCalibration.cxx b/PWGEM/Tasks/phosCalibration.cxx index 5e62addf7dc..0f244127a0e 100644 --- a/PWGEM/Tasks/phosCalibration.cxx +++ b/PWGEM/Tasks/phosCalibration.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include using namespace o2; diff --git a/PWGLF/TableProducer/Nuspex/hyhe4builder.cxx b/PWGLF/TableProducer/Nuspex/hyhe4builder.cxx index f4ddba0fdbe..50e450b7936 100644 --- a/PWGLF/TableProducer/Nuspex/hyhe4builder.cxx +++ b/PWGLF/TableProducer/Nuspex/hyhe4builder.cxx @@ -47,6 +47,7 @@ #include #include #include +#include using namespace std; using namespace o2; diff --git a/PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx b/PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx index 6c20a736eda..e1329901149 100644 --- a/PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx +++ b/PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx @@ -61,6 +61,7 @@ #include #include #include +#include using namespace o2; using namespace o2::framework; diff --git a/PWGLF/Tasks/Nuspex/AntimatterAbsorptionHMPID.cxx b/PWGLF/Tasks/Nuspex/AntimatterAbsorptionHMPID.cxx index 50dd28efbdc..ce410a7dd57 100644 --- a/PWGLF/Tasks/Nuspex/AntimatterAbsorptionHMPID.cxx +++ b/PWGLF/Tasks/Nuspex/AntimatterAbsorptionHMPID.cxx @@ -44,6 +44,7 @@ #include #include #include +#include using namespace o2; using namespace o2::framework; diff --git a/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx b/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx index 1d2d5c11ec0..6ed90f63f57 100644 --- a/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx +++ b/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx @@ -47,6 +47,7 @@ #include #include #include +#include using namespace o2; using namespace o2::framework; diff --git a/PWGMM/Mult/TableProducer/percentiles.cxx b/PWGMM/Mult/TableProducer/percentiles.cxx index d34802ab2ae..bba44ad0243 100644 --- a/PWGMM/Mult/TableProducer/percentiles.cxx +++ b/PWGMM/Mult/TableProducer/percentiles.cxx @@ -32,6 +32,7 @@ #include #include +#include using namespace o2; using namespace o2::framework; diff --git a/PWGMM/Mult/Tasks/dndeta.cxx b/PWGMM/Mult/Tasks/dndeta.cxx index ae99e5f8205..6f69f60e42c 100644 --- a/PWGMM/Mult/Tasks/dndeta.cxx +++ b/PWGMM/Mult/Tasks/dndeta.cxx @@ -42,6 +42,7 @@ #include #include +#include #include using namespace o2; diff --git a/PWGMM/Mult/Tasks/puremc-dndeta.cxx b/PWGMM/Mult/Tasks/puremc-dndeta.cxx index f634755a3dd..1891459aa4f 100644 --- a/PWGMM/Mult/Tasks/puremc-dndeta.cxx +++ b/PWGMM/Mult/Tasks/puremc-dndeta.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include using namespace o2; diff --git a/PWGUD/Tasks/sgFITAnalyzer.cxx b/PWGUD/Tasks/sgFITAnalyzer.cxx index de44924b0a2..39aa9c2486a 100644 --- a/PWGUD/Tasks/sgFITAnalyzer.cxx +++ b/PWGUD/Tasks/sgFITAnalyzer.cxx @@ -37,6 +37,7 @@ #include #include +#include #include using namespace o2; diff --git a/PWGUD/Tasks/sgSpectraAnalyzer.cxx b/PWGUD/Tasks/sgSpectraAnalyzer.cxx index b17c699970f..2d0d577bb84 100644 --- a/PWGUD/Tasks/sgSpectraAnalyzer.cxx +++ b/PWGUD/Tasks/sgSpectraAnalyzer.cxx @@ -33,6 +33,7 @@ #include #include +#include #include #include diff --git a/Tutorials/ML/applyMlSelection.cxx b/Tutorials/ML/applyMlSelection.cxx index 869abd7a62c..2bee237ab3e 100644 --- a/Tutorials/ML/applyMlSelection.cxx +++ b/Tutorials/ML/applyMlSelection.cxx @@ -36,6 +36,7 @@ #include #include +#include #include using namespace o2; diff --git a/Tutorials/src/preprocess.cxx b/Tutorials/src/preprocess.cxx index 8a3bc43be05..14513311028 100644 --- a/Tutorials/src/preprocess.cxx +++ b/Tutorials/src/preprocess.cxx @@ -28,6 +28,7 @@ #include #include +#include using namespace o2; using namespace o2::framework; diff --git a/Tutorials/src/reweighting.cxx b/Tutorials/src/reweighting.cxx index 48e90a9560d..b2622385cb3 100644 --- a/Tutorials/src/reweighting.cxx +++ b/Tutorials/src/reweighting.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include using namespace o2; From 42976ee762218dfc33bc8277557491e6097a42b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:02:06 +0200 Subject: [PATCH 03/11] Fix whitespace/empty_if_body --- .../Core/EventSelectionFilterAndAnalysis.cxx | 2 -- .../Core/EventSelectionFilterAndAnalysis.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx index 3d8090a56c1..3181b07d8b5 100644 --- a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx +++ b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.cxx @@ -474,8 +474,6 @@ void EventSelectionFilterAndAnalysis::StoreArmedMask() } mOptArmedMask.push_back(optMask); optMask = 0UL; - if (mTriggerSelection != nullptr) { - } if (mZVertex != nullptr) { armedBrick(mZVertex); } diff --git a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h index 5030f011be7..c1fe9d83495 100644 --- a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h +++ b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h @@ -231,8 +231,6 @@ inline uint64_t EventSelectionFilterAndAnalysis::Filter(CollisionToFilter const& bool acc = mMultiplicityClasses->ComplexBrickHelper::Filter(selectedMask, bit); acceptcollision = acceptcollision && acc; } - if (mTriggerSelection != nullptr) { - } if (mZVertex != nullptr) { bool acc = filterBrickValue(selectedMask, bit, mZVertex, col.posZ()); acceptcollision = acceptcollision && acc; From 881be7a3fa3bd7b7aca7089da1d48ada725e3d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Thu, 24 Sep 2026 11:09:00 +0200 Subject: [PATCH 04/11] Fix whitespace/newline --- PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h b/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h index 6338329a776..ff5dc0ef962 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h @@ -472,9 +472,7 @@ std::array FemtoWorldV0Selection::getCutContainer(C const& sign = -1.; } else if (abs(nSigmaPrPos) < nSigmaPIDMax && abs(nSigmaPiNeg) < nSigmaPIDMax && diffAntiLambda < diffLambda) { sign = 1.; - } - // if it happens that none of these are true, ignore the invariant mass - else { + } else { // if it happens that none of these are true, ignore the invariant mass if (abs(nSigmaPrNeg) < nSigmaPIDMax && abs(nSigmaPiPos) < nSigmaPIDMax) { sign = -1.; } else if (abs(nSigmaPrPos) < nSigmaPIDMax && abs(nSigmaPiNeg) < nSigmaPIDMax) { From abfc82bf5e3d26549678ab4f11d8c6db8a6e6400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:05:20 +0200 Subject: [PATCH 05/11] Fix readability/multiline_comment --- PWGDQ/Core/MCSignal.h | 39 ++++++++++--------- .../Resonances/cksspinalignment.cxx | 9 ++--- .../Strangeness/strangederivedbuilder.cxx | 4 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/PWGDQ/Core/MCSignal.h b/PWGDQ/Core/MCSignal.h index 476fb4b8751..89f98c27d6f 100644 --- a/PWGDQ/Core/MCSignal.h +++ b/PWGDQ/Core/MCSignal.h @@ -331,25 +331,26 @@ bool MCSignal::CheckProng(int i, bool checkSources, const T& track) break; } } - } /*else { // check generation in time - if (!currentMCParticle.has_daughters()) { - return false; - } - const auto& daughtersSlice = currentMCParticle.template daughters_as

(); - for (auto& d : daughtersSlice) { - if (!fProngs[i].fExcludePDGInHistory[k] && fProngs[i].ComparePDG(d.pdgCode(), fProngs[i].fPDGInHistory[k], true, fProngs[i].fExcludePDGInHistory[k])) { - pdgInHistory.emplace_back(d.pdgCode()); - break; - } - if (fProngs[i].fExcludePDGInHistory[k] && !fProngs[i].ComparePDG(d.pdgCode(), fProngs[i].fPDGInHistory[k], true, fProngs[i].fExcludePDGInHistory[k])) { - return false; - } - ith++; - if (ith > 10) { // need error message. Given pdg code was not found within 10 generations of the particles decay chain. - break; - } - } - }*/ + } + // else { // check generation in time + // if (!currentMCParticle.has_daughters()) { + // return false; + // } + // const auto& daughtersSlice = currentMCParticle.template daughters_as

(); + // for (auto& d : daughtersSlice) { + // if (!fProngs[i].fExcludePDGInHistory[k] && fProngs[i].ComparePDG(d.pdgCode(), fProngs[i].fPDGInHistory[k], true, fProngs[i].fExcludePDGInHistory[k])) { + // pdgInHistory.emplace_back(d.pdgCode()); + // break; + // } + // if (fProngs[i].fExcludePDGInHistory[k] && !fProngs[i].ComparePDG(d.pdgCode(), fProngs[i].fPDGInHistory[k], true, fProngs[i].fExcludePDGInHistory[k])) { + // return false; + // } + // ith++; + // if (ith > 10) { // need error message. Given pdg code was not found within 10 generations of the particles decay chain. + // break; + // } + // } + // } } if (pdgInHistory.size() != nIncludedPDG) { // vector has as many entries as mothers (daughters) defined for prong return false; diff --git a/PWGLF/TableProducer/Resonances/cksspinalignment.cxx b/PWGLF/TableProducer/Resonances/cksspinalignment.cxx index c52483f28fe..8a62bb13ad4 100644 --- a/PWGLF/TableProducer/Resonances/cksspinalignment.cxx +++ b/PWGLF/TableProducer/Resonances/cksspinalignment.cxx @@ -139,11 +139,10 @@ struct cksspinalignment { } bool keepEvent(uint64_t eventIndex) const - { /* - if (cfgKeepFraction >= 1.0f) { - return true; - } - */ + { + // if (cfgKeepFraction >= 1.0f) { + // return true; + // } // SplitMix64 pseudo-random hash uint64_t x = eventIndex + 0x9e3779b97f4a7c15ULL; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9ULL; diff --git a/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx b/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx index 57ebfa938a0..e4f22fddc9f 100644 --- a/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx @@ -579,8 +579,8 @@ struct strangederivedbuilder { // auto TraCascTable_thisColl = TraCascades.sliceBy(TraCascperCollision, collIdx); bool strange = V0Table_thisColl.size() > 0 || CascTable_thisColl.size() > 0 || - KFCascTable_thisColl.size() > 0 /* || - TraCascTable_thisColl.size() > 0*/ + KFCascTable_thisColl.size() > 0 + // ||TraCascTable_thisColl.size() > 0 ; auto bc = collision.template bc_as(); From 8eea70bbe04af3e66054a889640d90eb943256cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:59:59 +0200 Subject: [PATCH 06/11] Fix readability/braces --- Common/DataModel/Centrality.h | 4 +++ DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx | 25 ++++++++----------- DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx | 4 +-- .../Core/FemtoWorldTrackSelection.h | 2 +- PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h | 2 +- .../Tasks/femtoWorldPairTaskTrackTrack.cxx | 25 ++++++++++++------- PWGDQ/Macros/fit_library/CB2Pdf.h | 2 +- PWGDQ/Macros/fit_library/ExpPdf.h | 2 +- PWGDQ/Macros/fit_library/GausPdf.h | 2 +- PWGDQ/Macros/fit_library/Pol4ExpPdf.h | 2 +- PWGDQ/Macros/fit_library/VWGPdf.h | 2 +- PWGLF/Tasks/Resonances/lambdav2.cxx | 9 +++---- .../Strangeness/phiStrangeCorrelation.cxx | 10 ++++---- Tutorials/src/associatedExample.cxx | 2 +- 14 files changed, 48 insertions(+), 45 deletions(-) diff --git a/Common/DataModel/Centrality.h b/Common/DataModel/Centrality.h index 3bdf839eed8..a7f073fde92 100644 --- a/Common/DataModel/Centrality.h +++ b/Common/DataModel/Centrality.h @@ -100,18 +100,22 @@ using BCCentFT0C = BCCentFT0Cs::iterator; template concept HasRun2Centrality = requires(T&& t) { + // NOLINTBEGIN(readability/braces) { t.centRun2V0M() }; { t.centRun2CL0() }; { t.centRun2CL1() }; + // NOLINTEND(readability/braces) }; template concept HasCentrality = requires(T&& t) { + // NOLINTBEGIN(readability/braces) { t.centFV0A() }; { t.centFT0M() }; { t.centFT0A() }; { t.centFT0C() }; { t.centNTPV() }; + // NOLINTEND(readability/braces) }; } // namespace o2::aod diff --git a/DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx b/DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx index 5e6cffea36d..acb75778be9 100644 --- a/DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx +++ b/DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx @@ -1087,7 +1087,6 @@ struct DetectorOccupancyQaTask { // July 2025: more for data vs MC: if (track.hasTPC() && occupancy >= 0 && confAddBasicQAhistos) { float pt = track.pt(); - // pt 0.2-0.5 if (pt > 0.2 && pt < 0.5) { if (nPV >= 10 && nPV < 400) { histos.fill(HIST("QA_noTPCcuts/nPV_10_200/tpcNClsFindable_vs_occup_pt_02_05"), track.tpcNClsFindable(), occupancy); @@ -1098,9 +1097,7 @@ struct DetectorOccupancyQaTask { histos.fill(HIST("QA_noTPCcuts/nPV_above2000/tpcNClsFound_vs_occup_pt_02_05"), track.tpcNClsFound(), occupancy); histos.fill(HIST("QA_noTPCcuts/nPV_above2000/tpcChi2NCl_vs_occup_pt_02_05"), track.tpcChi2NCl(), occupancy); } - } - // pt 0.5-1.0 - else if (pt > 0.5 && pt < 1.0) { + } else if (pt > 0.5 && pt < 1.0) { if (nPV >= 10 && nPV < 400) { histos.fill(HIST("QA_noTPCcuts/nPV_10_200/tpcNClsFindable_vs_occup_pt_05_10"), track.tpcNClsFindable(), occupancy); histos.fill(HIST("QA_noTPCcuts/nPV_10_200/tpcNClsFound_vs_occup_pt_05_10"), track.tpcNClsFound(), occupancy); @@ -1110,9 +1107,7 @@ struct DetectorOccupancyQaTask { histos.fill(HIST("QA_noTPCcuts/nPV_above2000/tpcNClsFound_vs_occup_pt_05_10"), track.tpcNClsFound(), occupancy); histos.fill(HIST("QA_noTPCcuts/nPV_above2000/tpcChi2NCl_vs_occup_pt_05_10"), track.tpcChi2NCl(), occupancy); } - } - // pt > 1.0 - else if (pt > 1.0) { + } else if (pt > 1.0) { if (nPV >= 10 && nPV < 400) { histos.fill(HIST("QA_noTPCcuts/nPV_10_200/tpcNClsFindable_vs_occup_pt_above1_0"), track.tpcNClsFindable(), occupancy); histos.fill(HIST("QA_noTPCcuts/nPV_10_200/tpcNClsFound_vs_occup_pt_above1_0"), track.tpcNClsFound(), occupancy); @@ -1383,8 +1378,8 @@ struct DetectorOccupancyQaTask { int tpcNClsFound = track.tpcNClsFound(); int tpcNClsCrossedRows = track.tpcNClsCrossedRows(); - if (sign > 0) // positive tracks - { + if (sign > 0) { + // positive tracks histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_pos"), pt, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_pos"), eta, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPhi_pos"), phi, occupancy, pt); @@ -1401,8 +1396,8 @@ struct DetectorOccupancyQaTask { histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsFound_pos"), tpcNClsFound); histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/QA_tpcNClsCrossedRows_pos"), tpcNClsCrossedRows); } - } else // negative tracks - { + } else { + // negative tracks histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPt_neg"), pt, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hEta_neg"), eta, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_10_200/kine_vs_weighted_occup/PV_hPhi_neg"), phi, occupancy, pt); @@ -1449,8 +1444,8 @@ struct DetectorOccupancyQaTask { } // end of TPC good global // July 2025: for data vs MC kine distr comparison - if (sign > 0) // positive tracks - { + if (sign > 0) { + // positive tracks histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_pos"), pt, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_pos"), eta, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_pos"), phi, occupancy, pt); @@ -1463,8 +1458,8 @@ struct DetectorOccupancyQaTask { histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/hPhi_posModifiedQA"), phi); } } - } else // negative tracks - { + } else { + // negative tracks histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPt_neg"), pt, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hEta_neg"), eta, occupancy); histos.fill(HIST("track_distr_nITStrThisEv_above_2000/kine_vs_weighted_occup/PV_hPhi_neg"), phi, occupancy, pt); diff --git a/DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx b/DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx index b85b1d3b42c..3a5579ebe51 100644 --- a/DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx +++ b/DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx @@ -991,9 +991,9 @@ struct LightIonsEvSelQa { // vZ diff (FT0 vs by tracks) bool badVzDiff = 0; - if (confUseDiffVzCutFromEvSel) + if (confUseDiffVzCutFromEvSel) { badVzDiff = !col.selection_bit(kIsGoodZvtxFT0vsPV); - else { // tune by hand + } else { // tune by hand float meanDiff = 0.0; // cm // O-O if (lastRunNumber == 564356) diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldTrackSelection.h b/PWGCF/FemtoWorld/Core/FemtoWorldTrackSelection.h index 360587d82ef..69e16841ce0 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldTrackSelection.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldTrackSelection.h @@ -96,7 +96,7 @@ class FemtoWorldTrackSelection : public FemtoWorldObjectSelection void init(o2::framework::HistogramRegistry* registry); diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx index 1711a4fdc48..8726047fd75 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx @@ -214,32 +214,39 @@ struct femtoWorldPairTaskTrackTrack { if (mom > 0.5) { // if (TMath::Hypot( nsigmaTOFP, nsigmaTPCP )/TMath::Sqrt(2) < 3.0) if (mom < 2.0) { - if (TMath::Hypot(nsigmaTOFK, nsigmaTPCK) < fNsigma) + if (TMath::Hypot(nsigmaTOFK, nsigmaTPCK) < fNsigma) { return true; - } else if (TMath::Hypot(nsigmaTOFK, nsigmaTPCK) < fNsigma2) + } + } else if (TMath::Hypot(nsigmaTOFK, nsigmaTPCK) < fNsigma2) { return true; + } } else { - if (TMath::Abs(nsigmaTPCK) < fNsigma) + if (TMath::Abs(nsigmaTPCK) < fNsigma) { return true; + } } } else { - if (mom < 0.4) { if (nsigmaTOFK < -999.) { - if (TMath::Abs(nsigmaTPCK) < 2.0) + if (TMath::Abs(nsigmaTPCK) < 2.0) { return true; - } else if (TMath::Abs(nsigmaTOFK) < 3.0 && TMath::Abs(nsigmaTPCK) < 3.0) + } + } else if (TMath::Abs(nsigmaTOFK) < 3.0 && TMath::Abs(nsigmaTPCK) < 3.0) { return true; + } } else if (mom >= 0.4 && mom <= 0.6) { if (nsigmaTOFK < -999.) { - if (TMath::Abs(nsigmaTPCK) < 2.0) + if (TMath::Abs(nsigmaTPCK) < 2.0) { return true; - } else if (TMath::Abs(nsigmaTOFK) < 3.0 && TMath::Abs(nsigmaTPCK) < 3.0) + } + } else if (TMath::Abs(nsigmaTOFK) < 3.0 && TMath::Abs(nsigmaTPCK) < 3.0) { return true; + } } else if (nsigmaTOFK < -999.) { return false; - } else if (TMath::Abs(nsigmaTOFK) < 3.0 && TMath::Abs(nsigmaTPCK) < 3.0) + } else if (TMath::Abs(nsigmaTOFK) < 3.0 && TMath::Abs(nsigmaTPCK) < 3.0) { return true; + } } return false; } diff --git a/PWGDQ/Macros/fit_library/CB2Pdf.h b/PWGDQ/Macros/fit_library/CB2Pdf.h index 23cb291dcdd..d5b5326813e 100644 --- a/PWGDQ/Macros/fit_library/CB2Pdf.h +++ b/PWGDQ/Macros/fit_library/CB2Pdf.h @@ -25,7 +25,7 @@ class CB2Pdf : public RooAbsPdf { public: - CB2Pdf(){}; + CB2Pdf() {} CB2Pdf(const char* name, const char* title, RooAbsReal& _x, RooAbsReal& _A, diff --git a/PWGDQ/Macros/fit_library/ExpPdf.h b/PWGDQ/Macros/fit_library/ExpPdf.h index 306b0aea210..7495176d942 100644 --- a/PWGDQ/Macros/fit_library/ExpPdf.h +++ b/PWGDQ/Macros/fit_library/ExpPdf.h @@ -25,7 +25,7 @@ class ExpPdf : public RooAbsPdf { public: - ExpPdf(){}; + ExpPdf() {} ExpPdf(const char* name, const char* title, RooAbsReal& _x, RooAbsReal& _A, diff --git a/PWGDQ/Macros/fit_library/GausPdf.h b/PWGDQ/Macros/fit_library/GausPdf.h index 80a1e956817..22e07a2d522 100644 --- a/PWGDQ/Macros/fit_library/GausPdf.h +++ b/PWGDQ/Macros/fit_library/GausPdf.h @@ -25,7 +25,7 @@ class GausPdf : public RooAbsPdf { public: - GausPdf(){}; + GausPdf() {} GausPdf(const char* name, const char* title, RooAbsReal& _x, RooAbsReal& _A, diff --git a/PWGDQ/Macros/fit_library/Pol4ExpPdf.h b/PWGDQ/Macros/fit_library/Pol4ExpPdf.h index 67202dbe5ac..baca326c1f2 100644 --- a/PWGDQ/Macros/fit_library/Pol4ExpPdf.h +++ b/PWGDQ/Macros/fit_library/Pol4ExpPdf.h @@ -28,7 +28,7 @@ TString nameParameters[] = {"p0", "p1", "p2", "p3", "p4", "p5", "N_bkg", "N_sig" class Pol4ExpPdf : public RooAbsPdf { public: - Pol4ExpPdf(){}; + Pol4ExpPdf() {} Pol4ExpPdf(const char* name, const char* title, RooAbsReal& _x, RooAbsReal& _P0, diff --git a/PWGDQ/Macros/fit_library/VWGPdf.h b/PWGDQ/Macros/fit_library/VWGPdf.h index 3ed4f2f81e6..af8c6cba9eb 100644 --- a/PWGDQ/Macros/fit_library/VWGPdf.h +++ b/PWGDQ/Macros/fit_library/VWGPdf.h @@ -25,7 +25,7 @@ class VWGPdf : public RooAbsPdf { public: - VWGPdf(){}; + VWGPdf() {} VWGPdf(const char* name, const char* title, RooAbsReal& _x, RooAbsReal& _A, diff --git a/PWGLF/Tasks/Resonances/lambdav2.cxx b/PWGLF/Tasks/Resonances/lambdav2.cxx index 59d6e11bd2c..cf1cdfb8ef3 100644 --- a/PWGLF/Tasks/Resonances/lambdav2.cxx +++ b/PWGLF/Tasks/Resonances/lambdav2.cxx @@ -209,8 +209,7 @@ struct lambdav2 { template bool SelectionPID(const T& candidate, int PID) { - if (PID == 0) // pion - { + if (PID == 0) { // pion auto combPIDPi = TMath::Sqrt(TMath::Abs(candidate.tofNSigmaPi() * candidate.tofNSigmaPi() + candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi())); if (!candidate.hasTOF() && candidate.tpcInnerParam() < 0.6 && TMath::Abs(candidate.tpcNSigmaPi()) < nsigmaCutTPCPi) { return true; @@ -218,8 +217,7 @@ struct lambdav2 { if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && combPIDPi < nsigmaCutTOFPi) { return true; } - } else if (PID == 1) // kaon - { + } else if (PID == 1) { // kaon auto combPIDKa = TMath::Sqrt(TMath::Abs(candidate.tofNSigmaKa() * candidate.tofNSigmaKa() + candidate.tpcNSigmaKa() * candidate.tpcNSigmaKa())); if (!candidate.hasTOF() && candidate.tpcInnerParam() < 0.45 && TMath::Abs(candidate.tpcNSigmaKa()) < nsigmaCutTPCKa) { return true; @@ -227,8 +225,7 @@ struct lambdav2 { if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && combPIDKa < nsigmaCutTOFKa) { return true; } - } else // proton - { + } else { // proton auto combPIDPr = TMath::Sqrt(TMath::Abs(candidate.tofNSigmaPr() * candidate.tofNSigmaPr() + candidate.tpcNSigmaPr() * candidate.tpcNSigmaPr())); if (!candidate.hasTOF() && candidate.tpcInnerParam() < 0.6 && TMath::Abs(candidate.tpcNSigmaPr()) < nsigmaCutTPCPr) { return true; diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index 81b6ec46eb1..48162411c03 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -1303,7 +1303,7 @@ struct PhiStrangeCorrelation { histos.fill(histoKey, collision.posZ(), mcCollision.centFT0M(), assoc.pt(), assoc.y()); } - }; + }; // NOLINT(readability/braces) fillRecoAssocSpecies(makeAssocInput(k0sReduced), HIST("k0s/h4K0SMCReco")); fillRecoAssocSpecies(makeAssocInput(lambdaReduced), HIST("lambda/h4LambdaMCReco")); @@ -1337,7 +1337,7 @@ struct PhiStrangeCorrelation { for (const auto& mcParticle : mcParticlesThisMcColl) { if (std::abs(mcParticle.y()) > yConfigs.cfgYAcceptance) { continue; - }; + } auto fillGenHistos = [&](auto h3Key, auto h4Key) { histos.fill(h3Key, mcCollision.centFT0M(), mcParticle.pt(), mcParticle.y()); @@ -1352,7 +1352,7 @@ struct PhiStrangeCorrelation { } fillGenHistos(h3Key, h4Key); - }; + }; // NOLINT(readability/braces) switch (std::abs(mcParticle.pdgCode())) { case o2::constants::physics::Pdg::kPhi: @@ -1404,13 +1404,13 @@ struct PhiStrangeCorrelation { for (const auto& mcParticle : mcParticles) { if (std::abs(mcParticle.y()) > yConfigs.cfgYAcceptance) { continue; - }; + } auto fillPartCollection = [&]() { if (activeCorrelationTypes->at(PartType) && isGenSpeciesValid(mcParticle, minPtMcGenConfigs.bypassPtCut.value)) { assocParticles[PartType].emplace_back(mcParticle.pt(), mcParticle.y(), mcParticle.phi()); } - }; + }; // NOLINT(readability/braces) switch (std::abs(mcParticle.pdgCode())) { case o2::constants::physics::Pdg::kPhi: diff --git a/Tutorials/src/associatedExample.cxx b/Tutorials/src/associatedExample.cxx index c8c87debff1..1aba1e01905 100644 --- a/Tutorials/src/associatedExample.cxx +++ b/Tutorials/src/associatedExample.cxx @@ -150,7 +150,7 @@ struct PartitionColExtra { struct BuildHmpidIndex { // build the index table HMPIDTracksIndex Builds idx; - void init(InitContext const&) {}; + void init(InitContext const&) {} }; struct ConsumeHmpidIndex { From fe7b1db2538325f01f8206a131d14e81ef97c2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Thu, 24 Sep 2026 10:57:15 +0200 Subject: [PATCH 07/11] Fix readability/inheritance --- .../Core/EventSelectionFilterAndAnalysis.h | 2 +- .../Core/PIDSelectionFilterAndAnalysis.h | 6 +- .../Core/SkimmingConfigurableCuts.h | 74 +++++++++---------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h index c1fe9d83495..cf859f9b73a 100644 --- a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h +++ b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h @@ -111,7 +111,7 @@ class EventSelectionFilterAndAnalysis : public SelectionFilterAndAnalysis template void StoreMultiplicities(CollisionToFilter const&, AssociatedTracks const&); int CalculateMaskLength() override; - virtual void StoreArmedMask() override; + void StoreArmedMask() override; std::vector*> mBFieldSelection; //! the magnetic field selection cuts MultiplicityBrick* mMultiplicityClasses; //! the multiplicity classes cuts diff --git a/PWGCF/TwoParticleCorrelations/Core/PIDSelectionFilterAndAnalysis.h b/PWGCF/TwoParticleCorrelations/Core/PIDSelectionFilterAndAnalysis.h index 9c6d4d5ead0..2ac86f7b068 100644 --- a/PWGCF/TwoParticleCorrelations/Core/PIDSelectionFilterAndAnalysis.h +++ b/PWGCF/TwoParticleCorrelations/Core/PIDSelectionFilterAndAnalysis.h @@ -98,7 +98,7 @@ class PIDSelectionFilterAndAnalysis : public SelectionFilterAndAnalysis PIDSelectionFilterAndAnalysis(); PIDSelectionFilterAndAnalysis(const TString&, selmodes); PIDSelectionFilterAndAnalysis(const PIDSelectionConfigurable& pidsel, selmodes mode); - virtual ~PIDSelectionFilterAndAnalysis() override; + ~PIDSelectionFilterAndAnalysis() override; void SetPTOF(float ptof) { mPTOF = ptof; } void SetRequireTOF(bool requiretof = false) { mRequireTOF = requiretof; } @@ -133,8 +133,8 @@ class PIDSelectionFilterAndAnalysis : public SelectionFilterAndAnalysis private: void ConstructCutFromString(const TString&); - virtual int CalculateMaskLength() override; - virtual void StoreArmedMask() override; + int CalculateMaskLength() override; + void StoreArmedMask() override; float mPTOF = 0.8f; ///< the p threshold for cheking TOF information bool mRequireTOF = false; ///< is TOF required diff --git a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h index 8c3ca4f2094..ee17864a5b2 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h +++ b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h @@ -46,7 +46,7 @@ class CutBrick : public TNamed CutBrick(); CutBrick(const char*, const char*); CutBrick(const CutBrick&) = delete; - virtual ~CutBrick() override = default; + ~CutBrick() override = default; CutBrick& operator=(const CutBrick&) = delete; public: @@ -111,13 +111,13 @@ class CutBrickLimit : public CutBrick CutBrickLimit(); CutBrickLimit(const char*, const TValueToFilter&); CutBrickLimit(const TString&); - virtual ~CutBrickLimit() override = default; + ~CutBrickLimit() override = default; CutBrickLimit(const CutBrickLimit&) = delete; CutBrickLimit& operator=(const CutBrickLimit&) = delete; - virtual std::vector IsArmed() override; - virtual std::vector Filter(const TValueToFilter&) override; - virtual int Length() override { return 1; } + std::vector IsArmed() override; + std::vector Filter(const TValueToFilter&) override; + int Length() override { return 1; } private: void ConstructCutFromString(const TString&); @@ -155,12 +155,12 @@ class CutBrickFnLimit : public CutBrickLimit CutBrickFnLimit(); CutBrickFnLimit(const char*, const TF1&); CutBrickFnLimit(const TString&); - virtual ~CutBrickFnLimit() override = default; + ~CutBrickFnLimit() override = default; CutBrickFnLimit(const CutBrickFnLimit&) = delete; CutBrickFnLimit& operator=(const CutBrickFnLimit&) = delete; /// sets the value of the limit according the passed variable value - virtual void setIndependentFnVar(float x) override + void setIndependentFnVar(float x) override { this->mLimit = TValueToFilter(mFunction.Eval(x)); } @@ -182,13 +182,13 @@ class CutBrickThreshold : public CutBrick CutBrickThreshold(); CutBrickThreshold(const char*, const TValueToFilter&); CutBrickThreshold(const TString&); - virtual ~CutBrickThreshold() override = default; + ~CutBrickThreshold() override = default; CutBrickThreshold(const CutBrickThreshold&) = delete; CutBrickThreshold& operator=(const CutBrickThreshold&) = delete; - virtual std::vector IsArmed() override; - virtual std::vector Filter(const TValueToFilter&) override; - virtual int Length() override { return 1; } + std::vector IsArmed() override; + std::vector Filter(const TValueToFilter&) override; + int Length() override { return 1; } private: void ConstructCutFromString(const TString&); @@ -226,12 +226,12 @@ class CutBrickFnThreshold : public CutBrickThreshold CutBrickFnThreshold(); CutBrickFnThreshold(const char*, const TF1&); CutBrickFnThreshold(const TString&); - virtual ~CutBrickFnThreshold() override = default; + ~CutBrickFnThreshold() override = default; CutBrickFnThreshold(const CutBrickFnThreshold&) = delete; CutBrickFnThreshold& operator=(const CutBrickFnThreshold&) = delete; /// sets the value of the threshold according the passed variable value - virtual void setIndependentFnVar(float x) override + void setIndependentFnVar(float x) override { this->mThreshold = TValueToFilter(mFunction.Eval(x)); } @@ -253,13 +253,13 @@ class CutBrickRange : public CutBrick CutBrickRange(); CutBrickRange(const char*, const TValueToFilter&, const TValueToFilter&); CutBrickRange(const TString&); - virtual ~CutBrickRange() override = default; + ~CutBrickRange() override = default; CutBrickRange(const CutBrickRange&) = delete; CutBrickRange& operator=(const CutBrickRange&) = delete; - virtual std::vector IsArmed() override; - virtual std::vector Filter(const TValueToFilter&) override; - virtual int Length() override { return 1; } + std::vector IsArmed() override; + std::vector Filter(const TValueToFilter&) override; + int Length() override { return 1; } private: void ConstructCutFromString(const TString&); @@ -298,12 +298,12 @@ class CutBrickFnRange : public CutBrickRange CutBrickFnRange(); CutBrickFnRange(const char*, const TF1&, const TF1&); CutBrickFnRange(const TString&); - virtual ~CutBrickFnRange() override = default; + ~CutBrickFnRange() override = default; CutBrickFnRange(const CutBrickFnRange&) = delete; CutBrickFnRange& operator=(const CutBrickFnRange&) = delete; /// sets the value of the limits according the passed variable value - virtual void setIndependentFnVar(float x) override + void setIndependentFnVar(float x) override { this->mLow = TValueToFilter(mLowFunction.Eval(x)); this->mUp = TValueToFilter(mUpFunction.Eval(x)); @@ -327,13 +327,13 @@ class CutBrickExtToRange : public CutBrick CutBrickExtToRange(); CutBrickExtToRange(const char*, const TValueToFilter&, const TValueToFilter&); CutBrickExtToRange(const TString&); - virtual ~CutBrickExtToRange() override = default; + ~CutBrickExtToRange() override = default; CutBrickExtToRange(const CutBrickExtToRange&) = delete; CutBrickExtToRange& operator=(const CutBrickExtToRange&) = delete; - virtual std::vector IsArmed() override; - virtual std::vector Filter(const TValueToFilter&) override; - virtual int Length() override { return 1; } + std::vector IsArmed() override; + std::vector Filter(const TValueToFilter&) override; + int Length() override { return 1; } private: void ConstructCutFromString(const TString&); @@ -372,12 +372,12 @@ class CutBrickFnExtToRange : public CutBrickExtToRange CutBrickFnExtToRange(); CutBrickFnExtToRange(const char*, const TF1&, const TF1&); CutBrickFnExtToRange(const TString&); - virtual ~CutBrickFnExtToRange() override = default; + ~CutBrickFnExtToRange() override = default; CutBrickFnExtToRange(const CutBrickFnExtToRange&) = delete; CutBrickFnExtToRange& operator=(const CutBrickFnExtToRange&) = delete; /// sets the value of the limits according the passed variable value - virtual void setIndependentFnVar(float x) override + void setIndependentFnVar(float x) override { this->mLow = TValueToFilter(mLowFunction.Eval(x)); this->mUp = TValueToFilter(mUpFunction.Eval(x)); @@ -403,16 +403,16 @@ class CutBrickSelectorMultipleRanges : public CutBrick CutBrickSelectorMultipleRanges(); CutBrickSelectorMultipleRanges(const char*, const std::vector&); CutBrickSelectorMultipleRanges(const TString&); - virtual ~CutBrickSelectorMultipleRanges() override = default; + ~CutBrickSelectorMultipleRanges() override = default; CutBrickSelectorMultipleRanges(const CutBrickSelectorMultipleRanges&) = delete; CutBrickSelectorMultipleRanges& operator=(const CutBrickSelectorMultipleRanges&) = delete; - virtual std::vector IsArmed() override; - virtual std::vector Filter(const TValueToFilter&) override; + std::vector IsArmed() override; + std::vector Filter(const TValueToFilter&) override; /// Return the length needed to code the brick status /// The length is in brick units. The actual length is implementation dependent /// \returns Brick length in units of bricks - virtual int Length() override { return mActive.size(); } + int Length() override { return mActive.size(); } private: void ConstructCutFromString(const TString&); @@ -433,7 +433,7 @@ class CutWithVariations : public CutBrick CutWithVariations(); CutWithVariations(const char*, const char*, bool); CutWithVariations(const TString&); - virtual ~CutWithVariations() override = default; + ~CutWithVariations() override = default; CutWithVariations(const CutWithVariations&) = delete; CutWithVariations& operator=(const CutWithVariations&) = delete; @@ -441,10 +441,10 @@ class CutWithVariations : public CutBrick bool AddVariationBrick(CutBrick* brick); TList& getDefaultBricks() { return mDefaultBricks; } TList& getVariantBricks() { return mVariationBricks; } - virtual std::vector IsArmed() override; - virtual std::vector Filter(const TValueToFilter&) override; - virtual int Length() override; - virtual int getArmedIndex() override; + std::vector IsArmed() override; + std::vector Filter(const TValueToFilter&) override; + int Length() override; + int getArmedIndex() override; private: void ConstructCutFromString(const TString&); @@ -467,7 +467,7 @@ class SpecialCutBrick : public TNamed SpecialCutBrick(); SpecialCutBrick(const char*, const char*); SpecialCutBrick(const SpecialCutBrick&) = delete; - virtual ~SpecialCutBrick() override = default; + ~SpecialCutBrick() override = default; SpecialCutBrick& operator=(const SpecialCutBrick&) = delete; public: @@ -511,7 +511,7 @@ class TrackSelectionBrick : public SpecialCutBrick public: TrackSelectionBrick() = default; TrackSelectionBrick(const TString&); - virtual ~TrackSelectionBrick() override = default; + ~TrackSelectionBrick() override = default; enum class TrackCuts : int { kTrackType = 0, @@ -532,7 +532,7 @@ class TrackSelectionBrick : public SpecialCutBrick static const std::string mCutNames[static_cast(TrackCuts::kNCuts)]; - virtual std::vector IsArmed() override; + std::vector IsArmed() override; template bool Filter(TrackToFilter const& track) { From 1c88f9bb940d659dc1bdc98b4e89611e93417bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:56:49 +0200 Subject: [PATCH 08/11] Fix runtime/arrays --- .../macros/upload_event_selection_params.C | 12 ++++---- Common/Tools/Multiplicity/MultModule.h | 2 +- Common/Tools/Multiplicity/multCalibrator.cxx | 7 +++-- PWGEM/Dilepton/Tasks/emEfficiencyEE.cxx | 13 ++------ PWGHF/HFC/Macros/FitCorrel.C | 30 ++++++++----------- .../Strangeness/strangenessbuilder.cxx | 2 +- PWGLF/Utils/mcCentralityModule.h | 2 +- 7 files changed, 28 insertions(+), 40 deletions(-) diff --git a/Common/CCDB/macros/upload_event_selection_params.C b/Common/CCDB/macros/upload_event_selection_params.C index c6385c4d09d..f84710421a7 100644 --- a/Common/CCDB/macros/upload_event_selection_params.C +++ b/Common/CCDB/macros/upload_event_selection_params.C @@ -33,12 +33,12 @@ void upload_event_selection_params() // ccdb.truncate("EventSelection/EventSelectionParams"); ccdb.init("https://alice-ccdb.cern.ch"); - const int nPeriodsMax = 100; - EventSelectionParams* par[nPeriodsMax]; - string period[nPeriodsMax]; - int runFirst[nPeriodsMax]; - int runLast[nPeriodsMax]; - bool isNew[nPeriodsMax] = {0}; + constexpr int NPeriodsMax{100}; + std::array par{}; + std::array period{}; + std::array runFirst{}; + std::array runLast{}; + std::array isNew{}; int n = 0; period[n] = "pp2010"; diff --git a/Common/Tools/Multiplicity/MultModule.h b/Common/Tools/Multiplicity/MultModule.h index 3c9151ca78c..0bc9d07387f 100644 --- a/Common/Tools/Multiplicity/MultModule.h +++ b/Common/Tools/Multiplicity/MultModule.h @@ -480,7 +480,7 @@ class MultModule LOGF(info, "Metadata information: isMC? %i", metadataInfo.isMC()); const auto& workflows = context.services().template get(); - TString listOfRequestors[nTablesConst]; + std::array listOfRequestors{}; for (int i = 0; i < nTablesConst; i++) { int f = internalOpts.enabledTables->get(tableNames[i].c_str(), "enable"); if (f == 1) { diff --git a/Common/Tools/Multiplicity/multCalibrator.cxx b/Common/Tools/Multiplicity/multCalibrator.cxx index d65f615d584..964bb468b72 100644 --- a/Common/Tools/Multiplicity/multCalibrator.cxx +++ b/Common/Tools/Multiplicity/multCalibrator.cxx @@ -30,6 +30,7 @@ #include #include // FIXME +#include using namespace std; @@ -353,8 +354,8 @@ TH1F* multCalibrator::GetCalibrationHistogram(TH1* histoRaw, const TString& lHis // place squarely at the middle to ensure it's all fine lMiddleOfBins[lB - 1] = 0.5 * (lDesiredBoundaries[lB] + lDesiredBoundaries[lB - 1]); } - Double_t lBounds[lNDesiredBoundaries + 1]; - Double_t lPrecision[lNDesiredBoundaries + 1]; + std::vector lBounds(lNDesiredBoundaries + 1); + std::vector lPrecision(lNDesiredBoundaries + 1); if (fAnchorPointValue > 0) { lBounds[0] = 0; @@ -382,7 +383,7 @@ TH1F* multCalibrator::GetCalibrationHistogram(TH1* histoRaw, const TString& lHis cout << histoRaw->GetName() << " boundaries, percentile: " << lDesiredBoundaries[ii] << "%\t Signal value = " << lBounds[lDisplacedii] << "\tprecision = " << lPrecision[ii] << "% " << lPrecisionString.Data() << endl; } } - TH1F* hCalib = new TH1F(lHistoName.Data(), "", fAnchorPointValue < 0 ? lNDesiredBoundaries - 1 : lNDesiredBoundaries, lBounds); + TH1F* hCalib = new TH1F(lHistoName.Data(), "", fAnchorPointValue < 0 ? lNDesiredBoundaries - 1 : lNDesiredBoundaries, lBounds.data()); hCalib->SetDirectory(0); hCalib->SetBinContent(0, 100.5); hCalib->SetBinContent(1, 100.5); diff --git a/PWGEM/Dilepton/Tasks/emEfficiencyEE.cxx b/PWGEM/Dilepton/Tasks/emEfficiencyEE.cxx index 9cf9385ac71..a739ff9ca50 100644 --- a/PWGEM/Dilepton/Tasks/emEfficiencyEE.cxx +++ b/PWGEM/Dilepton/Tasks/emEfficiencyEE.cxx @@ -1043,8 +1043,7 @@ struct AnalysisTrackSelection { template void runRecTrackMore(TEvents const& events, TEventsMC const& /*eventsMC*/, TTracks const& groupedTracks, TTracksMC const& tracksMC, TAmbigTracks const& ambiTracksMid) { - - std::map fRecTrackLabels[fTrackCuts.size() + 1]; + std::vector> fRecTrackLabels(fTrackCuts.size() + 1); uint32_t filterMap = 0; trackSel.reserve(groupedTracks.size()); @@ -1052,10 +1051,7 @@ struct AnalysisTrackSelection { for (auto& track : groupedTracks) { // How many time the associated MC track was seen for this cut - Int_t fRecCounters[fTrackCuts.size() + 1]; - for (unsigned int k = 0; k < fTrackCuts.size() + 1; k++) { - fRecCounters[k] = 0; - } + std::vector fRecCounters(fTrackCuts.size() + 1, 0); filterMap = 0; Int_t ambiguousinfo = 0; @@ -1157,10 +1153,7 @@ struct AnalysisTrackSelection { uint32_t mcDecision = 0; int isig = 0; Int_t mctrackindex = -999; - Int_t doublereconstructedtrack[fTrackCuts.size() + 1]; - for (unsigned int k = 0; k < fTrackCuts.size() + 1; k++) { - doublereconstructedtrack[k] = 0; - } + std::vector doublereconstructedtrack(fTrackCuts.size() + 1, 0); for (auto sig = fMCSignals.begin(); sig != fMCSignals.end(); sig++, isig++) { if constexpr ((TTrackFillMap & VarManager::ObjTypes::Track) > 0) { if (track.has_mcParticle()) { diff --git a/PWGHF/HFC/Macros/FitCorrel.C b/PWGHF/HFC/Macros/FitCorrel.C index a90d502e58f..5d29d451eaf 100644 --- a/PWGHF/HFC/Macros/FitCorrel.C +++ b/PWGHF/HFC/Macros/FitCorrel.C @@ -110,10 +110,7 @@ void fitCorrelDs(const TString& cfgFileName = "config_CorrAnalysis.json") const int nBinsPtCand = binsPtCandIntervalsVec.size() - 1; const int nBinsPtHad = binsPtHadIntervals.size() - 1; - double binsPtCandIntervals[nBinsPtCand + 1]; - for (int i = 0; i < nBinsPtCand + 1; i++) { - binsPtCandIntervals[i] = binsPtCandIntervalsVec[i]; - } + std::vector binsPtCandIntervals{binsPtCandIntervalsVec}; const Value& fitFuncValue = config["FitFunction"]; readArray(fitFuncValue, fitFunc); @@ -122,17 +119,14 @@ void fitCorrelDs(const TString& cfgFileName = "config_CorrAnalysis.json") int const fixMean = config["FixMean"].GetInt(); int const nBaselinePoints = config["nBaselinePoints"].GetInt(); - vector pointsForBaselineVec; + std::vector pointsForBaselineVec; const Value& pointsForBaselineValue = config["binsForBaseline"]; readArray(pointsForBaselineValue, pointsForBaselineVec); if (pointsForBaselineVec.size() != nBaselinePoints) { cout << "ERROR: size of the vector pointsForBaseline is different from the number of nBaselinePoints" << endl; return; } - int pointsForBaseline[nBaselinePoints]; - for (int i = 0; i < nBaselinePoints; i++) { - pointsForBaseline[i] = pointsForBaselineVec[i]; - } + std::vector pointsForBaseline{pointsForBaselineVec}; std::cout << "=========================== " << std::endl; std::cout << "Input variables from config" << std::endl; @@ -202,7 +196,7 @@ void fitCorrelDs(const TString& cfgFileName = "config_CorrAnalysis.json") corrFitter[iBinPtHad][iBinPtCand]->setHistoIsReflected(refl); corrFitter[iBinPtHad][iBinPtCand]->setFixBaseline(fixBase); corrFitter[iBinPtHad][iBinPtCand]->setBaselineUpOrDown(shiftBaseUp, shiftBaseDown); - corrFitter[iBinPtHad][iBinPtCand]->setPointsForBaseline(nBaselinePoints, pointsForBaseline); + corrFitter[iBinPtHad][iBinPtCand]->setPointsForBaseline(nBaselinePoints, pointsForBaseline.data()); corrFitter[iBinPtHad][iBinPtCand]->setv2(v2AssocPart[iBinPtCand], v2Dmeson[iBinPtCand]); corrFitter[iBinPtHad][iBinPtCand]->setReflectedCorrHisto(isReflected); @@ -222,14 +216,14 @@ void fitCorrelDs(const TString& cfgFileName = "config_CorrAnalysis.json") canvasCorrPhi[iBinPtHad]->Divide(3, 2); } // histograms with fir parameters - hBaselin[iBinPtHad] = new TH1D(Form("hBaselin_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hNSYield[iBinPtHad] = new TH1D(Form("hNSYield_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hNSSigma[iBinPtHad] = new TH1D(Form("hNSSigma_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hASYield[iBinPtHad] = new TH1D(Form("hASYield_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hASSigma[iBinPtHad] = new TH1D(Form("hASSigma_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hBeta[iBinPtHad] = new TH1D(Form("hBeta_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hNSYieldBinCount[iBinPtHad] = new TH1D(Form("hNSYieldBinCount_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); - hASYieldBinCount[iBinPtHad] = new TH1D(Form("hASYieldBinCount_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals); + hBaselin[iBinPtHad] = new TH1D(Form("hBaselin_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hNSYield[iBinPtHad] = new TH1D(Form("hNSYield_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hNSSigma[iBinPtHad] = new TH1D(Form("hNSSigma_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hASYield[iBinPtHad] = new TH1D(Form("hASYield_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hASSigma[iBinPtHad] = new TH1D(Form("hASSigma_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hBeta[iBinPtHad] = new TH1D(Form("hBeta_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hNSYieldBinCount[iBinPtHad] = new TH1D(Form("hNSYieldBinCount_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); + hASYieldBinCount[iBinPtHad] = new TH1D(Form("hASYieldBinCount_PtBinAssoc%d", iBinPtHad + 1), "", nBinsPtCand, binsPtCandIntervals.data()); for (int iBinPtCand = 0; iBinPtCand < nBinsPtCand; iBinPtCand++) { setTH1HistoStyle(hCorrPhi[iBinPtCand][iBinPtHad], "", "#Delta#phi [rad]", "#frac{1}{N_{D_{s}}}#frac{dN^{assoc}}{d#Delta#phi} [rad^{-1}]", kFullCircle, kRed + 1, 1.4, kRed + 1, 3); diff --git a/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx b/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx index 14f37772f44..6d390aed7b5 100644 --- a/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx @@ -687,7 +687,7 @@ struct StrangenessBuilder { LOGF(info, "Configuring tables to generate"); auto& workflows = context.services().get(); - TString listOfRequestors[nTables]; + std::array listOfRequestors{}; for (int i = 0; i < nTables; i++) { // adjust bookkeeping histogram h->GetXaxis()->SetBinLabel(i + 1, tableNames[i].c_str()); diff --git a/PWGLF/Utils/mcCentralityModule.h b/PWGLF/Utils/mcCentralityModule.h index 0a7871609aa..31cf13d9d51 100644 --- a/PWGLF/Utils/mcCentralityModule.h +++ b/PWGLF/Utils/mcCentralityModule.h @@ -257,7 +257,7 @@ struct BuilderModule { nEnabledTables = 0; - TString listOfRequestors[nTablesConst]; + std::array listOfRequestors{}; for (int i = 0; i < nTablesConst; i++) { int f = baseOpts.enabledTables->get(tableNames[i].c_str(), "enable"); if (f == 1) { From 56b93f88474c800d55c2125be5e422d16d7b55da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Thu, 24 Sep 2026 17:49:27 +0200 Subject: [PATCH 09/11] Fix runtime/explicit --- ALICE3/Tasks/alice3DqEfficiency.cxx | 2 +- .../Core/EventSelectionFilterAndAnalysis.h | 9 ++++---- .../Core/SkimmingConfigurableCuts.h | 22 +++++++++---------- PWGDQ/Core/AnalysisCompositeCut.h | 2 +- PWGDQ/Tasks/dqEfficiency.cxx | 2 +- PWGDQ/Tasks/tableReader.cxx | 2 +- PWGDQ/Tasks/tableReader_withAssoc.h | 2 +- PWGDQ/Tasks/tableReader_withAssoc_direct.cxx | 4 ++-- PWGLF/TableProducer/Common/lfTPCPID.cxx | 2 +- 9 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ALICE3/Tasks/alice3DqEfficiency.cxx b/ALICE3/Tasks/alice3DqEfficiency.cxx index 59757563955..29361efe44e 100644 --- a/ALICE3/Tasks/alice3DqEfficiency.cxx +++ b/ALICE3/Tasks/alice3DqEfficiency.cxx @@ -775,7 +775,7 @@ struct Alice3DqEfficiencyAnalysisSameEventPairing { std::vector fGenMCSignals; std::vector fPairCuts; - AnalysisCompositeCut fMCGenAccCut; + AnalysisCompositeCut fMCGenAccCut{}; bool fUseMCGenAccCut = false; uint32_t fTrackFilterMask = 0; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream diff --git a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h index cf859f9b73a..654effeb379 100644 --- a/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h +++ b/PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h @@ -84,6 +84,7 @@ class EventSelectionFilterAndAnalysis : public SelectionFilterAndAnalysis private: struct ComplexBrickHelper { + virtual ~ComplexBrickHelper() = default; CutBrick* mBrick = nullptr; int mDefaultEstimatorIndex = -1; std::vector mAlternateEstimatorIndex = std::vector{}; @@ -95,15 +96,15 @@ class EventSelectionFilterAndAnalysis : public SelectionFilterAndAnalysis void armedBrick(uint64_t&, uint64_t&, uint64_t&, int&); }; struct MultiplicityBrick : public ComplexBrickHelper { - virtual void initialize(); + void initialize() override; std::vector GetMultiplicities(); int GetArmedIndex() { return mBrick->getArmedIndex(); } - virtual bool Filter(uint64_t& mask, int& bit, CutBrick* brick, int index); + bool Filter(uint64_t& mask, int& bit, CutBrick* brick, int index) override; }; struct PileUpRejBrick : public ComplexBrickHelper { - virtual void initialize(); + void initialize() override; std::vector mIndepVar = std::vector{}; - virtual bool Filter(uint64_t& mask, int& bit, CutBrick* brick, int index); + bool Filter(uint64_t& mask, int& bit, CutBrick* brick, int index) override; }; static bool filterBrickValue(uint64_t& mask, int& bit, CutBrick* brick, float value); diff --git a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h index ee17864a5b2..32b1df5a3d3 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h +++ b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h @@ -110,7 +110,7 @@ class CutBrickLimit : public CutBrick public: CutBrickLimit(); CutBrickLimit(const char*, const TValueToFilter&); - CutBrickLimit(const TString&); + explicit CutBrickLimit(const TString&); ~CutBrickLimit() override = default; CutBrickLimit(const CutBrickLimit&) = delete; CutBrickLimit& operator=(const CutBrickLimit&) = delete; @@ -154,7 +154,7 @@ class CutBrickFnLimit : public CutBrickLimit public: CutBrickFnLimit(); CutBrickFnLimit(const char*, const TF1&); - CutBrickFnLimit(const TString&); + explicit CutBrickFnLimit(const TString&); ~CutBrickFnLimit() override = default; CutBrickFnLimit(const CutBrickFnLimit&) = delete; CutBrickFnLimit& operator=(const CutBrickFnLimit&) = delete; @@ -181,7 +181,7 @@ class CutBrickThreshold : public CutBrick public: CutBrickThreshold(); CutBrickThreshold(const char*, const TValueToFilter&); - CutBrickThreshold(const TString&); + explicit CutBrickThreshold(const TString&); ~CutBrickThreshold() override = default; CutBrickThreshold(const CutBrickThreshold&) = delete; CutBrickThreshold& operator=(const CutBrickThreshold&) = delete; @@ -225,7 +225,7 @@ class CutBrickFnThreshold : public CutBrickThreshold public: CutBrickFnThreshold(); CutBrickFnThreshold(const char*, const TF1&); - CutBrickFnThreshold(const TString&); + explicit CutBrickFnThreshold(const TString&); ~CutBrickFnThreshold() override = default; CutBrickFnThreshold(const CutBrickFnThreshold&) = delete; CutBrickFnThreshold& operator=(const CutBrickFnThreshold&) = delete; @@ -252,7 +252,7 @@ class CutBrickRange : public CutBrick public: CutBrickRange(); CutBrickRange(const char*, const TValueToFilter&, const TValueToFilter&); - CutBrickRange(const TString&); + explicit CutBrickRange(const TString&); ~CutBrickRange() override = default; CutBrickRange(const CutBrickRange&) = delete; CutBrickRange& operator=(const CutBrickRange&) = delete; @@ -297,7 +297,7 @@ class CutBrickFnRange : public CutBrickRange public: CutBrickFnRange(); CutBrickFnRange(const char*, const TF1&, const TF1&); - CutBrickFnRange(const TString&); + explicit CutBrickFnRange(const TString&); ~CutBrickFnRange() override = default; CutBrickFnRange(const CutBrickFnRange&) = delete; CutBrickFnRange& operator=(const CutBrickFnRange&) = delete; @@ -326,7 +326,7 @@ class CutBrickExtToRange : public CutBrick public: CutBrickExtToRange(); CutBrickExtToRange(const char*, const TValueToFilter&, const TValueToFilter&); - CutBrickExtToRange(const TString&); + explicit CutBrickExtToRange(const TString&); ~CutBrickExtToRange() override = default; CutBrickExtToRange(const CutBrickExtToRange&) = delete; CutBrickExtToRange& operator=(const CutBrickExtToRange&) = delete; @@ -371,7 +371,7 @@ class CutBrickFnExtToRange : public CutBrickExtToRange public: CutBrickFnExtToRange(); CutBrickFnExtToRange(const char*, const TF1&, const TF1&); - CutBrickFnExtToRange(const TString&); + explicit CutBrickFnExtToRange(const TString&); ~CutBrickFnExtToRange() override = default; CutBrickFnExtToRange(const CutBrickFnExtToRange&) = delete; CutBrickFnExtToRange& operator=(const CutBrickFnExtToRange&) = delete; @@ -402,7 +402,7 @@ class CutBrickSelectorMultipleRanges : public CutBrick public: CutBrickSelectorMultipleRanges(); CutBrickSelectorMultipleRanges(const char*, const std::vector&); - CutBrickSelectorMultipleRanges(const TString&); + explicit CutBrickSelectorMultipleRanges(const TString&); ~CutBrickSelectorMultipleRanges() override = default; CutBrickSelectorMultipleRanges(const CutBrickSelectorMultipleRanges&) = delete; CutBrickSelectorMultipleRanges& operator=(const CutBrickSelectorMultipleRanges&) = delete; @@ -432,7 +432,7 @@ class CutWithVariations : public CutBrick /// Default constructor CutWithVariations(); CutWithVariations(const char*, const char*, bool); - CutWithVariations(const TString&); + explicit CutWithVariations(const TString&); ~CutWithVariations() override = default; CutWithVariations(const CutWithVariations&) = delete; CutWithVariations& operator=(const CutWithVariations&) = delete; @@ -510,7 +510,7 @@ class TrackSelectionBrick : public SpecialCutBrick { public: TrackSelectionBrick() = default; - TrackSelectionBrick(const TString&); + explicit TrackSelectionBrick(const TString&); ~TrackSelectionBrick() override = default; enum class TrackCuts : int { diff --git a/PWGDQ/Core/AnalysisCompositeCut.h b/PWGDQ/Core/AnalysisCompositeCut.h index 7e78faebfd6..a9482c3cb91 100644 --- a/PWGDQ/Core/AnalysisCompositeCut.h +++ b/PWGDQ/Core/AnalysisCompositeCut.h @@ -27,7 +27,7 @@ class AnalysisCompositeCut : public AnalysisCut { public: - AnalysisCompositeCut(bool useAND = kTRUE); + explicit AnalysisCompositeCut(bool useAND = kTRUE); AnalysisCompositeCut(const char* name, const char* title, bool useAND = kTRUE); AnalysisCompositeCut(const AnalysisCompositeCut& c); AnalysisCompositeCut& operator=(const AnalysisCompositeCut& c); diff --git a/PWGDQ/Tasks/dqEfficiency.cxx b/PWGDQ/Tasks/dqEfficiency.cxx index afcb0388c08..dca19a23c13 100644 --- a/PWGDQ/Tasks/dqEfficiency.cxx +++ b/PWGDQ/Tasks/dqEfficiency.cxx @@ -1369,7 +1369,7 @@ struct AnalysisDileptonTrackTrack { float* fValuesQuadruplet = nullptr; std::vector fQuadrupletCutNames; - AnalysisCompositeCut fDileptonCut; + AnalysisCompositeCut fDileptonCut{}; std::vector fQuadrupletCuts; TString fTrackCutName1; TString fTrackCutName2; diff --git a/PWGDQ/Tasks/tableReader.cxx b/PWGDQ/Tasks/tableReader.cxx index e9deca68d91..4d385593a01 100644 --- a/PWGDQ/Tasks/tableReader.cxx +++ b/PWGDQ/Tasks/tableReader.cxx @@ -2117,7 +2117,7 @@ struct AnalysisDileptonTrackTrack { TString fTrackCutName1; TString fTrackCutName2; bool fIsSameTrackCut = false; - AnalysisCompositeCut fDileptonCut; + AnalysisCompositeCut fDileptonCut{}; std::vector fQuadrupletCutNames; std::vector fQuadrupletCuts; diff --git a/PWGDQ/Tasks/tableReader_withAssoc.h b/PWGDQ/Tasks/tableReader_withAssoc.h index e7952a1fdad..88bdbc0fd67 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.h +++ b/PWGDQ/Tasks/tableReader_withAssoc.h @@ -4751,7 +4751,7 @@ struct AnalysisDileptonTrackTrack { TString fTrackCutName1; TString fTrackCutName2; bool fIsSameTrackCut = false; - AnalysisCompositeCut fDileptonCut; + AnalysisCompositeCut fDileptonCut{}; std::vector fQuadrupletCutNames; std::vector fQuadrupletCuts; diff --git a/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx b/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx index 7bbff3763c9..78fd2b46359 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx +++ b/PWGDQ/Tasks/tableReader_withAssoc_direct.cxx @@ -1362,7 +1362,7 @@ struct AnalysisSameEventPairing { std::map> fTrackMuonHistNames; // for electron-muon pairs: key = iTrack * fNCutsMuon + iMuon std::vector fPairCuts; - AnalysisCompositeCut fMCGenAccCut; + AnalysisCompositeCut fMCGenAccCut{}; // bool fUseMCGenAccCut = false; uint32_t fTrackFilterMask = 0; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream @@ -1861,7 +1861,7 @@ struct AnalysisSameEventPairing { for (unsigned int iPairCut = 0; iPairCut < fPairCuts.size(); iPairCut++) { AnalysisCompositeCut cut = fPairCuts.at(iPairCut); if (!cut.IsSelected(static_cast(VarManager::fgValues))) { - continue; // apply pair cuts + continue; // apply pair cuts } if (sign1 * sign2 < 0) { // opposite sign pairs fHistMan->FillHistClass(histNames[ncuts + icut * fPairCuts.size() + iPairCut][0].Data(), static_cast(VarManager::fgValues)); diff --git a/PWGLF/TableProducer/Common/lfTPCPID.cxx b/PWGLF/TableProducer/Common/lfTPCPID.cxx index 90c124bbbe8..6c1e6252185 100644 --- a/PWGLF/TableProducer/Common/lfTPCPID.cxx +++ b/PWGLF/TableProducer/Common/lfTPCPID.cxx @@ -89,7 +89,7 @@ const std::string defaultOptions[nSpecies][nOptions]{{"", "", "false", "false"}, // Structure to hold the parameters struct bbParams { const std::string name; - bbParams(const std::string& n) : name(n) {} + explicit bbParams(const std::string& n) : name(n) {} // Parameters for the Bethe-Bloch parametrization float bb1 = 0.03209809958934784f; // Aleph Bethe Bloch parameter 1 float bb2 = 19.9768009185791f; // Aleph Bethe Bloch parameter 2 From 6a4299d49145d4e69e488998a058e8a76ba976a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Fri, 25 Sep 2026 16:47:15 +0200 Subject: [PATCH 10/11] Fix runtime/int --- Common/Core/PID/TPCPIDResponse.h | 12 ++++++------ Common/Tasks/flowTest.cxx | 2 +- Common/Tasks/multiplicityQa.cxx | 4 ++-- DPG/Tasks/AOTTrack/qaEventTrackLite.h | 2 +- DPG/Tasks/TOF/tofSkimsTableCreator.h | 2 +- PWGCF/Core/CorrelationContainer.cxx | 2 +- .../femtoWorldProducerReducedTask.cxx | 2 +- .../TableProducer/femtoWorldProducerTaskV0Only.cxx | 2 +- PWGEM/Dilepton/DataModel/dileptonTables.h | 6 +++--- PWGEM/Dilepton/DataModel/lmeeMLTables.h | 2 +- PWGJE/Tasks/triggerCorrelations.cxx | 7 ++++--- .../TableProducer/Common/zdc2stagecalibration.cxx | 8 ++++---- PWGLF/TableProducer/Common/zdcvector.cxx | 2 +- PWGLF/TableProducer/Resonances/doublephitable.cxx | 2 +- .../Resonances/xi1530kaonreducedtable.cxx | 3 +-- PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx | 4 ++-- PWGLF/Tasks/QC/straRecoStudy.cxx | 2 +- PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx | 14 +++++++------- Tutorials/OpenData/flowAnalysis.cxx | 4 ++-- Tutorials/src/ccdbaccess.cxx | 2 +- Tutorials/src/efficiencyGlobal.cxx | 2 +- Tutorials/src/efficiencyPerRun.cxx | 3 ++- 22 files changed, 45 insertions(+), 44 deletions(-) diff --git a/Common/Core/PID/TPCPIDResponse.h b/Common/Core/PID/TPCPIDResponse.h index 5120950fa5f..4f5f4406145 100644 --- a/Common/Core/PID/TPCPIDResponse.h +++ b/Common/Core/PID/TPCPIDResponse.h @@ -77,7 +77,7 @@ class Response float GetExpectedSigma(const CollisionType& collision, const TrackType& trk, const o2::track::PID::ID id) const; /// Gets the expected resolution of the track with multTPC explicitly provided template - float GetExpectedSigmaAtMultiplicity(const long multTPC, const TrackType& trk, const o2::track::PID::ID id) const; + float GetExpectedSigmaAtMultiplicity(const int64_t multTPC, const TrackType& trk, const o2::track::PID::ID id) const; /// Gets the number of sigmas with respect the expected value template float GetNumberOfSigma(const CollisionType& collision, const TrackType& trk, const o2::track::PID::ID id) const; @@ -86,7 +86,7 @@ class Response float GetNumberOfSigmaMCTuned(const CollisionType& collision, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const; // Number of sigmas with respect to expected for MC, defining a tune-on-data signal value, explicit multTPC template - float GetNumberOfSigmaMCTunedAtMultiplicity(const long multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const; + float GetNumberOfSigmaMCTunedAtMultiplicity(const int64_t multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const; /// Gets the deviation to the expected signal template float GetSignalDelta(const TrackType& trk, const o2::track::PID::ID id) const; @@ -99,7 +99,7 @@ class Response private: /// Compute expected sigma given a pre-computed expected signal, avoiding a redundant Bethe-Bloch call. template - float sigmaFromSignal(float expectedSignal, const long multTPC, const TrackType& track, const o2::track::PID::ID id) const; + float sigmaFromSignal(float expectedSignal, const int64_t multTPC, const TrackType& track, const o2::track::PID::ID id) const; std::array mBetheBlochParams = {0.03209809958934784, 19.9768009185791, 2.5266601063857674e-16, 2.7212300300598145, 6.080920219421387}; std::array mResolutionParamsDefault = {0.07, 0.0}; @@ -135,7 +135,7 @@ inline float Response::GetExpectedSigma(const CollisionType& collision, const Tr /// Gets the expected resolution of the measurement template -inline float Response::GetExpectedSigmaAtMultiplicity(const long multTPC, const TrackType& track, const o2::track::PID::ID id) const +inline float Response::GetExpectedSigmaAtMultiplicity(const int64_t multTPC, const TrackType& track, const o2::track::PID::ID id) const { if (!track.hasTPC()) { return -999.f; @@ -144,7 +144,7 @@ inline float Response::GetExpectedSigmaAtMultiplicity(const long multTPC, const } template -inline float Response::sigmaFromSignal(float expectedSignal, const long multTPC, const TrackType& track, const o2::track::PID::ID id) const +inline float Response::sigmaFromSignal(float expectedSignal, const int64_t multTPC, const TrackType& track, const o2::track::PID::ID id) const { float resolution = 0.f; if (mUseDefaultResolutionParam) { @@ -188,7 +188,7 @@ inline float Response::GetNumberOfSigmaMCTuned(const CollisionType& collision, c } template -inline float Response::GetNumberOfSigmaMCTunedAtMultiplicity(const long multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const +inline float Response::GetNumberOfSigmaMCTunedAtMultiplicity(const int64_t multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const { const float signal = GetExpectedSignal(trk, id); if (signal < 0.f) { diff --git a/Common/Tasks/flowTest.cxx b/Common/Tasks/flowTest.cxx index bfb42acff04..117813bf73c 100644 --- a/Common/Tasks/flowTest.cxx +++ b/Common/Tasks/flowTest.cxx @@ -100,7 +100,7 @@ struct flowTest { if (evPhi < 0) evPhi += 2. * TMath::Pi(); - long nCh = 0; + int64_t nCh = 0; if (imp > minB && imp < maxB) { // event within range diff --git a/Common/Tasks/multiplicityQa.cxx b/Common/Tasks/multiplicityQa.cxx index 2178164854c..3c8c1100af8 100644 --- a/Common/Tasks/multiplicityQa.cxx +++ b/Common/Tasks/multiplicityQa.cxx @@ -290,8 +290,8 @@ struct MultiplicityQa { return; } - long NcontribsTOF = 0; - long NcontribsTRD = 0; + int64_t NcontribsTOF = 0; + int64_t NcontribsTRD = 0; for (auto& track : tracks) { if (track.isPVContributor()) { if (track.hasTRD()) diff --git a/DPG/Tasks/AOTTrack/qaEventTrackLite.h b/DPG/Tasks/AOTTrack/qaEventTrackLite.h index 3af51e15d65..9ea778698b7 100644 --- a/DPG/Tasks/AOTTrack/qaEventTrackLite.h +++ b/DPG/Tasks/AOTTrack/qaEventTrackLite.h @@ -106,7 +106,7 @@ DECLARE_SOA_COLUMN(Pt, pt, float); DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi DECLARE_SOA_COLUMN(PtReso, ptReso, float); //! Pt resolution -DECLARE_SOA_COLUMN(Sign, sign, short); //! Sign +DECLARE_SOA_COLUMN(Sign, sign, int16_t); //! Sign DECLARE_SOA_COLUMN(HasITS, hasITS, bool); //! Track has the ITS DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Track has the TPC DECLARE_SOA_COLUMN(HasTRD, hasTRD, bool); //! Track has the TRD diff --git a/DPG/Tasks/TOF/tofSkimsTableCreator.h b/DPG/Tasks/TOF/tofSkimsTableCreator.h index f3a6f63bb9b..80db220c030 100644 --- a/DPG/Tasks/TOF/tofSkimsTableCreator.h +++ b/DPG/Tasks/TOF/tofSkimsTableCreator.h @@ -46,7 +46,7 @@ DECLARE_SOA_COLUMN(DeltaTPi, deltaTPi, float); //! Difference betw DECLARE_SOA_COLUMN(DeltaTKa, deltaTKa, float); //! Difference between the tofSignal and the kaon expected signal DECLARE_SOA_COLUMN(DeltaTPr, deltaTPr, float); //! Difference between the tofSignal and the proton expected signal DECLARE_SOA_COLUMN(DoubleDelta, doubleDelta, float); //! Double difference between DeltaT -DECLARE_SOA_COLUMN(RefSign, refSign, short); //! Sign of the reference track +DECLARE_SOA_COLUMN(RefSign, refSign, int16_t); //! Sign of the reference track DECLARE_SOA_COLUMN(PIDForTracking, pidForTracking, uint8_t); //! Index for mass hypothesis used in tracking see PID.h for definition DECLARE_SOA_COLUMN(EvTimeT0AC, evTimeT0AC, float); //! Event time of the track computed with the T0AC DECLARE_SOA_COLUMN(EvTimeT0ACErr, evTimeT0ACErr, float); //! Resolution of the event time of the track computed with the T0AC diff --git a/PWGCF/Core/CorrelationContainer.cxx b/PWGCF/Core/CorrelationContainer.cxx index 8cbd834ec8f..0676c60dfa8 100644 --- a/PWGCF/Core/CorrelationContainer.cxx +++ b/PWGCF/Core/CorrelationContainer.cxx @@ -112,7 +112,7 @@ CorrelationContainer::CorrelationContainer(const char* name, const char* objTitl std::vector pairAxis(correlationAxis); pairAxis.insert(pairAxis.end(), userAxis.begin(), userAxis.end()); - long bins = 1; + int64_t bins = 1; for (const auto& axis : pairAxis) { bins *= axis.getNbins(); } diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx index b477e97f4e5..0a0ba927a22 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerReducedTask.cxx @@ -131,7 +131,7 @@ struct femtoWorldProducerReducedTask { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); - long now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + int64_t now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); ccdb->setCreatedNotAfter(now); } diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx index c4d9491f507..72e78653f44 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx @@ -183,7 +183,7 @@ struct femtoWorldProducerTaskV0Only { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); - long now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + int64_t now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); ccdb->setCreatedNotAfter(now); } diff --git a/PWGEM/Dilepton/DataModel/dileptonTables.h b/PWGEM/Dilepton/DataModel/dileptonTables.h index 4178d0c7b89..991818d04e1 100644 --- a/PWGEM/Dilepton/DataModel/dileptonTables.h +++ b/PWGEM/Dilepton/DataModel/dileptonTables.h @@ -1234,7 +1234,7 @@ DECLARE_SOA_COLUMN(Signed1Pt, signed1Pt, float); //! (sign of charge)/Pt in c/ DECLARE_SOA_COLUMN(Eta, eta, float); //! DECLARE_SOA_COLUMN(Phi, phi, float); //! DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float signed1Pt) -> float { return 1.f / std::fabs(signed1Pt); }); -DECLARE_SOA_DYNAMIC_COLUMN(Sign, sign, [](float signed1Pt) -> short { return (signed1Pt > 0) ? 1 : -1; }); //! Charge: positive: 1, negative: -1 +DECLARE_SOA_DYNAMIC_COLUMN(Sign, sign, [](float signed1Pt) -> int16_t { return (signed1Pt > 0) ? 1 : -1; }); //! Charge: positive: 1, negative: -1 } // namespace emprimarytrack DECLARE_SOA_TABLE_VERSIONED(EMPrimaryTracks_000, "AOD", "EMPRIMARYTRACK", 0, //! primary charged track table for 2PC @@ -1281,13 +1281,13 @@ DECLARE_SOA_INDEX_COLUMN(EMThinEvent, emthinevent); //! DECLARE_SOA_COLUMN(Pt1, pt1, float); //! DECLARE_SOA_COLUMN(Eta1, eta1, float); //! DECLARE_SOA_COLUMN(Phi1, phi1, float); //! -DECLARE_SOA_COLUMN(Sign1, sign1, short); //! +DECLARE_SOA_COLUMN(Sign1, sign1, int16_t); //! DECLARE_SOA_COLUMN(DCA1, dca1, float); //! DCA in sigma. Users should decide 3D or XY or Z DECLARE_SOA_COLUMN(Pt2, pt2, float); //! DECLARE_SOA_COLUMN(Eta2, eta2, float); //! DECLARE_SOA_COLUMN(Phi2, phi2, float); //! DECLARE_SOA_COLUMN(DCA2, dca2, float); //! DCA in sigma. Users should decide 3D or XY or Z -DECLARE_SOA_COLUMN(Sign2, sign2, short); //! +DECLARE_SOA_COLUMN(Sign2, sign2, int16_t); //! DECLARE_SOA_COLUMN(Weight, weight, float); //! possible pair weight } // namespace emdilepton diff --git a/PWGEM/Dilepton/DataModel/lmeeMLTables.h b/PWGEM/Dilepton/DataModel/lmeeMLTables.h index 3fc0d0aa90b..f7965db9a57 100644 --- a/PWGEM/Dilepton/DataModel/lmeeMLTables.h +++ b/PWGEM/Dilepton/DataModel/lmeeMLTables.h @@ -62,7 +62,7 @@ DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, uint8_t); //! DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! DECLARE_SOA_COLUMN(TPCNClsPID, tpcNClsPID, uint8_t); //! DECLARE_SOA_COLUMN(IsForValidation, isForValidation, bool); //! -DECLARE_SOA_COLUMN(Sign, sign, short); //! +DECLARE_SOA_COLUMN(Sign, sign, int16_t); //! DECLARE_SOA_COLUMN(P, p, float); //! DECLARE_SOA_COLUMN(PtGen, ptGen, float); //! DECLARE_SOA_COLUMN(EtaGen, etaGen, float); //! diff --git a/PWGJE/Tasks/triggerCorrelations.cxx b/PWGJE/Tasks/triggerCorrelations.cxx index 2a32add9252..ba66fb5abac 100644 --- a/PWGJE/Tasks/triggerCorrelations.cxx +++ b/PWGJE/Tasks/triggerCorrelations.cxx @@ -26,6 +26,7 @@ #include +#include #include #include @@ -38,9 +39,9 @@ struct TriggerCorrelationsTask { HistogramRegistry registry; std::vector triggerMaskBits; - long unsigned int nChargedTriggers = 4; - long unsigned int nChargedHFTriggers = 4; - long unsigned int nFullTriggers = 13; + uint64_t nChargedTriggers = 4; + uint64_t nChargedHFTriggers = 4; + uint64_t nFullTriggers = 13; void init(o2::framework::InitContext&) { triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(jetderiveddatautilities::JTriggerMasks); diff --git a/PWGLF/TableProducer/Common/zdc2stagecalibration.cxx b/PWGLF/TableProducer/Common/zdc2stagecalibration.cxx index 6c686f336ec..a7288fb4c01 100644 --- a/PWGLF/TableProducer/Common/zdc2stagecalibration.cxx +++ b/PWGLF/TableProducer/Common/zdc2stagecalibration.cxx @@ -261,21 +261,21 @@ struct zdc2stagecalibration { auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), runNumber); sorTimestamp = runInfo.sor; eorTimestamp = runInfo.eor; - bcSOR = static_cast(runInfo.orbitSOR) * static_cast(o2::constants::lhc::LHCMaxBunches); + bcSOR = runInfo.orbitSOR * static_cast(o2::constants::lhc::LHCMaxBunches); gainprofile = nullptr; spatialprofile = nullptr; qRecenteringProfile = nullptr; if (calibrationStage.value == 2 && useGainCallib.value && !confGainPath.value.empty()) { gainprofile = ccdb->getForTimeStamp(confGainPath.value, timestamp); if (!gainprofile) { - LOGF(warn, "No ZDC stage-1 gain map found for run %d at timestamp %llu", runNumber, static_cast(timestamp)); + LOGF(warn, "No ZDC stage-1 gain map found for run %d at timestamp %llu", runNumber, timestamp); } } if (calibrationStage.value == 2 && useSpatialCalib.value && !confSpatialPath.value.empty()) { spatialprofile = ccdb->getForTimeStamp(confSpatialPath.value, timestamp); if (!spatialprofile) { - LOGF(warn, "No ZDC spatial calibration found for run %d at timestamp %llu", runNumber, static_cast(timestamp)); + LOGF(warn, "No ZDC spatial calibration found for run %d at timestamp %llu", runNumber, timestamp); } } if (calibrationStage.value == 2 && useQRecentering.value) { @@ -284,7 +284,7 @@ struct zdc2stagecalibration { qRecenteringProfile = ccdb->getForTimeStamp(qRecenteringPath, timestamp); } if (!qRecenteringProfile) { - LOGF(warn, "No ZDC Q-recentering calibration found for run %d at timestamp %llu", runNumber, static_cast(timestamp)); + LOGF(warn, "No ZDC Q-recentering calibration found for run %d at timestamp %llu", runNumber, timestamp); } } } diff --git a/PWGLF/TableProducer/Common/zdcvector.cxx b/PWGLF/TableProducer/Common/zdcvector.cxx index d1c5eb20766..b7eab984815 100644 --- a/PWGLF/TableProducer/Common/zdcvector.cxx +++ b/PWGLF/TableProducer/Common/zdcvector.cxx @@ -240,7 +240,7 @@ struct zdcvector { LOGF(info, "Run %d: SOR timestamp = %llu ms", currentRunNumber, - static_cast(sorTimestamp)); + sorTimestamp); } float timeInMinutes = 0.f; diff --git a/PWGLF/TableProducer/Resonances/doublephitable.cxx b/PWGLF/TableProducer/Resonances/doublephitable.cxx index 7845dbdf6b3..1cd5309b47e 100644 --- a/PWGLF/TableProducer/Resonances/doublephitable.cxx +++ b/PWGLF/TableProducer/Resonances/doublephitable.cxx @@ -459,7 +459,7 @@ struct doublephitable { auto* grpmag = ccdb->getForTimeStamp(ccdbPathGrpMag.value, bc.timestamp()); if (grpmag == nullptr) { - LOGF(fatal, "GRPMagField unavailable for run %d, timestamp %llu", bc.runNumber(), static_cast(bc.timestamp())); + LOGF(fatal, "GRPMagField unavailable for run %d, timestamp %llu", bc.runNumber(), bc.timestamp()); } o2::base::Propagator::initFieldFromGRP(grpmag); diff --git a/PWGLF/TableProducer/Resonances/xi1530kaonreducedtable.cxx b/PWGLF/TableProducer/Resonances/xi1530kaonreducedtable.cxx index 149879b75d5..f32bd8755b6 100644 --- a/PWGLF/TableProducer/Resonances/xi1530kaonreducedtable.cxx +++ b/PWGLF/TableProducer/Resonances/xi1530kaonreducedtable.cxx @@ -508,8 +508,7 @@ struct xi1530kaonreducedtable { { auto* grpo = ccdb->getForTimeStamp("/GLO/Config/GRPMagField", timestamp); if (grpo == nullptr) { - LOGF(fatal, "GRPMagField object not found in CCDB for timestamp %llu", - static_cast(timestamp)); + LOGF(fatal, "GRPMagField object not found in CCDB for timestamp %llu", timestamp); return 0.f; } return 0.1f * grpo->getNominalL3Field(); // kG -> T diff --git a/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx b/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx index 6ed90f63f57..ee760d0a080 100644 --- a/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx +++ b/PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx @@ -192,8 +192,8 @@ struct hypertritonAnalysis { kEvSelAllSteps }; // Helper to do bookkeeping and late filling of QA histos - std::array stats; - std::array evselstats; + std::array stats; + std::array evselstats; void resetHistos() { diff --git a/PWGLF/Tasks/QC/straRecoStudy.cxx b/PWGLF/Tasks/QC/straRecoStudy.cxx index b191f182677..19330a1d72c 100644 --- a/PWGLF/Tasks/QC/straRecoStudy.cxx +++ b/PWGLF/Tasks/QC/straRecoStudy.cxx @@ -328,7 +328,7 @@ struct straRecoStudy { kEvSelVtxZ, kEvSelAllSteps }; - std::array evselstats; + std::array evselstats; void resetCounters() { diff --git a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx index 47769cced1e..6d9464e51d2 100644 --- a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx +++ b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx @@ -2049,7 +2049,7 @@ struct StrangenessInJetsIons { bool isV0 = isK0S || isLambda || isAntiLambda; if (!isV0) continue; - for (long unsigned int i = 0; i < fjTracks.size(); ++i) { + for (uint64_t i = 0; i < fjTracks.size(); ++i) { if (isV0DaughterTrack(fjTracks[i], v0)) { // LOG(info) << "[AddV0sForJetReconstructionData] V0 daughter track found in fjTracks."; isTrackReplaced[i] = true; @@ -2059,7 +2059,7 @@ struct StrangenessInJetsIons { std::vector cleanFjInput; cleanFjInput.reserve(fjInput.size()); - for (long unsigned int i = 0; i < fjInput.size(); ++i) { + for (uint64_t i = 0; i < fjInput.size(); ++i) { if (!isTrackReplaced[i]) cleanFjInput.push_back(fjInput[i]); } @@ -2147,7 +2147,7 @@ struct StrangenessInJetsIons { bool isV0 = isK0S || isLambda || isAntiLambda; if (!isV0) continue; - for (long unsigned int i = 0; i < fjTracks.size(); ++i) { + for (uint64_t i = 0; i < fjTracks.size(); ++i) { if (isV0DaughterTrack(fjTracks[i], v0)) { // LOG(info) << "[AddV0sForJetReconstructionMCD] V0 daughter track found in fjTracks."; isTrackReplaced[i] = true; @@ -2157,7 +2157,7 @@ struct StrangenessInJetsIons { std::vector cleanFjInput; cleanFjInput.reserve(fjInput.size()); - for (long unsigned int i = 0; i < fjInput.size(); ++i) { + for (uint64_t i = 0; i < fjInput.size(); ++i) { if (!isTrackReplaced[i]) cleanFjInput.push_back(fjInput[i]); } @@ -2205,7 +2205,7 @@ struct StrangenessInJetsIons { } // Remove V0 daughter particles if already in the input list for the jet finder - for (long unsigned int i = 0; i < fjParticleObj.size(); ++i) { + for (uint64_t i = 0; i < fjParticleObj.size(); ++i) { const auto& mcPart = fjParticleObj[i]; if (!mcPart.has_mothers()) continue; @@ -2220,7 +2220,7 @@ struct StrangenessInJetsIons { std::vector cleanFjInput; cleanFjInput.reserve(fjInput.size()); - for (long unsigned int i = 0; i < fjInput.size(); ++i) { + for (uint64_t i = 0; i < fjInput.size(); ++i) { if (!isTrackReplaced[i]) cleanFjInput.push_back(fjInput[i]); } @@ -2341,7 +2341,7 @@ struct StrangenessInJetsIons { double minDeltaR = maxDeltaR; // Search closest jet RECO in (eta,phi) space - for (long unsigned int iReco = 0; iReco < jetsReco.size(); ++iReco) { + for (uint64_t iReco = 0; iReco < jetsReco.size(); ++iReco) { if (isRecoJetMatched[iReco]) continue; diff --git a/Tutorials/OpenData/flowAnalysis.cxx b/Tutorials/OpenData/flowAnalysis.cxx index 6ab74ebfced..35bc2c2021c 100644 --- a/Tutorials/OpenData/flowAnalysis.cxx +++ b/Tutorials/OpenData/flowAnalysis.cxx @@ -88,7 +88,7 @@ struct flow_base { HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; Filter collisionFilter = (aod::collision::flags & (uint16_t)aod::collision::CollisionFlagsRun2::Run2VertexerTracks) == (uint16_t)aod::collision::CollisionFlagsRun2::Run2VertexerTracks; - Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)); + Filter trackFilter = ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)); void fillAPt(double trackpt, double cent, double vn, double sinHarm, double cosHarm) { @@ -286,7 +286,7 @@ struct flow_base { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); - long now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + int64_t now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); ccdb->setCreatedNotAfter(now); // TODO must become global parameter from the train creation time } diff --git a/Tutorials/src/ccdbaccess.cxx b/Tutorials/src/ccdbaccess.cxx index e1ea568f46f..b98658da4a1 100644 --- a/Tutorials/src/ccdbaccess.cxx +++ b/Tutorials/src/ccdbaccess.cxx @@ -39,7 +39,7 @@ struct TimestampUserTask { Service ccdb; Configurable path{"ccdb-path", "qc/TOF/TOFTaskCompressed/hDiagnostic", "path to the ccdb object"}; Configurable url{"ccdb-url", "http://ccdb-test.cern.ch:8080", "url of the ccdb repository"}; - Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; + Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; void init(o2::framework::InitContext&) { diff --git a/Tutorials/src/efficiencyGlobal.cxx b/Tutorials/src/efficiencyGlobal.cxx index 13e1fdb9df3..2d2680f8967 100644 --- a/Tutorials/src/efficiencyGlobal.cxx +++ b/Tutorials/src/efficiencyGlobal.cxx @@ -37,7 +37,7 @@ struct EfficiencyGlobal { Service ccdb; Configurable path{"ccdb-path", "Users/j/jgrosseo/tutorial/efficiency/simple", "base path to the ccdb object"}; Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; + Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; OutputObj pt{TH1F("pt", "pt", 20, 0., 10.)}; diff --git a/Tutorials/src/efficiencyPerRun.cxx b/Tutorials/src/efficiencyPerRun.cxx index 7cbebd815ab..944b7fbb105 100644 --- a/Tutorials/src/efficiencyPerRun.cxx +++ b/Tutorials/src/efficiencyPerRun.cxx @@ -31,6 +31,7 @@ #include #include +#include #include using namespace o2::framework; @@ -40,7 +41,7 @@ struct EfficiencyPerRun { Service ccdb; Configurable path{"ccdb-path", "Users/j/jgrosseo/tutorial/efficiency/simple", "base path to the ccdb object"}; Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; + Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; OutputObj pt{TH1F("pt", "pt", 20, 0., 10.)}; From f31a5c78c17d92b9d468b31ff5fb4dfbb16148df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Fri, 25 Sep 2026 22:29:23 +0200 Subject: [PATCH 11/11] Fix runtime/string --- Common/CCDB/TriggerAliases.cxx | 2 +- Common/CCDB/TriggerAliases.h | 2 +- Common/Core/TrackSelection.cxx | 5 +- Common/Core/TrackSelection.h | 2 +- .../Tasks/multiparticle-correlations-ar.cxx | 52 +++++++++---------- .../Core/SkimmingConfigurableCuts.cxx | 25 +++++---- .../Core/SkimmingConfigurableCuts.h | 2 +- .../TableProducer/mlBasedTrackSelector.cxx | 6 +-- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 6 +-- PWGLF/TableProducer/Common/lfTPCPID.cxx | 42 +++++++-------- Tutorials/src/configurableObjects.cxx | 12 ++--- 11 files changed, 77 insertions(+), 79 deletions(-) diff --git a/Common/CCDB/TriggerAliases.cxx b/Common/CCDB/TriggerAliases.cxx index c3d28889bca..9212209fce4 100644 --- a/Common/CCDB/TriggerAliases.cxx +++ b/Common/CCDB/TriggerAliases.cxx @@ -16,7 +16,7 @@ #include #include -std::string aliasLabels[kNaliases] = { +const std::array aliasLabels{ "kINT7", "kEMC7", "kINT7inMUON", diff --git a/Common/CCDB/TriggerAliases.h b/Common/CCDB/TriggerAliases.h index 60dbd965741..66ac7caa8fd 100644 --- a/Common/CCDB/TriggerAliases.h +++ b/Common/CCDB/TriggerAliases.h @@ -51,7 +51,7 @@ enum triggerAliases { kNaliases }; -extern std::string aliasLabels[kNaliases]; +extern const std::array aliasLabels; class TriggerAliases { diff --git a/Common/Core/TrackSelection.cxx b/Common/Core/TrackSelection.cxx index 97de07b2bd0..5ee1ce57b55 100644 --- a/Common/Core/TrackSelection.cxx +++ b/Common/Core/TrackSelection.cxx @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,7 @@ bool TrackSelection::FulfillsITSHitRequirements(uint8_t itsClusterMap) const return true; } -const std::string TrackSelection::mCutNames[static_cast(TrackSelection::TrackCuts::kNCuts)] = {"TrackType", "PtRange", "EtaRange", "TPCNCls", "TPCCrossedRows", "TPCCrossedRowsOverNCls", "TPCChi2NDF", "TPCRefit", "ITSNCls", "ITSChi2NDF", "ITSRefit", "ITSHits", "GoldenChi2", "DCAxy", "DCAz", "TPCFracSharedCls"}; +const std::array(TrackSelection::TrackCuts::kNCuts)> TrackSelection::mCutNames{"TrackType", "PtRange", "EtaRange", "TPCNCls", "TPCCrossedRows", "TPCCrossedRowsOverNCls", "TPCChi2NDF", "TPCRefit", "ITSNCls", "ITSChi2NDF", "ITSRefit", "ITSHits", "GoldenChi2", "DCAxy", "DCAz", "TPCFracSharedCls"}; void TrackSelection::SetTrackType(o2::aod::track::TrackTypeEnum trackType) { @@ -149,7 +150,7 @@ void TrackSelection::print() const for (int i = 0; i < static_cast(TrackCuts::kNCuts); i++) { switch (static_cast(i)) { case TrackCuts::kTrackType: - LOG(info) << mCutNames[i].data() << " == " << static_cast(mTrackType); + LOG(info) << mCutNames[i] << " == " << static_cast(mTrackType); break; case TrackCuts::kPtRange: LOG(info) << mCutNames[i] << " in [" << mMinPt << ", " << mMaxPt << "]"; diff --git a/Common/Core/TrackSelection.h b/Common/Core/TrackSelection.h index 80e676c625c..a35f518c0e5 100644 --- a/Common/Core/TrackSelection.h +++ b/Common/Core/TrackSelection.h @@ -68,7 +68,7 @@ class TrackSelection ppPass3 }; - static const std::string mCutNames[static_cast(TrackCuts::kNCuts)]; + static const std::array(TrackCuts::kNCuts)> mCutNames; // True for Run 2 track types. Hoisted out of the per-cut IsSelected() so that // the trackType() column is dereferenced once per track instead of once per cut. diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx index 2814c562225..411c1ec8426 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ar.cxx @@ -86,7 +86,7 @@ enum CorEventDep { kCENDEP, kLAST_CorEventDep }; -const std::string CorEventDepNames[kLAST_CorEventDep] = { +const std::array CorEventDepNames{ "[kINTEGRATED]", "[kMULDEP]", "[kCENDEP]"}; @@ -101,7 +101,7 @@ enum CorTrackDep { kETADEP, kLAST_CorTrackDep }; -const std::string CorTrackDepNames[kLAST_CorTrackDep] = { +const std::array CorTrackDepNames{ "[kPTDEP]", "[kETADEP]"}; std::vector> CorTrackDepDefaultBins = { @@ -121,7 +121,7 @@ enum EventVariable { kMULTPC, kLAST_EventVariable }; -static constexpr std::string_view EventVariableNames[kLAST_EventVariable] = { +static constexpr std::array EventVariableNames{ "EventVariable_VertexX", "EventVariable_VertexY", "EventVariable_VertexZ", @@ -201,10 +201,10 @@ std::vector> TrackVariableDefaultCuts = { {0., 6., 1.}}; // kITSCLUSTERS // common info string for all configurables -const std::string BinningSuffix = std::string("-Binning"); -const std::string CutSuffix = std::string("-Cut"); -const std::string CorrelatorHistPrefix = std::string("CorDepBinning_"); -const std::vector CutInfo = {std::string("Low"), std::string("High"), std::string("Option")}; +static constexpr std::string BinningSuffix{"-Binning"}; +static constexpr std::string CutSuffix{"-Cut"}; +static constexpr std::string CorrelatorHistPrefix{"CorDepBinning_"}; +static const std::vector cutInfo{"Low", "High", "Option"}; const int MaxHarmonic = 10; const int MaxPower = 10; @@ -259,7 +259,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutVX{ std::string(AR::EventVariableNames[AR::kVX]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kVX).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kVX).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisVY{ std::string(AR::EventVariableNames[AR::kVY]) + AR::BinningSuffix, @@ -267,7 +267,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutVY{ std::string(AR::EventVariableNames[AR::kVY]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kVY).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kVY).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisVZ{ std::string(AR::EventVariableNames[AR::kVZ]) + AR::BinningSuffix, @@ -275,7 +275,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutVZ{ std::string(AR::EventVariableNames[AR::kVZ]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kVZ).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kVZ).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisVABS{ std::string(AR::EventVariableNames[AR::kVABS]) + AR::BinningSuffix, @@ -283,7 +283,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutVABS{ std::string(AR::EventVariableNames[AR::kVABS]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kVABS).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kVABS).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisCEN{ std::string(AR::EventVariableNames[AR::kCEN]) + AR::BinningSuffix, @@ -291,7 +291,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutCEN{ std::string(AR::EventVariableNames[AR::kCEN]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kCEN).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kCEN).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisMULQ{ std::string(AR::EventVariableNames[AR::kMULQ]) + AR::BinningSuffix, @@ -299,7 +299,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutMULQ{ std::string(AR::EventVariableNames[AR::kMULQ]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kMULQ).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kMULQ).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisMULW{ std::string(AR::EventVariableNames[AR::kMULW]) + AR::BinningSuffix, @@ -307,7 +307,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutMULW{ std::string(AR::EventVariableNames[AR::kMULW]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kMULW).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kMULW).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisMULNC{ std::string(AR::EventVariableNames[AR::kMULNC]) + AR::BinningSuffix, @@ -315,7 +315,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutMULNC{ std::string(AR::EventVariableNames[AR::kMULNC]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kMULNC).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kMULNC).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgEventAxisMULTPC{ std::string(AR::EventVariableNames[AR::kMULTPC]) + AR::BinningSuffix, @@ -323,7 +323,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgEventCutMULTPC{ std::string(AR::EventVariableNames[AR::kMULTPC]) + AR::CutSuffix, - {AR::EventVariableDefaultCuts.at(AR::kMULTPC).data(), 3, AR::CutInfo}, + {AR::EventVariableDefaultCuts.at(AR::kMULTPC).data(), 3, AR::cutInfo}, ""}; std::vector cfgEventBinning = { cfgEventAxisVX, @@ -343,7 +343,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutPT{ std::string(AR::TrackVariableNames[AR::kPT]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kPT).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kPT).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisPHI{ std::string(AR::TrackVariableNames[AR::kPHI]) + AR::BinningSuffix, @@ -351,7 +351,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutPHI{ std::string(AR::TrackVariableNames[AR::kPHI]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kPHI).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kPHI).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisETA{ std::string(AR::TrackVariableNames[AR::kETA]) + AR::BinningSuffix, @@ -359,7 +359,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutETA{ std::string(AR::TrackVariableNames[AR::kETA]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kETA).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kETA).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisCHARGE{ std::string(AR::TrackVariableNames[AR::kCHARGE]) + AR::BinningSuffix, @@ -367,7 +367,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutCHARGE{ std::string(AR::TrackVariableNames[AR::kCHARGE]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kCHARGE).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kCHARGE).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisDCAZ{ std::string(AR::TrackVariableNames[AR::kDCAZ]) + AR::BinningSuffix, @@ -375,7 +375,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutDCAZ{ std::string(AR::TrackVariableNames[AR::kDCAZ]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kDCAZ).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kDCAZ).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisDCAXY{ std::string(AR::TrackVariableNames[AR::kDCAXY]) + AR::BinningSuffix, @@ -383,7 +383,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutDCAXY{ std::string(AR::TrackVariableNames[AR::kDCAXY]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kDCAXY).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kDCAXY).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisTPCCLUSTERS{ std::string(AR::TrackVariableNames[AR::kTPCCLUSTERS]) + AR::BinningSuffix, @@ -391,7 +391,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutTPCCLUSTERS{ std::string(AR::TrackVariableNames[AR::kTPCCLUSTERS]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kTPCCLUSTERS).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kTPCCLUSTERS).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisTPCCROSSEDROWS{ std::string(AR::TrackVariableNames[AR::kTPCCROSSEDROWS]) + AR::BinningSuffix, @@ -399,7 +399,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutTPCCROSSEDROWS{ std::string(AR::TrackVariableNames[AR::kTPCCROSSEDROWS]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kTPCCROSSEDROWS).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kTPCCROSSEDROWS).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisTPCCHI2{ std::string(AR::TrackVariableNames[AR::kTPCCHI2]) + AR::BinningSuffix, @@ -407,7 +407,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutTPCCHI2{ std::string(AR::TrackVariableNames[AR::kTPCCHI2]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kTPCCHI2).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kTPCCHI2).data(), 3, AR::cutInfo}, ""}; ConfigurableAxis cfgTrackAxisITSCLUSTERS{ std::string(AR::TrackVariableNames[AR::kITSCLUSTERS]) + AR::BinningSuffix, @@ -415,7 +415,7 @@ struct MultiParticleCorrelationsARTask { ""}; Configurable> cfgTrackCutITSCLUSTERS{ std::string(AR::TrackVariableNames[AR::kITSCLUSTERS]) + AR::CutSuffix, - {AR::TrackVariableDefaultCuts.at(AR::kITSCLUSTERS).data(), 3, AR::CutInfo}, + {AR::TrackVariableDefaultCuts.at(AR::kITSCLUSTERS).data(), 3, AR::cutInfo}, ""}; std::vector cfgTrackBinning = { cfgTrackAxisPT, diff --git a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx index ffd29c96571..b4c5b6c3f20 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx +++ b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.cxx @@ -1188,19 +1188,18 @@ bool TrackSelectionBrick::FulfillsITSHitRequirements(uint8_t itsClusterMap) return true; } -const std::string TrackSelectionBrick::mCutNames[static_cast(TrackSelectionBrick::TrackCuts::kNCuts)] = - { - "TrackType", - "TPCNCls", - "TPCCrossedRowsOverNCls", - "TPCRefit", - "ITSNCls", - "ITSChi2NDF", - "ITSRefit", - "ITSHits", - "GoldenChi2", - "DCAxy", - "DCAz"}; +const std::array(TrackSelectionBrick::TrackCuts::kNCuts)> TrackSelectionBrick::mCutNames{ + "TrackType", + "TPCNCls", + "TPCCrossedRowsOverNCls", + "TPCRefit", + "ITSNCls", + "ITSChi2NDF", + "ITSRefit", + "ITSHits", + "GoldenChi2", + "DCAxy", + "DCAz"}; /// \brief Returns wether the cut brick is incorporated in the selection chain /// \return true if the cut brick is incorporated diff --git a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h index 32b1df5a3d3..82a175d9d1b 100644 --- a/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h +++ b/PWGCF/TwoParticleCorrelations/Core/SkimmingConfigurableCuts.h @@ -530,7 +530,7 @@ class TrackSelectionBrick : public SpecialCutBrick kNCuts }; - static const std::string mCutNames[static_cast(TrackCuts::kNCuts)]; + static const std::array(TrackSelectionBrick::TrackCuts::kNCuts)> mCutNames; std::vector IsArmed() override; template diff --git a/PWGHF/D2H/TableProducer/mlBasedTrackSelector.cxx b/PWGHF/D2H/TableProducer/mlBasedTrackSelector.cxx index 32a7ba5ad8c..5961630d3d2 100644 --- a/PWGHF/D2H/TableProducer/mlBasedTrackSelector.cxx +++ b/PWGHF/D2H/TableProducer/mlBasedTrackSelector.cxx @@ -190,9 +190,9 @@ struct HfTrackSelectorTagSelCollisions { } // set numerical value of the Run 2 trigger class - auto* const triggerAlias = std::find(aliasLabels, aliasLabels + kNaliases, triggerClassName.value.data()); - if (triggerAlias != aliasLabels + kNaliases) { - hfEvSel.triggerClass.value = std::distance(aliasLabels, triggerAlias); + auto* const triggerAlias = std::find(aliasLabels.begin(), aliasLabels.end(), triggerClassName.value.data()); + if (triggerAlias != aliasLabels.end()) { + hfEvSel.triggerClass.value = std::distance(aliasLabels.begin(), triggerAlias); } hfEvSel.init(registry, &zorroSummary); // collision monitoring diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index c8456183f31..c4fa6635115 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -174,9 +174,9 @@ struct HfTrackIndexSkimCreatorTagSelCollisions { } // set numerical value of the Run 2 trigger class - auto* const triggerAlias = std::find(aliasLabels, aliasLabels + kNaliases, triggerClassName.value.data()); - if (triggerAlias != aliasLabels + kNaliases) { - hfEvSel.triggerClass.value = std::distance(aliasLabels, triggerAlias); + auto* const triggerAlias = std::find(aliasLabels.begin(), aliasLabels.end(), triggerClassName.value.data()); + if (triggerAlias != aliasLabels.end()) { + hfEvSel.triggerClass.value = std::distance(aliasLabels.begin(), triggerAlias); } hfEvSel.init(registry, &zorroSummary); // collision monitoring diff --git a/PWGLF/TableProducer/Common/lfTPCPID.cxx b/PWGLF/TableProducer/Common/lfTPCPID.cxx index 6c1e6252185..31e6fd277bc 100644 --- a/PWGLF/TableProducer/Common/lfTPCPID.cxx +++ b/PWGLF/TableProducer/Common/lfTPCPID.cxx @@ -62,29 +62,29 @@ static const std::vector parameterNames{"Use default tiny", "Set parameters", "bb1", "bb2", "bb3", "bb4", "bb5", "MIP value", "Charge exponent", "Resolution"}; -static constexpr float defaultParameters[nSpecies][nParameters]{{2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, - {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}}; +static constexpr std::array, nSpecies> defaultParameters{{{2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}}}; static constexpr int nOptions = 4; static const std::vector optionNames{"Bethe Bloch path", // If empty using the default/json values. Can be a CCDB path if the string starts with ccdb:// "Post calibration path", // If empty using the default/json values. Can be a CCDB path if the string starts with ccdb:// "Simple Bethe Bloch", // (true/false) "RequirePostCalib"}; // (true/false) -const std::string defaultOptions[nSpecies][nOptions]{{"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}, - {"", "", "false", "false"}}; +const std::array, nSpecies> defaultOptions{{{"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}, + {"", "", "false", "false"}}}; // Structure to hold the parameters struct bbParams { @@ -472,15 +472,15 @@ struct lfTpcPid { // Parameters setting from json Configurable> bbParameters{"bbParameters", - {defaultParameters[0], nSpecies, nParameters, particleNames, parameterNames}, + {defaultParameters.front().data(), nSpecies, nParameters, particleNames, parameterNames}, "Bethe Bloch parameters"}; // Parameter setting from input file (including the ccdb) Configurable> fileParamBbPositive{"fileParamBbPositive", - {defaultOptions[0], nSpecies, nOptions, particleNames, optionNames}, + {defaultOptions.front().data(), nSpecies, nOptions, particleNames, optionNames}, "Input for the parametrization for positive particles. If empty using the default/json values. Can be a CCDB path if the string starts with ccdb://"}; Configurable> fileParamBbNegative{"fileParamBbNegative", - {defaultOptions[0], nSpecies, nOptions, particleNames, optionNames}, + {defaultOptions.front().data(), nSpecies, nOptions, particleNames, optionNames}, "Input for the parametrization for negative particles. If empty using the default/json values. Can be a CCDB path if the string starts with ccdb://"}; Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; diff --git a/Tutorials/src/configurableObjects.cxx b/Tutorials/src/configurableObjects.cxx index e1a758b1851..f2de4432775 100644 --- a/Tutorials/src/configurableObjects.cxx +++ b/Tutorials/src/configurableObjects.cxx @@ -63,10 +63,8 @@ auto printMatrix(Array2D const& m) return ss.str(); } -static constexpr float defaultm[3][4] = {{1.1, 1.2, 1.3, 1.4}, {2.1, 2.2, 2.3, 2.4}, {3.1, 3.2, 3.3, 3.4}}; -static LabeledArray la{&defaultm[0][0], 3, 4, {"r 1", "r 2", "r 3"}, {"c 1", "c 2", "c 3", "c 4"}}; -const std::string defaultmS[3][4] = {{"One.One", "One.Two", "One.Three", "One.Four"}, {"Two.One", "Two.Two", "Two.Three", "Two.Four"}, {"Three.One", "Three.Two", "Three.Three", "Three.Four"}}; -static LabeledArray laS{&defaultmS[0][0], 3, 4, {"rS 1", "rS 2", "rS 3"}, {"cS 1", "cS 2", "cS 3", "cS 4"}}; +static constexpr std::array, 3> defaultm{{{1.1, 1.2, 1.3, 1.4}, {2.1, 2.2, 2.3, 2.4}, {3.1, 3.2, 3.3, 3.4}}}; +static constexpr std::array, 3> defaultmS{{{"One.One", "One.Two", "One.Three", "One.Four"}, {"Two.One", "Two.Two", "Two.Three", "Two.Four"}, {"Three.One", "Three.Two", "Three.Three", "Three.Four"}}}; struct ConfigurableObjectDemo { // Simple type configurables @@ -82,9 +80,9 @@ struct ConfigurableObjectDemo { Configurable> array{"array", {0, 0, 0, 0, 0, 0, 0}, "generic int array"}; Configurable> farray{"farray", {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1}, "generic float array"}; Configurable> darray{"darray", {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1}, "generic double array"}; - Configurable> vmatrix{"matrix", {&defaultm[0][0], 3, 4}, "generic matrix"}; - Configurable> vla{"vla", {defaultm[0], 3, 4, {"r 1", "r 2", "r 3"}, {"c 1", "c 2", "c 3", "c 4"}}, "labeled array with float content"}; - Configurable> vlaS{"vlaS", {defaultmS[0], 3, 4, {"rS 1", "rS 2", "rS 3"}, {"cS 1", "cS 2", "cS 3", "cS 4"}}, "labeled array with string content"}; + Configurable> vmatrix{"matrix", {defaultm.front().data(), 3, 4}, "generic matrix"}; + Configurable> vla{"vla", {defaultm.front().data(), 3, 4, {"r 1", "r 2", "r 3"}, {"c 1", "c 2", "c 3", "c 4"}}, "labeled array with float content"}; + Configurable> vlaS{"vlaS", {defaultmS.front().data(), 3, 4, {"rS 1", "rS 2", "rS 3"}, {"cS 1", "cS 2", "cS 3", "cS 4"}}, "labeled array with string content"}; // Configurables can be grouped into `ConfigurableGroup`s. // Their names must be unique.