diff --git a/Detectors/ITSMFT/ITS/macros/test/CheckClusters.C b/Detectors/ITSMFT/ITS/macros/test/CheckClusters.C index 3f17e42b3a712..d4707bd683a30 100644 --- a/Detectors/ITSMFT/ITS/macros/test/CheckClusters.C +++ b/Detectors/ITSMFT/ITS/macros/test/CheckClusters.C @@ -1,6 +1,18 @@ /// \file CheckClusters.C /// \brief Simple macro to check ITSU clusters +#include +#include +#include +#include +#include +#include + +#include "ITSMFTBase/SegmentationAlpide.h" +#include "ITSBase/GeometryTGeo.h" +#include "DataFormatsITSMFT/CompCluster.h" +#include "DataFormatsITSMFT/TopologyDictionary.h" +#include "ITSMFTSimulation/Hit.h" #if !defined(__CLING__) || defined(__ROOTCLING__) #include #include diff --git a/Detectors/ITSMFT/ITS/macros/test/CheckDuplicates.C b/Detectors/ITSMFT/ITS/macros/test/CheckDuplicates.C index 2736a79beb528..abe707225ab30 100644 --- a/Detectors/ITSMFT/ITS/macros/test/CheckDuplicates.C +++ b/Detectors/ITSMFT/ITS/macros/test/CheckDuplicates.C @@ -23,11 +23,9 @@ #include #include -#include "DataFormatsITSMFT/ROFRecord.h" #include "DataFormatsITS/TrackITS.h" -#include "Framework/Logger.h" - #endif +#include "DataFormatsITSMFT/ROFRecord.h" void CheckDuplicates(TString tracfile = "./o2trac_its.root", TString output = ".", TString rootSave = "", int rofStart = 0, int rofEnd = -1, int windowSize = 2, bool includeSame = 1) { diff --git a/Detectors/ITSMFT/ITS/macros/test/CheckTracks.C b/Detectors/ITSMFT/ITS/macros/test/CheckTracks.C index 79b2f52ad29df..11b03531d4af3 100644 --- a/Detectors/ITSMFT/ITS/macros/test/CheckTracks.C +++ b/Detectors/ITSMFT/ITS/macros/test/CheckTracks.C @@ -15,16 +15,16 @@ #include "TGeoGlobalMagField.h" #include "Field/MagneticField.h" -#include "DetectorsBase/Propagator.h" #include "ITSBase/GeometryTGeo.h" -#include "SimulationDataFormat/TrackReference.h" +#include "DataFormatsITS/TrackITS.h" #include "SimulationDataFormat/MCTrack.h" #include "SimulationDataFormat/MCCompLabel.h" -#include "SimulationDataFormat/MCTruthContainer.h" -#include "DataFormatsITSMFT/CompCluster.h" -#include "DataFormatsITS/TrackITS.h" +#include "SimulationDataFormat/TrackReference.h" +#include "DetectorsBase/Propagator.h" #endif +#include "DataFormatsITSMFT/CompCluster.h" +#include "SimulationDataFormat/MCTruthContainer.h" using namespace std; diff --git a/Detectors/ITSMFT/ITS/macros/test/CheckTracksCA.C b/Detectors/ITSMFT/ITS/macros/test/CheckTracksCA.C index f1a3d2af4e469..7312a6845f1a3 100644 --- a/Detectors/ITSMFT/ITS/macros/test/CheckTracksCA.C +++ b/Detectors/ITSMFT/ITS/macros/test/CheckTracksCA.C @@ -21,10 +21,10 @@ #include "SimulationDataFormat/MCTrack.h" #include "SimulationDataFormat/MCCompLabel.h" #include "SimulationDataFormat/MCTruthContainer.h" -#include "DataFormatsITSMFT/CompCluster.h" #include "DataFormatsITS/TrackITS.h" #endif +#include "DataFormatsITSMFT/CompCluster.h" using namespace std; diff --git a/Detectors/ITSMFT/ITS/macros/test/CheckVertices.C b/Detectors/ITSMFT/ITS/macros/test/CheckVertices.C index f348272425b77..2da3ed9b97a28 100644 --- a/Detectors/ITSMFT/ITS/macros/test/CheckVertices.C +++ b/Detectors/ITSMFT/ITS/macros/test/CheckVertices.C @@ -29,6 +29,7 @@ #include "DataFormatsITSMFT/ROFRecord.h" #include "DataFormatsITS/TrackITS.h" #endif +#include "DataFormatsITSMFT/CompCluster.h" o2::MCCompLabel getMainLabel(std::vector& labs); @@ -335,4 +336,4 @@ void CheckVertices(const int dumprof = -1, std::string path = "tf1/", std::strin LOGP(info, "Summary:"); LOGP(info, "Found {} vertices in {} usable out of {} simulated", nvt, nevts, simVerts.size()); LOGP(info, "Average good vertexing efficiency: {}%", (addeff / (float)nroffilled) * 100); -} \ No newline at end of file +} diff --git a/Detectors/ITSMFT/ITS/macros/test/run_digi2rawVarPage_its.C b/Detectors/ITSMFT/ITS/macros/test/run_digi2rawVarPage_its.C index 253726f9c90fe..1c682fc25fff1 100644 --- a/Detectors/ITSMFT/ITS/macros/test/run_digi2rawVarPage_its.C +++ b/Detectors/ITSMFT/ITS/macros/test/run_digi2rawVarPage_its.C @@ -12,9 +12,9 @@ #include "DataFormatsITSMFT/ROFRecord.h" #include "DataFormatsParameters/GRPObject.h" #include "DataFormatsITSMFT/Digit.h" -#include "ITSMFTSimulation/MC2RawEncoder.h" #endif +#include "ITSMFTSimulation/MC2RawEncoder.h" // demo macro the MC->raw conversion with new (variable page size) format void setupLinks(o2::itsmft::MC2RawEncoder& m2r, const std::string& outPrefix); diff --git a/Detectors/MUON/MCH/Geometry/Test/misAlign.C b/Detectors/MUON/MCH/Geometry/Test/misAlign.C index 38a4a7c32eaeb..c49fe5717a36b 100644 --- a/Detectors/MUON/MCH/Geometry/Test/misAlign.C +++ b/Detectors/MUON/MCH/Geometry/Test/misAlign.C @@ -1,21 +1,14 @@ +#include "DetectorsBase/MaterialManager.h" +#include "DetectorsCommonDataFormats/AlignParam.h" #if !defined(__CLING__) || defined(__ROOTCLING__) //#include "MCHGeometryTest/Helpers.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/MaterialManager.h" -#include "DetectorsCommonDataFormats/AlignParam.h" #include "DetectorsCommonDataFormats/DetID.h" #include "DetectorsCommonDataFormats/DetectorNameConf.h" #include "MCHGeometryMisAligner/MisAligner.h" #include "MCHGeometryTransformer/Transformations.h" -#include "MCHGeometryTest/Helpers.h" -#include "MCHGeometryCreator/Geometry.h" -#include "CCDB/CcdbApi.h" - -#include "MathUtils/Cartesian.h" -#include "Math/GenVector/Cartesian3D.h" #include "TGLRnrCtx.h" #include "TGLViewer.h" #include "TGeoManager.h" @@ -26,7 +19,13 @@ #include #include +#include "MCHGeometryTest/Helpers.h" +#include "MCHGeometryCreator/Geometry.h" +#include "CCDB/CcdbApi.h" +#include "MathUtils/Cartesian.h" +#include "Math/GenVector/Cartesian3D.h" +#include "DetectorsBase/GeometryManager.h" #endif // void misAlign() diff --git a/Detectors/TOF/prototyping/convertTreeTo02object.C b/Detectors/TOF/prototyping/convertTreeTo02object.C index 060072ef21e6a..2e46e9842bf33 100644 --- a/Detectors/TOF/prototyping/convertTreeTo02object.C +++ b/Detectors/TOF/prototyping/convertTreeTo02object.C @@ -3,8 +3,8 @@ #include "TTree.h" #include "TLeaf.h" #include -#include "DataFormatsTOF/CalibInfoTOF.h" #endif +#include "DataFormatsTOF/CalibInfoTOF.h" void convertTreeTo02object() { diff --git a/Detectors/TOF/prototyping/findTOFclusterFromLabel.C b/Detectors/TOF/prototyping/findTOFclusterFromLabel.C index 6dc6299f3d46b..67ed487ecebc1 100644 --- a/Detectors/TOF/prototyping/findTOFclusterFromLabel.C +++ b/Detectors/TOF/prototyping/findTOFclusterFromLabel.C @@ -1,16 +1,16 @@ #if !defined(__CLING__) || defined(__ROOTCLING__) #include "TFile.h" #include "TTree.h" -#include "DataFormatsTOF/Cluster.h" -#include "SimulationDataFormat/MCTruthContainer.h" #include "SimulationDataFormat/MCCompLabel.h" #include "SimulationDataFormat/MCTrack.h" -#include "DataFormatsTPC/TrackTPC.h" #include "ReconstructionDataFormats/TrackTPCITS.h" #include "CommonDataFormat/EvIndex.h" #include "TOFBase/Geo.h" +#include "DataFormatsTPC/TrackTPC.h" #include "TOFBase/Digit.h" #endif +#include "SimulationDataFormat/MCTruthContainer.h" +#include "DataFormatsTOF/Cluster.h" void findTOFclusterFromLabel(int trackID, int eventID = 0, int sourceID = 0) { diff --git a/Detectors/TPC/simulation/macro/toyCluster.C b/Detectors/TPC/simulation/macro/toyCluster.C index 2087a7773fe22..b7c5f74633cfc 100644 --- a/Detectors/TPC/simulation/macro/toyCluster.C +++ b/Detectors/TPC/simulation/macro/toyCluster.C @@ -59,6 +59,7 @@ #include "TPCSimulation/GEMAmplification.h" #endif #include +#include "DataFormatsTPC/Helpers.h" using namespace o2::tpc; void fillTPCHits(const float theta, const float phi, const float dedx, std::vector& hitGroupSector, std::pair& trackInfo); diff --git a/Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C b/Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C index cd69cb9c2cf3c..c433ab855b70d 100755 --- a/Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C +++ b/Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C @@ -43,8 +43,9 @@ #include "SimulationDataFormat/MCCompLabel.h" #include "SimulationDataFormat/MCEventHeader.h" #include "SimulationDataFormat/MCTrack.h" -#include "SimulationDataFormat/MCTruthContainer.h" #endif +#define ENABLE_UPGRADES +#include "SimulationDataFormat/MCTruthContainer.h" static constexpr int nLayers = 4; // 3 Layers + 1 combined outer layer diff --git a/Detectors/Upgrades/ITS3/macros/test/CheckHits.C b/Detectors/Upgrades/ITS3/macros/test/CheckHits.C index bb1a8073fc646..5c0f945898471 100644 --- a/Detectors/Upgrades/ITS3/macros/test/CheckHits.C +++ b/Detectors/Upgrades/ITS3/macros/test/CheckHits.C @@ -31,12 +31,12 @@ #include #include +#endif #define ENABLE_UPGRADES #include "CommonConstants/MathConstants.h" #include "ITS3Base/SegmentationSuperAlpide.h" #include "ITSMFTSimulation/Hit.h" #include "SimulationDataFormat/MCTrack.h" -#endif using o2::itsmft::Hit; diff --git a/Detectors/Upgrades/ITS3/macros/test/CheckTracksITS3.C b/Detectors/Upgrades/ITS3/macros/test/CheckTracksITS3.C index 8b0383246e7fc..c04dae6309d7e 100644 --- a/Detectors/Upgrades/ITS3/macros/test/CheckTracksITS3.C +++ b/Detectors/Upgrades/ITS3/macros/test/CheckTracksITS3.C @@ -12,7 +12,17 @@ /// \file CheckTracksITS3.C /// \brief Simple macro to check ITS3 tracks +#include #if !defined(__CLING__) || defined(__ROOTCLING__) +#include + +#include "DataFormatsITS/TrackITS.h" +#include "TGeoGlobalMagField.h" +#include "Field/MagneticField.h" +#include "DetectorsBase/Propagator.h" +#include "ITSBase/GeometryTGeo.h" +#include "DataFormatsITS3/CompCluster.h" +#endif #include #include #include @@ -26,23 +36,13 @@ #include #include #include -#include - -#include "TGeoGlobalMagField.h" -#include "Field/MagneticField.h" -#include "DataFormatsITS3/CompCluster.h" #include "DataFormatsITSMFT/CompCluster.h" -#include "DataFormatsITS/TrackITS.h" -#include "DetectorsBase/Propagator.h" -#include "ITSBase/GeometryTGeo.h" #include "SimulationDataFormat/TrackReference.h" #include "SimulationDataFormat/MCTrack.h" #include "SimulationDataFormat/MCCompLabel.h" #include "SimulationDataFormat/MCTruthContainer.h" #include "SimulationDataFormat/MCEventHeader.h" -#endif - using namespace std; struct ParticleInfo { diff --git a/Detectors/ZDC/macro/readZDCDigits.C b/Detectors/ZDC/macro/readZDCDigits.C index b5baa77d0ef99..d6987ecc98994 100644 --- a/Detectors/ZDC/macro/readZDCDigits.C +++ b/Detectors/ZDC/macro/readZDCDigits.C @@ -5,13 +5,13 @@ #include #include #include -#include "DataFormatsZDC/BCData.h" #include "DataFormatsZDC/ChannelData.h" #include "SimulationDataFormat/MCTruthContainer.h" #include "SimulationDataFormat/MCCompLabel.h" #endif +#include "DataFormatsZDC/BCData.h" #include "DataFormatsZDC/MCLabel.h" #include "Framework/Logger.h" diff --git a/Framework/CHANGELOG.md b/Framework/CHANGELOG.md new file mode 100644 index 0000000000000..2973174f81d28 --- /dev/null +++ b/Framework/CHANGELOG.md @@ -0,0 +1,4 @@ +* Improved C++20 support. Most of the macros which were failing when C++20 + support is enabled now seem to work fine. The issue seems to be related to + some forward declaration logic which seems to be not working correctly in + ROOT 6.30.01. The issue is discussed in and it seems to be not trivial to fix with the current ROOT version. diff --git a/macro/run_clus_tpc.C b/macro/run_clus_tpc.C index ce703e65ae999..950eb45f68851 100644 --- a/macro/run_clus_tpc.C +++ b/macro/run_clus_tpc.C @@ -14,8 +14,8 @@ #include "FairParRootFileIo.h" #include -#include "TPCReconstruction/ClustererTask.h" #endif +#include "TPCReconstruction/ClustererTask.h" void run_clus_tpc(std::string outputfile = "o2clus_tpc.root", std::string inputfile = "o2dig.root", std::string paramfile = "o2sim_par.root", bool isContinuous = true, unsigned threads = 0);