diff --git a/Common/CCDB/EventSelectionParams.cxx b/Common/CCDB/EventSelectionParams.cxx index 013711d0464..710c0c99f89 100644 --- a/Common/CCDB/EventSelectionParams.cxx +++ b/Common/CCDB/EventSelectionParams.cxx @@ -16,7 +16,7 @@ // o2-linter: disable=name/workflow-file -#include "EventSelectionParams.h" +#include "Common/CCDB/EventSelectionParams.h" #include #include diff --git a/Common/CCDB/EventSelectionParams.h b/Common/CCDB/EventSelectionParams.h index 4633ff7aa73..cc4c397dd1b 100644 --- a/Common/CCDB/EventSelectionParams.h +++ b/Common/CCDB/EventSelectionParams.h @@ -17,9 +17,10 @@ #ifndef COMMON_CCDB_EVENTSELECTIONPARAMS_H_ #define COMMON_CCDB_EVENTSELECTIONPARAMS_H_ -#include #include +#include + namespace o2::aod::evsel { // Event selection criteria diff --git a/Common/CCDB/macros/upload_event_selection_params.C b/Common/CCDB/macros/upload_event_selection_params.C index cafc863ab03..49f8019bd94 100644 --- a/Common/CCDB/macros/upload_event_selection_params.C +++ b/Common/CCDB/macros/upload_event_selection_params.C @@ -9,12 +9,16 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "CCDB/CcdbApi.h" +#include "Common/CCDB/EventSelectionParams.h" + #include "CCDB/BasicCCDBManager.h" +#include "CCDB/CcdbApi.h" + #include "TString.h" + #include #include -#include "EventSelectionParams.h" + using std::map; using std::string; diff --git a/Common/CCDB/macros/upload_event_selection_params_run3.C b/Common/CCDB/macros/upload_event_selection_params_run3.C index f81491949c6..07d44e5017f 100644 --- a/Common/CCDB/macros/upload_event_selection_params_run3.C +++ b/Common/CCDB/macros/upload_event_selection_params_run3.C @@ -9,11 +9,18 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +#include "Common/CCDB/EventSelectionParams.h" + #include "CCDB/CcdbApi.h" +#include + #include "TString.h" + +#include + +#include #include #include -#include "EventSelectionParams.h" using std::map; using std::string; @@ -140,4 +147,4 @@ void fillMapOfCustomOrbitShifts(std::map& mapOrbitShift) mapOrbitShift[523797] = 41; mapOrbitShift[523821] = 36; mapOrbitShift[523897] = 38; -} \ No newline at end of file +} diff --git a/Common/CCDB/macros/upload_trigger_aliases.C b/Common/CCDB/macros/upload_trigger_aliases.C index 9fa91cd9b13..c4ecae54bec 100644 --- a/Common/CCDB/macros/upload_trigger_aliases.C +++ b/Common/CCDB/macros/upload_trigger_aliases.C @@ -9,12 +9,17 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "CCDB/CcdbApi.h" +#include "Common/CCDB/TriggerAliases.h" + #include "CCDB/BasicCCDBManager.h" +#include "CCDB/CcdbApi.h" +#include + #include "TObjArray.h" -#include "TriggerAliases.h" -#include "TTree.h" #include "TString.h" + +#include + #include #include #include diff --git a/Common/CCDB/macros/upload_trigger_aliases_run3.C b/Common/CCDB/macros/upload_trigger_aliases_run3.C index e946d9117d4..02c4859e8f8 100644 --- a/Common/CCDB/macros/upload_trigger_aliases_run3.C +++ b/Common/CCDB/macros/upload_trigger_aliases_run3.C @@ -9,13 +9,18 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "DataFormatsCTP/Configuration.h" -#include "CCDB/CcdbApi.h" +#include "Common/CCDB/TriggerAliases.h" + #include "CCDB/BasicCCDBManager.h" +#include "CCDB/CcdbApi.h" +#include "DataFormatsCTP/Configuration.h" +#include + #include "TObjArray.h" -#include "TriggerAliases.h" -#include "TTree.h" #include "TString.h" + +#include + #include #include #include diff --git a/Common/Core/EventMixing.h b/Common/Core/EventMixing.h index 9317a1213af..216b553372d 100644 --- a/Common/Core/EventMixing.h +++ b/Common/Core/EventMixing.h @@ -9,8 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef ANALYSIS_CORE_EVENTMIXING_H_ -#define ANALYSIS_CORE_EVENTMIXING_H_ +#ifndef COMMON_CORE_EVENTMIXING_H_ +#define COMMON_CORE_EVENTMIXING_H_ namespace eventmixing { @@ -47,4 +47,4 @@ static int getMixingBin(const T1& vtxBins, const T1& multBins, const T2& vtx, co } }; // namespace eventmixing -#endif /* ANALYSIS_CORE_EVENTMIXING_H_ */ +#endif // COMMON_CORE_EVENTMIXING_H_ diff --git a/Common/Core/FFitWeights.cxx b/Common/Core/FFitWeights.cxx index 41e39b66854..f502b4bc3c4 100644 --- a/Common/Core/FFitWeights.cxx +++ b/Common/Core/FFitWeights.cxx @@ -16,12 +16,14 @@ #include "FFitWeights.h" -#include "Framework/Logger.h" +#include #include #include +#include #include #include +#include #include #include diff --git a/Common/Core/MetadataHelper.cxx b/Common/Core/MetadataHelper.cxx index 70af2dbec2b..c1712c3f3b6 100644 --- a/Common/Core/MetadataHelper.cxx +++ b/Common/Core/MetadataHelper.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/Common/Core/PID/PIDTOFParamService.cxx b/Common/Core/PID/PIDTOFParamService.cxx index 29fe01360fe..463ddd6ee48 100644 --- a/Common/Core/PID/PIDTOFParamService.cxx +++ b/Common/Core/PID/PIDTOFParamService.cxx @@ -18,11 +18,24 @@ #include "PIDTOFParamService.h" +#include "Common/Core/CollisionTypeHelper.h" +#include "Common/Core/MetadataHelper.h" + +#include +#include +#include #include +#include #include #include #include +#include +#include + +#include +#include +#include #include #include diff --git a/Common/Core/PID/PIDTOFParamService.h b/Common/Core/PID/PIDTOFParamService.h index 73b6a4e0c93..69d8fbfed0d 100644 --- a/Common/Core/PID/PIDTOFParamService.h +++ b/Common/Core/PID/PIDTOFParamService.h @@ -24,14 +24,16 @@ #include "Common/Core/PID/PIDTOF.h" #include "Common/Core/TableHelper.h" -#include "CCDB/BasicCCDBManager.h" -#include "CommonConstants/PhysicsConstants.h" -#include "DataFormatsTOF/ParameterContainers.h" -#include "Framework/DataTypes.h" -#include "Framework/PID.h" -#include "Framework/Plugins.h" -#include "ReconstructionDataFormats/PID.h" - +#include +#include +#include +#include +#include +#include +#include + +#include +#include #include namespace o2::pid::tof @@ -188,7 +190,7 @@ struct TOFResponseImpl { template void getCfg(o2::framework::InitContext& initContext, const std::string name, VType& v, const std::string task) { - if (!getTaskOptionValue(initContext, task, name, v, false)) { + if (!o2::common::core::getTaskOptionValue(initContext, task, name, v, false)) { LOG(fatal) << "Could not get " << name << " from " << task << " task"; } } diff --git a/Common/Core/PID/TPCPIDResponse.h b/Common/Core/PID/TPCPIDResponse.h index b905e62bc88..7831039f4d8 100644 --- a/Common/Core/PID/TPCPIDResponse.h +++ b/Common/Core/PID/TPCPIDResponse.h @@ -17,8 +17,8 @@ #ifndef COMMON_CORE_PID_TPCPIDRESPONSE_H_ #define COMMON_CORE_PID_TPCPIDRESPONSE_H_ -#include #include +#include #include #include diff --git a/Common/Core/TableHelper.h b/Common/Core/TableHelper.h index 950ed6d7633..7f3d9d0aa91 100644 --- a/Common/Core/TableHelper.h +++ b/Common/Core/TableHelper.h @@ -121,9 +121,4 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri } // namespace o2::common::core -using o2::common::core::enableFlagIfTableRequired; -using o2::common::core::getTaskOptionValue; -using o2::common::core::isTableRequiredInWorkflow; -using o2::common::core::printTablesInWorkflow; - #endif // COMMON_CORE_TABLEHELPER_H_ diff --git a/Common/Core/Zorro.cxx b/Common/Core/Zorro.cxx index cf830cf5c22..446e36e7f2b 100644 --- a/Common/Core/Zorro.cxx +++ b/Common/Core/Zorro.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/Common/Core/Zorro.h b/Common/Core/Zorro.h index f5cb580061a..29247b21c15 100644 --- a/Common/Core/Zorro.h +++ b/Common/Core/Zorro.h @@ -16,8 +16,8 @@ /// \author M Puccio /// -#ifndef EVENTFILTERING_ZORRO_H_ -#define EVENTFILTERING_ZORRO_H_ +#ifndef COMMON_CORE_ZORRO_H_ +#define COMMON_CORE_ZORRO_H_ #include "ZorroHelper.h" #include "ZorroSummary.h" @@ -103,4 +103,4 @@ class Zorro o2::ccdb::BasicCCDBManager* mCCDB = nullptr; }; -#endif // EVENTFILTERING_ZORRO_H_ +#endif // COMMON_CORE_ZORRO_H_ diff --git a/Common/Core/ZorroHelper.h b/Common/Core/ZorroHelper.h index e80a07ef994..919c68e8a52 100644 --- a/Common/Core/ZorroHelper.h +++ b/Common/Core/ZorroHelper.h @@ -10,8 +10,8 @@ // or submit itself to any jurisdiction. // -#ifndef EVENTFILTERING_ZORROHELPER_H_ -#define EVENTFILTERING_ZORROHELPER_H_ +#ifndef COMMON_CORE_ZORROHELPER_H_ +#define COMMON_CORE_ZORROHELPER_H_ #include #include @@ -21,4 +21,4 @@ struct ZorroHelper { ClassDefNV(ZorroHelper, 1); }; -#endif // EVENTFILTERING_ZORROHELPER_H_ +#endif // COMMON_CORE_ZORROHELPER_H_ diff --git a/Common/Core/ZorroSummary.h b/Common/Core/ZorroSummary.h index 51019aeef18..1f89d6bb95a 100644 --- a/Common/Core/ZorroSummary.h +++ b/Common/Core/ZorroSummary.h @@ -10,14 +10,15 @@ // or submit itself to any jurisdiction. // -#ifndef EVENTFILTERING_ZORROSUMMARY_H_ -#define EVENTFILTERING_ZORROSUMMARY_H_ +#ifndef COMMON_CORE_ZORROSUMMARY_H_ +#define COMMON_CORE_ZORROSUMMARY_H_ #include #include #include +#include #include #include #include @@ -80,4 +81,4 @@ class ZorroSummary : public TNamed ClassDef(ZorroSummary, 1); }; -#endif // EVENTFILTERING_ZORROSUMMARY_H_ +#endif // COMMON_CORE_ZORROSUMMARY_H_ diff --git a/Common/Core/fwdtrackUtilities.h b/Common/Core/fwdtrackUtilities.h index 883000d6696..53d5f74f931 100644 --- a/Common/Core/fwdtrackUtilities.h +++ b/Common/Core/fwdtrackUtilities.h @@ -18,18 +18,18 @@ #ifndef COMMON_CORE_FWDTRACKUTILITIES_H_ #define COMMON_CORE_FWDTRACKUTILITIES_H_ -#include "DetectorsBase/GeometryManager.h" -#include "Field/MagneticField.h" -#include "Framework/AnalysisDataModel.h" -#include "GlobalTracking/MatchGlobalFwd.h" -#include "MCHTracking/TrackExtrap.h" -#include "ReconstructionDataFormats/GlobalFwdTrack.h" -#include "ReconstructionDataFormats/TrackFwd.h" - -#include "Math/MatrixRepresentationsStatic.h" -#include "Math/SMatrix.h" -#include "TGeoGlobalMagField.h" - +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include #include #include diff --git a/Common/DataModel/EventSelection.h b/Common/DataModel/EventSelection.h index ee190189b4c..7000f5dc69e 100644 --- a/Common/DataModel/EventSelection.h +++ b/Common/DataModel/EventSelection.h @@ -17,10 +17,6 @@ #ifndef COMMON_DATAMODEL_EVENTSELECTION_H_ #define COMMON_DATAMODEL_EVENTSELECTION_H_ -#include "Common/CCDB/EventSelectionParams.h" // FIXME: remove -#include "Common/CCDB/RCTSelectionFlags.h" // FIXME: remove -#include "Common/CCDB/TriggerAliases.h" // FIXME: remove - #include namespace o2::aod diff --git a/Common/DataModel/PIDResponseITS.h b/Common/DataModel/PIDResponseITS.h index 7a13c4cbfa1..3edc7930c4b 100644 --- a/Common/DataModel/PIDResponseITS.h +++ b/Common/DataModel/PIDResponseITS.h @@ -142,7 +142,7 @@ struct ITSResponse { float p0_res = 0, p1_res = 0, p2_res = 0; float p0_res_Z2 = 0, p1_res_Z2 = 0, p2_res_Z2 = 0; o2::framework::LabeledArray itsParams; - getTaskOptionValue(initContext, "its-pid", "itsParams", itsParams, true); + o2::common::core::getTaskOptionValue(initContext, "its-pid", "itsParams", itsParams, true); auto data = itsParams.getData(); const int col = isMC ? 1 : 0; // 0 for Data, 1 for MC if (data.rows != 2 || data.cols != 12) { diff --git a/Common/DataModel/PIDResponseTOF.h b/Common/DataModel/PIDResponseTOF.h index 72007579e70..d4799b4a182 100644 --- a/Common/DataModel/PIDResponseTOF.h +++ b/Common/DataModel/PIDResponseTOF.h @@ -23,6 +23,7 @@ #include "Common/Core/PID/PIDTOF.h" #include "Common/Core/PID/PIDTOFParamService.h" +#include #include #include #include diff --git a/Common/DataModel/ZDCLightIons.h b/Common/DataModel/ZDCLightIons.h index c1a0dc668b5..b0e8e247622 100644 --- a/Common/DataModel/ZDCLightIons.h +++ b/Common/DataModel/ZDCLightIons.h @@ -16,10 +16,9 @@ #ifndef COMMON_DATAMODEL_ZDCLIGHTIONS_H_ #define COMMON_DATAMODEL_ZDCLIGHTIONS_H_ -#include "Common/DataModel/Centrality.h" +#include -#include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" +#include namespace o2::aod { diff --git a/Common/TableProducer/Converters/run2TinyToFullPID.cxx b/Common/TableProducer/Converters/run2TinyToFullPID.cxx index ecad9de711f..1550e899097 100644 --- a/Common/TableProducer/Converters/run2TinyToFullPID.cxx +++ b/Common/TableProducer/Converters/run2TinyToFullPID.cxx @@ -83,7 +83,7 @@ struct Run2TinyToFullPID { for (int i = 0; i < nTables; i++) { LOGF(info, "test %i", i); int f = enabledTables->get(tableNames[i].c_str(), "enable"); - enableFlagIfTableRequired(context, tableNames[i], f); + o2::common::core::enableFlagIfTableRequired(context, tableNames[i], f); if (f == 1) { mEnabledTables.push_back(i); } diff --git a/Common/TableProducer/PID/pidTOF.cxx b/Common/TableProducer/PID/pidTOF.cxx index b9efb4ca12f..8fe33443239 100644 --- a/Common/TableProducer/PID/pidTOF.cxx +++ b/Common/TableProducer/PID/pidTOF.cxx @@ -95,31 +95,31 @@ struct tofPid { void init(o2::framework::InitContext& initContext) { if (inheritFromBaseTask.value) { // Inheriting from base task - if (!getTaskOptionValue(initContext, "tof-signal", "ccdb-url", url.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "ccdb-url", url.value, true)) { LOG(fatal) << "Could not get ccdb-url from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-signal", "ccdb-timestamp", timestamp.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "ccdb-timestamp", timestamp.value, true)) { LOG(fatal) << "Could not get ccdb-timestamp from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "paramFileName", paramFileName.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "paramFileName", paramFileName.value, true)) { LOG(fatal) << "Could not get paramFileName from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "parametrizationPath", parametrizationPath.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "parametrizationPath", parametrizationPath.value, true)) { LOG(fatal) << "Could not get parametrizationPath from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "passName", passName.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "passName", passName.value, true)) { LOG(fatal) << "Could not get passName from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-signal", "timeShiftCCDBPath", timeShiftCCDBPath.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "timeShiftCCDBPath", timeShiftCCDBPath.value, true)) { LOG(fatal) << "Could not get timeShiftCCDBPath from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "loadResponseFromCCDB", loadResponseFromCCDB.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "loadResponseFromCCDB", loadResponseFromCCDB.value, true)) { LOG(fatal) << "Could not get loadResponseFromCCDB from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "enableTimeDependentResponse", enableTimeDependentResponse.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "enableTimeDependentResponse", enableTimeDependentResponse.value, true)) { LOG(fatal) << "Could not get enableTimeDependentResponse from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "fatalOnPassNotAvailable", fatalOnPassNotAvailable.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "fatalOnPassNotAvailable", fatalOnPassNotAvailable.value, true)) { LOG(fatal) << "Could not get fatalOnPassNotAvailable from tof-event-time task"; } } @@ -133,7 +133,7 @@ struct tofPid { // Checking the tables are requested in the workflow and enabling them for (int i = 0; i < nSpecies; i++) { int f = enableParticle->get(particleNames[i].c_str(), "Enable"); - enableFlagIfTableRequired(initContext, "pidTOF" + particleNames[i], f); + o2::common::core::enableFlagIfTableRequired(initContext, "pidTOF" + particleNames[i], f); if (f == 1) { mEnabledParticles.push_back(i); } diff --git a/Common/TableProducer/PID/pidTOFBase.cxx b/Common/TableProducer/PID/pidTOFBase.cxx index 50854085476..796cc8c4058 100644 --- a/Common/TableProducer/PID/pidTOFBase.cxx +++ b/Common/TableProducer/PID/pidTOFBase.cxx @@ -93,11 +93,11 @@ struct tofSignal { } // Checking that the table is requested in the workflow and enabling it - enableTable = isTableRequiredInWorkflow(initContext, "TOFSignal"); + enableTable = o2::common::core::isTableRequiredInWorkflow(initContext, "TOFSignal"); if (enableTable) { LOG(info) << "Table TOFSignal enabled!"; } - enableTableFlags = isTableRequiredInWorkflow(initContext, "pidTOFFlags"); + enableTableFlags = o2::common::core::isTableRequiredInWorkflow(initContext, "pidTOFFlags"); if (enableTableFlags) { LOG(info) << "Table pidTOFFlags enabled!"; } @@ -220,10 +220,10 @@ struct tofEventTime { void init(o2::framework::InitContext& initContext) { if (inheritFromBaseTask.value) { - if (!getTaskOptionValue(initContext, "tof-signal", "ccdb-url", url.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "ccdb-url", url.value, true)) { LOG(fatal) << "Could not get ccdb-url from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-signal", "ccdb-timestamp", timestamp.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "ccdb-timestamp", timestamp.value, true)) { LOG(fatal) << "Could not get ccdb-timestamp from tof-signal task"; } } @@ -253,14 +253,14 @@ struct tofEventTime { LOGF(fatal, "Cannot enable more process functions at the same time. Please choose one."); } // Checking that the table is requested in the workflow and enabling it - enableTable = isTableRequiredInWorkflow(initContext, "TOFEvTime"); + enableTable = o2::common::core::isTableRequiredInWorkflow(initContext, "TOFEvTime"); if (!enableTable) { LOG(info) << "Table for TOF Event time (TOFEvTime) is not required, disabling it"; return; } LOG(info) << "Table TOFEvTime enabled!"; - enableTableTOFOnly = isTableRequiredInWorkflow(initContext, "EvTimeTOFOnly"); + enableTableTOFOnly = o2::common::core::isTableRequiredInWorkflow(initContext, "EvTimeTOFOnly"); if (enableTableTOFOnly) { LOG(info) << "Table EvTimeTOFOnly enabled!"; } diff --git a/Common/TableProducer/PID/pidTOFFull.cxx b/Common/TableProducer/PID/pidTOFFull.cxx index e8c94641f18..3e145a49d30 100644 --- a/Common/TableProducer/PID/pidTOFFull.cxx +++ b/Common/TableProducer/PID/pidTOFFull.cxx @@ -95,31 +95,31 @@ struct tofPidFull { void init(o2::framework::InitContext& initContext) { if (inheritFromBaseTask.value) { // Inheriting from base task - if (!getTaskOptionValue(initContext, "tof-signal", "ccdb-url", url.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "ccdb-url", url.value, true)) { LOG(fatal) << "Could not get ccdb-url from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-signal", "ccdb-timestamp", timestamp.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "ccdb-timestamp", timestamp.value, true)) { LOG(fatal) << "Could not get ccdb-timestamp from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "paramFileName", paramFileName.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "paramFileName", paramFileName.value, true)) { LOG(fatal) << "Could not get paramFileName from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "parametrizationPath", parametrizationPath.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "parametrizationPath", parametrizationPath.value, true)) { LOG(fatal) << "Could not get parametrizationPath from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "passName", passName.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "passName", passName.value, true)) { LOG(fatal) << "Could not get passName from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-signal", "timeShiftCCDBPath", timeShiftCCDBPath.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-signal", "timeShiftCCDBPath", timeShiftCCDBPath.value, true)) { LOG(fatal) << "Could not get timeShiftCCDBPath from tof-signal task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "loadResponseFromCCDB", loadResponseFromCCDB.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "loadResponseFromCCDB", loadResponseFromCCDB.value, true)) { LOG(fatal) << "Could not get loadResponseFromCCDB from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "enableTimeDependentResponse", enableTimeDependentResponse.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "enableTimeDependentResponse", enableTimeDependentResponse.value, true)) { LOG(fatal) << "Could not get enableTimeDependentResponse from tof-event-time task"; } - if (!getTaskOptionValue(initContext, "tof-event-time", "fatalOnPassNotAvailable", fatalOnPassNotAvailable.value, true)) { + if (!o2::common::core::getTaskOptionValue(initContext, "tof-event-time", "fatalOnPassNotAvailable", fatalOnPassNotAvailable.value, true)) { LOG(fatal) << "Could not get fatalOnPassNotAvailable from tof-event-time task"; } } @@ -133,7 +133,7 @@ struct tofPidFull { // Checking the tables are requested in the workflow and enabling them for (int i = 0; i < nSpecies; i++) { int f = enableParticle->get(particleNames[i].c_str(), "Enable"); - enableFlagIfTableRequired(initContext, "pidTOFFull" + particleNames[i], f); + o2::common::core::enableFlagIfTableRequired(initContext, "pidTOFFull" + particleNames[i], f); if (f == 1) { mEnabledParticles.push_back(i); } diff --git a/Common/TableProducer/PID/pidTOFMerge.cxx b/Common/TableProducer/PID/pidTOFMerge.cxx index 79a2c02d655..66ebaf20f45 100644 --- a/Common/TableProducer/PID/pidTOFMerge.cxx +++ b/Common/TableProducer/PID/pidTOFMerge.cxx @@ -28,8 +28,6 @@ #include "Common/DataModel/PIDResponseTOF.h" #include -#include -#include #include #include #include @@ -46,16 +44,13 @@ #include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include @@ -123,11 +118,11 @@ struct tofSignal { LOG(debug) << "Initializing the tofSignal task"; tofResponse->initSetup(ccdb, initContext); // Checking that the table is requested in the workflow and enabling it - enableTableTOFSignal = isTableRequiredInWorkflow(initContext, "TOFSignal"); + enableTableTOFSignal = o2::common::core::isTableRequiredInWorkflow(initContext, "TOFSignal"); if (enableTableTOFSignal) { LOG(info) << "Table TOFSignal enabled!"; } - enableTablepidTOFFlags = isTableRequiredInWorkflow(initContext, "pidTOFFlags"); + enableTablepidTOFFlags = o2::common::core::isTableRequiredInWorkflow(initContext, "pidTOFFlags"); if (enableTablepidTOFFlags) { LOG(info) << "Table pidTOFFlags enabled!"; } @@ -273,14 +268,14 @@ struct tofEventTime { LOG(debug) << "Initializing the tofEventTime task"; tofResponse->initSetup(ccdb, initContext); // Checking that the table is requested in the workflow and enabling it - enableTableTOFEvTime = isTableRequiredInWorkflow(initContext, "TOFEvTime"); + enableTableTOFEvTime = o2::common::core::isTableRequiredInWorkflow(initContext, "TOFEvTime"); if (!enableTableTOFEvTime) { LOG(info) << "Table for TOF Event time (TOFEvTime) is not required, disabling it"; } LOG(info) << "Table TOFEvTime enabled!"; - enableTableEvTimeTOFOnly = isTableRequiredInWorkflow(initContext, "EvTimeTOFOnly"); + enableTableEvTimeTOFOnly = o2::common::core::isTableRequiredInWorkflow(initContext, "EvTimeTOFOnly"); if (enableTableEvTimeTOFOnly) { LOG(info) << "Table EvTimeTOFOnly enabled!"; } @@ -635,14 +630,14 @@ struct tofPidMerge { for (int i = 0; i < nSpecies; i++) { // First checking tiny int f = enableParticle->get(particleNames[i].c_str(), "Enable"); - enableFlagIfTableRequired(initContext, "pidTOF" + particleNames[i], f); + o2::common::core::enableFlagIfTableRequired(initContext, "pidTOF" + particleNames[i], f); if (f == 1) { mEnabledParticles.push_back(i); } // Then checking full tables f = enableParticle->get(particleNames[i].c_str(), "EnableFull"); - enableFlagIfTableRequired(initContext, "pidTOFFull" + particleNames[i], f); + o2::common::core::enableFlagIfTableRequired(initContext, "pidTOFFull" + particleNames[i], f); if (f == 1) { mEnabledParticlesFull.push_back(i); } @@ -692,8 +687,8 @@ struct tofPidMerge { } // Checking the TOF mass and TOF beta tables - enableTableBeta = isTableRequiredInWorkflow(initContext, "pidTOFbeta"); - enableTableMass = isTableRequiredInWorkflow(initContext, "pidTOFmass"); + enableTableBeta = o2::common::core::isTableRequiredInWorkflow(initContext, "pidTOFbeta"); + enableTableMass = o2::common::core::isTableRequiredInWorkflow(initContext, "pidTOFmass"); if (!enableTableBeta && !enableTableMass) { LOG(info) << "No table for TOF mass and beta is required. Disabling beta and mass tables"; diff --git a/Common/TableProducer/PID/pidTOFbeta.cxx b/Common/TableProducer/PID/pidTOFbeta.cxx index 8015dc3caea..1079532fe6a 100644 --- a/Common/TableProducer/PID/pidTOFbeta.cxx +++ b/Common/TableProducer/PID/pidTOFbeta.cxx @@ -69,10 +69,10 @@ struct tofPidBeta { bool enableTableMass = false; void init(o2::framework::InitContext& initContext) { - if (isTableRequiredInWorkflow(initContext, "pidTOFbeta")) { + if (o2::common::core::isTableRequiredInWorkflow(initContext, "pidTOFbeta")) { enableTableBeta = true; } - if (isTableRequiredInWorkflow(initContext, "pidTOFmass")) { + if (o2::common::core::isTableRequiredInWorkflow(initContext, "pidTOFmass")) { enableTableMass = true; } responseBeta.mExpectedResolution = expreso.value; diff --git a/Common/TableProducer/PID/pidTPC.cxx b/Common/TableProducer/PID/pidTPC.cxx index 1cdc936a175..6949c502736 100644 --- a/Common/TableProducer/PID/pidTPC.cxx +++ b/Common/TableProducer/PID/pidTPC.cxx @@ -175,7 +175,7 @@ struct tpcPid { response = new o2::pid::tpc::Response(); // Checking the tables are requested in the workflow and enabling them auto enableFlag = [&](const std::string& particle, Configurable& flag) { - enableFlagIfTableRequired(initContext, "pidTPC" + particle, flag); + o2::common::core::enableFlagIfTableRequired(initContext, "pidTPC" + particle, flag); }; enableFlag("FullEl", pidFullEl); enableFlag("FullMu", pidFullMu); @@ -198,7 +198,7 @@ struct tpcPid { enableFlag("Al", pidTinyAl); if (doprocessMcTuneOnData) { - enableFlagIfTableRequired(initContext, "mcTPCTuneOnData", enableTuneOnDataTable); + o2::common::core::enableFlagIfTableRequired(initContext, "mcTPCTuneOnData", enableTuneOnDataTable); } speciesNetworkFlags[0] = useNetworkEl; diff --git a/Common/TableProducer/PID/pidTPCBase.cxx b/Common/TableProducer/PID/pidTPCBase.cxx index 75a5add7820..1a86f0f70ec 100644 --- a/Common/TableProducer/PID/pidTPCBase.cxx +++ b/Common/TableProducer/PID/pidTPCBase.cxx @@ -51,7 +51,7 @@ struct PidMultiplicity { { LOG(info) << "Initializing PID Mult Task"; // Checking that the table is requested in the workflow and enabling it - enableTable = isTableRequiredInWorkflow(initContext, "PIDMults"); + enableTable = o2::common::core::isTableRequiredInWorkflow(initContext, "PIDMults"); if (enableTable) { LOG(info) << "Table TPC PID Multiplicity enabled!"; } diff --git a/Common/TableProducer/PID/pidTPCService.cxx b/Common/TableProducer/PID/pidTPCService.cxx index 974f29b2106..b1fd43cd7a0 100644 --- a/Common/TableProducer/PID/pidTPCService.cxx +++ b/Common/TableProducer/PID/pidTPCService.cxx @@ -24,7 +24,6 @@ #include "Common/Tools/PID/pidTPCModule.h" #include -#include #include #include #include diff --git a/Common/TableProducer/PID/pidTPCServiceRun2.cxx b/Common/TableProducer/PID/pidTPCServiceRun2.cxx index 642f3bf08b7..2ffd03bd23d 100644 --- a/Common/TableProducer/PID/pidTPCServiceRun2.cxx +++ b/Common/TableProducer/PID/pidTPCServiceRun2.cxx @@ -24,7 +24,6 @@ #include "Common/Tools/PID/pidTPCModule.h" #include -#include #include #include #include diff --git a/Common/TableProducer/centralityTable.cxx b/Common/TableProducer/centralityTable.cxx index 94fcf14ff2a..26fc9dab09a 100644 --- a/Common/TableProducer/centralityTable.cxx +++ b/Common/TableProducer/centralityTable.cxx @@ -216,7 +216,7 @@ struct CentralityTable { /* Checking the tables which are requested in the workflow and enabling them */ for (int i = 0; i < NTables; i++) { int f = enabledTables->get(tableNames[i].c_str(), "Enable"); - enableFlagIfTableRequired(context, tableNames[i], f); + o2::common::core::enableFlagIfTableRequired(context, tableNames[i], f); if (f == 1) { if (tableNames[i].find("Run2") != std::string::npos) { if (doprocessRun3) { diff --git a/Common/TableProducer/eseTableProducer.cxx b/Common/TableProducer/eseTableProducer.cxx index 01e3f8f6d83..d6915ab9419 100644 --- a/Common/TableProducer/eseTableProducer.cxx +++ b/Common/TableProducer/eseTableProducer.cxx @@ -16,7 +16,8 @@ #include "FFitWeights.h" -#include "Common/Core/TrackSelection.h" +#include "Common/CCDB/EventSelectionParams.h" +#include "Common/CCDB/TriggerAliases.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EseTable.h" #include "Common/DataModel/EventSelection.h" @@ -37,9 +38,11 @@ #include #include -#include +#include +#include #include +#include #include #include #include diff --git a/Common/TableProducer/eventSelectionServiceRun2.cxx b/Common/TableProducer/eventSelectionServiceRun2.cxx index 554ec1ff480..2af25cb83a0 100644 --- a/Common/TableProducer/eventSelectionServiceRun2.cxx +++ b/Common/TableProducer/eventSelectionServiceRun2.cxx @@ -36,7 +36,6 @@ #include #include -#include #include #include diff --git a/Common/TableProducer/fwdtrackextension.cxx b/Common/TableProducer/fwdtrackextension.cxx index 5ffdf73bf7a..c57880a7e4c 100644 --- a/Common/TableProducer/fwdtrackextension.cxx +++ b/Common/TableProducer/fwdtrackextension.cxx @@ -25,16 +25,18 @@ #include #include #include +#include #include +#include #include -#include +#include +#include #include #include #include #include -#include using namespace o2; using namespace o2::framework; diff --git a/Common/TableProducer/mcCollsExtra.cxx b/Common/TableProducer/mcCollsExtra.cxx index b975e0d335e..b5588317894 100644 --- a/Common/TableProducer/mcCollsExtra.cxx +++ b/Common/TableProducer/mcCollsExtra.cxx @@ -34,7 +34,6 @@ using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; -using std::array; using FullCollisions = soa::Join; diff --git a/Common/TableProducer/mftmchMatchingML.cxx b/Common/TableProducer/mftmchMatchingML.cxx index 9a5091d3eb9..da221cc076c 100644 --- a/Common/TableProducer/mftmchMatchingML.cxx +++ b/Common/TableProducer/mftmchMatchingML.cxx @@ -51,8 +51,6 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::ml; using o2::globaltracking::MatchingFunc_t; -using o2::track::TrackParCovFwd; -using o2::track::TrackParFwd; using SMatrix55 = ROOT::Math::SMatrix>; using SMatrix5 = ROOT::Math::SVector; diff --git a/Common/TableProducer/multiplicityTable.cxx b/Common/TableProducer/multiplicityTable.cxx index 53882bb9d77..2c9ff5df025 100644 --- a/Common/TableProducer/multiplicityTable.cxx +++ b/Common/TableProducer/multiplicityTable.cxx @@ -194,7 +194,7 @@ struct MultiplicityTable { bool tEnabled[Ntables] = {false}; for (int i = 0; i < Ntables; i++) { int f = enabledTables->get(tableNames[i].c_str(), "Enable"); - enableFlagIfTableRequired(context, tableNames[i], f); + o2::common::core::enableFlagIfTableRequired(context, tableNames[i], f); if (f == 1) { tEnabled[i] = true; mEnabledTables.push_back(i); diff --git a/Common/TableProducer/propagationService.cxx b/Common/TableProducer/propagationService.cxx index 9eb3dba4c10..25c951ef396 100644 --- a/Common/TableProducer/propagationService.cxx +++ b/Common/TableProducer/propagationService.cxx @@ -25,25 +25,22 @@ #include "PWGLF/Utils/strangenessBuilderModule.h" -#include "Common/Core/trackUtilities.h" -#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/PIDResponseTPC.h" #include "Common/Tools/StandardCCDBLoader.h" #include "Common/Tools/TrackPropagationModule.h" #include "Common/Tools/TrackTuner.h" -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "CommonConstants/GeomConstants.h" -#include "CommonUtils/NameConf.h" -#include "DataFormatsParameters/GRPMagField.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/Propagator.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/DCA.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include diff --git a/Common/TableProducer/propagationServiceRun2.cxx b/Common/TableProducer/propagationServiceRun2.cxx index a2075355200..85dd2d0942b 100644 --- a/Common/TableProducer/propagationServiceRun2.cxx +++ b/Common/TableProducer/propagationServiceRun2.cxx @@ -25,25 +25,20 @@ #include "PWGLF/Utils/strangenessBuilderModule.h" -#include "Common/Core/trackUtilities.h" -#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/PIDResponseTPC.h" #include "Common/Tools/StandardCCDBLoader.h" -#include "Common/Tools/TrackPropagationModule.h" -#include "Common/Tools/TrackTuner.h" - -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "CommonConstants/GeomConstants.h" -#include "CommonUtils/NameConf.h" -#include "DataFormatsParameters/GRPMagField.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/Propagator.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/DCA.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include diff --git a/Common/TableProducer/qVectorsTable.cxx b/Common/TableProducer/qVectorsTable.cxx index d7bab672261..273394a8e67 100644 --- a/Common/TableProducer/qVectorsTable.cxx +++ b/Common/TableProducer/qVectorsTable.cxx @@ -45,6 +45,8 @@ #include #include +#include +#include #include #include diff --git a/Common/TableProducer/trackDcaCovFillerRun2.cxx b/Common/TableProducer/trackDcaCovFillerRun2.cxx index 7fb77b96c87..126f18382ef 100644 --- a/Common/TableProducer/trackDcaCovFillerRun2.cxx +++ b/Common/TableProducer/trackDcaCovFillerRun2.cxx @@ -75,8 +75,8 @@ struct TrackDcaCovFillerRun2 { void init(o2::framework::InitContext& initContext) { // Checking if the tables are requested in the workflow and enabling them - fillTracksDCA = isTableRequiredInWorkflow(initContext, "TracksDCA"); - fillTracksDCACov = isTableRequiredInWorkflow(initContext, "TracksDCACov"); + fillTracksDCA = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksDCA"); + fillTracksDCACov = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksDCACov"); ccdb->setURL(ccdburl); ccdb->setCaching(true); diff --git a/Common/TableProducer/trackPropagation.cxx b/Common/TableProducer/trackPropagation.cxx index 703265a8dab..cb27b54210f 100644 --- a/Common/TableProducer/trackPropagation.cxx +++ b/Common/TableProducer/trackPropagation.cxx @@ -135,8 +135,8 @@ struct TrackPropagation { LOG(fatal) << "Exactly one process flag must be set to true. Please choose one."; } // Checking if the tables are requested in the workflow and enabling them - fillTracksDCA = isTableRequiredInWorkflow(initContext, "TracksDCA"); - fillTracksDCACov = isTableRequiredInWorkflow(initContext, "TracksDCACov"); + fillTracksDCA = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksDCA"); + fillTracksDCACov = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksDCACov"); ccdb->setURL(ccdburl); ccdb->setCaching(true); diff --git a/Common/TableProducer/trackselection.cxx b/Common/TableProducer/trackselection.cxx index 47b5cb3087b..2681c503ad5 100644 --- a/Common/TableProducer/trackselection.cxx +++ b/Common/TableProducer/trackselection.cxx @@ -68,8 +68,8 @@ struct TrackSelectionTask { void init(InitContext& initContext) { // Check which tables are used - enableFlagIfTableRequired(initContext, "TrackSelection", produceTable); - enableFlagIfTableRequired(initContext, "TrackSelectionExtension", produceFBextendedTable); + o2::common::core::enableFlagIfTableRequired(initContext, "TrackSelection", produceTable); + o2::common::core::enableFlagIfTableRequired(initContext, "TrackSelectionExtension", produceFBextendedTable); // Set up the track cuts switch (itsMatching) { diff --git a/Common/TableProducer/zdcExtraTableProducer.cxx b/Common/TableProducer/zdcExtraTableProducer.cxx index 500854b196b..57c35570779 100644 --- a/Common/TableProducer/zdcExtraTableProducer.cxx +++ b/Common/TableProducer/zdcExtraTableProducer.cxx @@ -33,6 +33,7 @@ #include #include +#include #include using namespace o2; diff --git a/Common/TableProducer/zdcTaskLightIons.cxx b/Common/TableProducer/zdcTaskLightIons.cxx index 2e496b3a5d2..3e188bb2dc3 100644 --- a/Common/TableProducer/zdcTaskLightIons.cxx +++ b/Common/TableProducer/zdcTaskLightIons.cxx @@ -14,21 +14,25 @@ /// \author chiara.oppedisano@cern.ch #include "Common/CCDB/EventSelectionParams.h" -#include "Common/CCDB/TriggerAliases.h" -#include "Common/Core/TrackSelection.h" -#include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" -#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/ZDCLightIons.h" #include +#include #include +#include #include +#include +#include +#include #include +#include #include +#include + using namespace o2; using namespace o2::aod; using namespace o2::framework; diff --git a/Common/Tasks/centralityStudy.cxx b/Common/Tasks/centralityStudy.cxx index e4a99dedb88..e62f68f3280 100644 --- a/Common/Tasks/centralityStudy.cxx +++ b/Common/Tasks/centralityStudy.cxx @@ -13,8 +13,7 @@ // Run 3 Pb-Pb centrality selections in 2023 data. It is compatible with // derived data. -#include "EventSelectionParams.h" - +#include "Common/CCDB/EventSelectionParams.h" #include "Common/CCDB/ctpRateFetcher.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/Multiplicity.h" diff --git a/Common/Tasks/qVectorsCorrection.cxx b/Common/Tasks/qVectorsCorrection.cxx index facbf144c4d..f54bcfd29f4 100644 --- a/Common/Tasks/qVectorsCorrection.cxx +++ b/Common/Tasks/qVectorsCorrection.cxx @@ -17,16 +17,6 @@ /// \brief ... /// -// C++/ROOT includes. -#include -#include - -#include - -#include -#include - -// o2Physics includes. #include "Common/CCDB/EventSelectionParams.h" #include "Common/Core/EventPlaneHelper.h" #include "Common/DataModel/EventSelection.h" @@ -43,7 +33,14 @@ #include #include -// o2 includes. +#include +#include +#include + +#include + +#include +#include using namespace o2; using namespace o2::framework; diff --git a/Common/Tasks/zdcTableReader.cxx b/Common/Tasks/zdcTableReader.cxx index b4b16094d49..07a581564cd 100644 --- a/Common/Tasks/zdcTableReader.cxx +++ b/Common/Tasks/zdcTableReader.cxx @@ -17,11 +17,15 @@ #include #include +#include #include +#include +#include +#include #include -#include -#include +#include +#include using namespace o2; using namespace o2::framework; diff --git a/Common/Tools/EventSelectionModule.h b/Common/Tools/EventSelectionModule.h index f808b70fb85..55ae5bfec2d 100644 --- a/Common/Tools/EventSelectionModule.h +++ b/Common/Tools/EventSelectionModule.h @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -181,8 +182,8 @@ class BcSelectionModule if (bcselOpts.amIneeded.value < 0) { int bcSelNeeded = -1, evSelNeeded = -1; bcselOpts.amIneeded.value = 0; - enableFlagIfTableRequired(context, "BcSels", bcSelNeeded); - enableFlagIfTableRequired(context, "EvSels", evSelNeeded); + o2::common::core::enableFlagIfTableRequired(context, "BcSels", bcSelNeeded); + o2::common::core::enableFlagIfTableRequired(context, "EvSels", evSelNeeded); if (bcSelNeeded == 1) { bcselOpts.amIneeded.value = 1; LOGF(info, "BC Selection / Autodetection for aod::BcSels: subscription present, will generate."); @@ -728,7 +729,7 @@ class EventSelectionModule evselOpts = external_evselopts; if (evselOpts.amIneeded.value < 0) { - enableFlagIfTableRequired(context, "EvSels", evselOpts.amIneeded.value); + o2::common::core::enableFlagIfTableRequired(context, "EvSels", evselOpts.amIneeded.value); if (evselOpts.amIneeded.value == 0) { LOGF(info, "Event Selection / Autodetecting for aod::EvSels: not required, won't generate."); return; @@ -1576,8 +1577,8 @@ class LumiModule if (lumiOpts.amIneeded.value < 0) { int bcSelNeeded = -1, evSelNeeded = -1; lumiOpts.amIneeded.value = 0; - enableFlagIfTableRequired(context, "BcSels", bcSelNeeded); - enableFlagIfTableRequired(context, "EvSels", evSelNeeded); + o2::common::core::enableFlagIfTableRequired(context, "BcSels", bcSelNeeded); + o2::common::core::enableFlagIfTableRequired(context, "EvSels", evSelNeeded); if (bcSelNeeded == 1) { lumiOpts.amIneeded.value = 1; LOGF(info, "Luminosity / Autodetection for aod::BcSels: subscription present, will generate."); diff --git a/Common/Tools/Multiplicity/macros/runCalibration.C b/Common/Tools/Multiplicity/macros/runCalibration.C index 7a5e76c12d0..e442e0ef401 100644 --- a/Common/Tools/Multiplicity/macros/runCalibration.C +++ b/Common/Tools/Multiplicity/macros/runCalibration.C @@ -13,6 +13,19 @@ /// \brief /// \author ALICE +#include "Common/Tools/Multiplicity/multCalibrator.h" +#include "Common/Tools/Multiplicity/multGlauberNBDFitter.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + #include /// @brief function to calibrate centrality @@ -42,9 +55,9 @@ void runCalibration(TString lInputFileName = "results/AR_544122_glauberNBD_ances c1->SetFrameFillStyle(0); c1->SetFillStyle(0); - cout << "Data bin width: " << hData->GetBinWidth(1) << endl; - cout << "Fit bin width: " << hFit->GetBinWidth(1) << endl; - cout << "Match range to use: " << matchRange << endl; + std::cout << "Data bin width: " << hData->GetBinWidth(1) << std::endl; + std::cout << "Fit bin width: " << hFit->GetBinWidth(1) << std::endl; + std::cout << "Match range to use: " << matchRange << std::endl; //____________________________________________ double anchorPointFraction = anchorPointPercentage / 100.f; @@ -66,7 +79,7 @@ void runCalibration(TString lInputFileName = "results/AR_544122_glauberNBD_ances double integralData = hData->Integral(ii + 1, hData->GetNbinsX() + 1); double integralAll = integralFit + integralData; - cout << "at bin #" << ii << ", integrated up to " << hData->GetBinLowEdge(ii + 1) << " fraction above this value is: " << integralData / integralAll << endl; + std::cout << "at bin #" << ii << ", integrated up to " << hData->GetBinLowEdge(ii + 1) << " fraction above this value is: " << integralData / integralAll << std::endl; anchorPoint = hData->GetBinLowEdge(ii + 1); if (integralData / integralAll < anchorPointFraction) @@ -80,8 +93,8 @@ void runCalibration(TString lInputFileName = "results/AR_544122_glauberNBD_ances hStitched->SetBinContent(ii, hFit->GetBinContent(ii)); } - cout << "Anchor point determined to be: " << anchorPoint << endl; - cout << "Preparing stitched histogram ... " << endl; + std::cout << "Anchor point determined to be: " << anchorPoint << std::endl; + std::cout << "Preparing stitched histogram ... " << std::endl; hFit->SetLineColor(kRed); hStitched->SetLineColor(kBlue); @@ -134,7 +147,7 @@ void runCalibration(TString lInputFileName = "results/AR_544122_glauberNBD_ances hFit->Write(); if (doNpartNcoll) { - cout << "Will now attempt to calculate % -> Np, Nc map..." << endl; + std::cout << "Will now attempt to calculate % -> Np, Nc map..." << std::endl; TProfile* hProfileNpart = new TProfile("hProfileNpart", "", 100, 0, 100); TProfile* hProfileNcoll = new TProfile("hProfileNcoll", "", 100, 0, 100); diff --git a/Common/Tools/Multiplicity/macros/runGlauberFit.C b/Common/Tools/Multiplicity/macros/runGlauberFit.C old mode 100755 new mode 100644 index fe33c209308..6e269046159 --- a/Common/Tools/Multiplicity/macros/runGlauberFit.C +++ b/Common/Tools/Multiplicity/macros/runGlauberFit.C @@ -13,7 +13,6 @@ /// \brief /// \author ALICE -#include "multCalibrator.h" #include "multGlauberNBDFitter.h" #include "TCanvas.h" @@ -21,15 +20,16 @@ #include "TF1.h" #include "TFile.h" #include "TGraph.h" -#include "TH1F.h" -#include "TH2F.h" #include "TLatex.h" -#include "TLegend.h" #include "TLine.h" -#include "TStopwatch.h" #include "TStyle.h" -#include "TSystem.h" #include "TTree.h" +#include +#include +#include + +#include +#include #include @@ -92,28 +92,28 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin gStyle->SetLineScalePS(1); gStyle->SetOptStat(0); - cout << "Starting!" << endl; + std::cout << "Starting!" << std::endl; TFile* file = new TFile(lInputFileName.Data(), "READ"); if (!file) - cout << "Problem with file!" << endl; + std::cout << "Problem with file!" << std::endl; TH1F* hV0Mfine = 0x0; hV0Mfine = (TH1F*)file->Get(Form("centrality-study/%s", histogramName.Data())); // disregard bin zero - cout << "Received bin zero content: " << hV0Mfine->GetBinContent(0) << ", will set to zero..." << endl; + std::cout << "Received bin zero content: " << hV0Mfine->GetBinContent(0) << ", will set to zero..." << std::endl; hV0Mfine->SetBinContent(0, 0); if (!hV0Mfine) - cout << "Problem with histogram!" << endl; + std::cout << "Problem with histogram!" << std::endl; - cout << "Input histogram has been received successfully! Information: " << endl; + std::cout << "Input histogram has been received successfully! Information: " << std::endl; - cout << "Counts: " << hV0Mfine->GetEntries() << endl; - cout << "NbinsX: " << hV0Mfine->GetNbinsX() << endl; - cout << "MaxX: " << hV0Mfine->GetBinLowEdge(hV0Mfine->GetNbinsX() + 1) << endl; + std::cout << "Counts: " << hV0Mfine->GetEntries() << std::endl; + std::cout << "NbinsX: " << hV0Mfine->GetNbinsX() << std::endl; + std::cout << "MaxX: " << hV0Mfine->GetBinLowEdge(hV0Mfine->GetNbinsX() + 1) << std::endl; - cout << "Creating output file..." << endl; + std::cout << "Creating output file..." << std::endl; TString lProcessedFileName = lInputFileName.Data(); TString lkMode = "fixedK"; if (lFreek) @@ -133,7 +133,7 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin // maximum fit range estimate (avoid tails) // may need adjusting Double_t lFitRangeMax = GetBoundaryForPercentile(hV0Mfine, 0.008); - cout << "Fit range max estimated from histogram: " << lFitRangeMax << endl; + std::cout << "Fit range max estimated from histogram: " << lFitRangeMax << std::endl; // minimum fit range estimate (guess region that may be unfittable) // may need adjusting @@ -147,7 +147,7 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin if (lFitRangeMax < maxRangeForTracks) lFitRange = fractionOfMaxBroader * GetBoundaryForPercentile(hV0Mfine, maxPercent); - cout << "Fit range min estimated from histogram: " << lFitRange << endl; + std::cout << "Fit range min estimated from histogram: " << lFitRange << std::endl; //____________________________________________ // rebinning matters @@ -155,7 +155,7 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin if (lFitRangeMax < maxRangeForTracks) rebinFactor = 1; - cout << "Creating rebinned histogram with rebin factor: " << rebinFactor << endl; + std::cout << "Creating rebinned histogram with rebin factor: " << rebinFactor << std::endl; hV0M->Rebin(rebinFactor); //____________________________________________ @@ -230,7 +230,7 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin // may require manual tuning depending on data! Double_t guessedMu = lFitRangeMax / 53968.4 * 0.175 * 3.53971e+02; - cout << "Guessed GlauberNBD mu value: " << guessedMu << endl; + std::cout << "Guessed GlauberNBD mu value: " << guessedMu << std::endl; fitfunc->SetParameter(0, guessedMu); // mu value fitfunc->SetParLimits(0, 0.25 * guessedMu, guessedMu * 2); @@ -276,18 +276,18 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin g->InitializeNpNc(); g->InitAncestor(); - cout << "WILL NOW ATTEMPT GLAUBER FIT" << endl; - cout << "This will take a while. Please wait..." << endl; + std::cout << "WILL NOW ATTEMPT GLAUBER FIT" << std::endl; + std::cout << "This will take a while. Please wait..." << std::endl; Int_t lFitStatus = 0; lFitStatus = g->DoFit(); Int_t lAttempts = 1; Int_t lMaxAttempts = 10; while (lAttempts < lMaxAttempts && lFitStatus == 0) { // insist on fitting until it works - cout << "Attempting fit again (" << lAttempts << " attempt)..." << endl; + std::cout << "Attempting fit again (" << lAttempts << " attempt)..." << std::endl; lFitStatus = g->DoFit(); } - cout << "Final fit status: " << lFitStatus << endl; + std::cout << "Final fit status: " << lFitStatus << std::endl; gStyle->SetOptStat(0); // Do a ratio plot @@ -300,16 +300,16 @@ int runGlauberFit(TString lInputFileName = "AnalysisResultsLHC24ar.root", TStrin fitfunc->SetLineWidth(2); fitfunc->Draw("same"); - cout << "Calculating glauber function histogram with the same binning as data input... please wait..." << endl; + std::cout << "Calculating glauber function histogram with the same binning as data input... please wait..." << std::endl; for (Int_t ii = 1; ii < hGlauber->GetNbinsX() + 1; ii++) { Double_t lFuncVal = FastIntegrate(fitfunc, hGlauber->GetBinLowEdge(ii), hGlauber->GetBinLowEdge(ii + 1), 4); hGlauber->SetBinContent(ii, lFuncVal); Int_t printEveryThisManyBins = 500; if (ii % printEveryThisManyBins == 0) { - cout << "At integration #" << ii << "/" << hGlauber->GetNbinsX() + 1 << "..." << endl; + std::cout << "At integration #" << ii << "/" << hGlauber->GetNbinsX() + 1 << "..." << std::endl; } } - cout << "Glauber function evaluated. Should go quickly now." << endl; + std::cout << "Glauber function evaluated. Should go quickly now." << std::endl; c1->cd(2); Float_t lLoRangeRatio = 0.35; diff --git a/Common/Tools/Multiplicity/macros/saveCorrelation.C b/Common/Tools/Multiplicity/macros/saveCorrelation.C index b23415639ba..8525aeed889 100644 --- a/Common/Tools/Multiplicity/macros/saveCorrelation.C +++ b/Common/Tools/Multiplicity/macros/saveCorrelation.C @@ -15,6 +15,12 @@ /// that performs Glauber + NBD fits. /// \author ALICE +#include +#include +#include +#include +#include + #include /// @brief function to save Npart x Ncoll correlation to file for glauber fits @@ -43,11 +49,11 @@ void saveCorrelation(TString filename = "gmc-PbPb-snn68.21-md0.40-nd-1.0-rc1-sma } if (!ntup) { - cout << "No tree found!" << endl; + std::cout << "No tree found!" << std::endl; return; } - cout << "Glauber tree entries: " << ntup->GetEntries() << endl; + std::cout << "Glauber tree entries: " << ntup->GetEntries() << std::endl; TFile* fout = new TFile(outputFile.Data(), "RECREATE"); diff --git a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx index 44d7cbe79de..ebabca167a1 100644 --- a/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx +++ b/Common/Tools/Multiplicity/multGlauberNBDFitter.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include diff --git a/Common/Tools/PID/handleParamTPCResponse.cxx b/Common/Tools/PID/handleParamTPCResponse.cxx index 74ade0f5f5a..7b23f6b79dd 100644 --- a/Common/Tools/PID/handleParamTPCResponse.cxx +++ b/Common/Tools/PID/handleParamTPCResponse.cxx @@ -24,7 +24,12 @@ #include #include -#include +#include // IWYU pragma: keep +#include +#include +#include +#include +#include #include #include diff --git a/Common/Tools/PID/pidTPCModule.h b/Common/Tools/PID/pidTPCModule.h index efe9dc56ded..24c7683b70c 100644 --- a/Common/Tools/PID/pidTPCModule.h +++ b/Common/Tools/PID/pidTPCModule.h @@ -26,17 +26,19 @@ #include "Common/Core/PID/TPCPIDResponse.h" #include "Common/Core/TableHelper.h" #include "Common/DataModel/PIDResponseTPC.h" -#include "Common/TableProducer/PID/pidTPCBase.h" +#include "Common/TableProducer/PID/pidTPCBase.h" // IWYU pragma: keep #include "Tools/ML/model.h" #include #include #include #include +#include #include #include #include +#include #include // IWYU pragma: keep (do not replace with TMatrixDfwd.h) #include #include @@ -51,6 +53,8 @@ #include #include +#include + namespace o2::aod { namespace pid @@ -299,11 +303,11 @@ class pidTPCModule // initialize PID response response = new o2::pid::tpc::Response(); - enableFlagIfTableRequired(context, "DEdxsCorrected", pidTPCopts.savedEdxsCorrected); + o2::common::core::enableFlagIfTableRequired(context, "DEdxsCorrected", pidTPCopts.savedEdxsCorrected); // Checking the tables are requested in the workflow and enabling them auto enableFlag = [&](const std::string particle, o2::framework::Configurable& flag) { - enableFlagIfTableRequired(context, "pidTPC" + particle, flag); + o2::common::core::enableFlagIfTableRequired(context, "pidTPC" + particle, flag); }; enableFlag("FullEl", pidTPCopts.pidFullEl); enableFlag("FullMu", pidTPCopts.pidFullMu); @@ -326,7 +330,7 @@ class pidTPCModule enableFlag("Al", pidTPCopts.pidTinyAl); if (metadataInfo.isMC()) { - enableFlagIfTableRequired(context, "mcTPCTuneOnData", pidTPCopts.enableTuneOnDataTable); + o2::common::core::enableFlagIfTableRequired(context, "mcTPCTuneOnData", pidTPCopts.enableTuneOnDataTable); } speciesNetworkFlags[0] = pidTPCopts.useNetworkEl; diff --git a/Common/Tools/TrackPropagationModule.h b/Common/Tools/TrackPropagationModule.h index 22474641354..2fe22cd0931 100644 --- a/Common/Tools/TrackPropagationModule.h +++ b/Common/Tools/TrackPropagationModule.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -111,10 +112,10 @@ class TrackPropagationModule void init(TConfigurableGroup const& cGroup, TrackTuner& trackTunerObj, THistoRegistry& registry, TInitContext& initContext) { // Checking if the tables are requested in the workflow and enabling them - fillTracks = isTableRequiredInWorkflow(initContext, "Tracks"); - fillTracksCov = isTableRequiredInWorkflow(initContext, "TracksCov"); - fillTracksDCA = isTableRequiredInWorkflow(initContext, "TracksDCA"); - fillTracksDCACov = isTableRequiredInWorkflow(initContext, "TracksDCACov"); + fillTracks = o2::common::core::isTableRequiredInWorkflow(initContext, "Tracks"); + fillTracksCov = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksCov"); + fillTracksDCA = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksDCA"); + fillTracksDCACov = o2::common::core::isTableRequiredInWorkflow(initContext, "TracksDCACov"); // enable Tracks in case Tracks have been requested if (fillTracksDCA && !fillTracks) { diff --git a/Common/Tools/TrackTuner.h b/Common/Tools/TrackTuner.h index 01ca6930d89..a9c90ab828d 100644 --- a/Common/Tools/TrackTuner.h +++ b/Common/Tools/TrackTuner.h @@ -21,7 +21,6 @@ #include #include #include -#include // FIXME: remove #include #include #include