From bf24af9d61582086a6c4186f43d6f9585513bcad Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 17:51:17 +0200 Subject: [PATCH 1/4] [eg] deprecate cfortran and Hepevt headers that are implementation details --- README/ReleaseNotes/v642/index.md | 1 + montecarlo/eg/inc/Hepevt.h | 4 ++++ montecarlo/eg/inc/cfortran.h | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index 61c80c9c5b822..4a91fce71c581 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -83,6 +83,7 @@ The `TMVA_SOFIE_GNN` tutorials have been migrated to this workflow and produce i * The header `Riostream.h` is deprecated and will be removed after ROOT 6.44, use `` or `` or `` instead. * The header `Rstrstream.h` is deprecated and will be removed after ROOT 6.44, use instead ``. * The headers `ZipLZMA.h`, `ZipLZ4.h` and `ZipZSTD.h` are deprecated and will be removed in ROOT 6.46, use instead the public methods in the `RZip.h` interface. +* The headers `Hepevt.h` and `cfortran.h` are deprecated and will no longer be part of ROOT public installed headers in ROOT 6.44, use instead the `TGenerator.h` public interface or the `cfortran.h` header of the `cfitsio` library, respectively. ## Build System diff --git a/montecarlo/eg/inc/Hepevt.h b/montecarlo/eg/inc/Hepevt.h index ca530ceb997d8..26415da2ad8b1 100644 --- a/montecarlo/eg/inc/Hepevt.h +++ b/montecarlo/eg/inc/Hepevt.h @@ -13,6 +13,10 @@ #include "Rtypes.h" +#ifndef ROOT_TGenerator_cxx +#warning "This header is an implementation detail, is deprecated and will be removed in ROOT 6.44. Use instead the `TGenerator.h` public interface" +#endif + #include "cfortran.h" extern "C" { diff --git a/montecarlo/eg/inc/cfortran.h b/montecarlo/eg/inc/cfortran.h index 1416f39a5fabc..e78d548d7a596 100644 --- a/montecarlo/eg/inc/cfortran.h +++ b/montecarlo/eg/inc/cfortran.h @@ -5,6 +5,10 @@ #ifndef __CFORTRAN_LOADED #define __CFORTRAN_LOADED +#ifndef ROOT_TGenerator_cxx +#warning "This header is an implementation detail, is deprecated and will be removed in ROOT 6.44. Use instead the `cfortran.h` header from `cfitsio` library" +#endif + /* THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING, From f7a54b95a74ec15e7c13c5f250b8f0e65797909e Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 18:15:48 +0200 Subject: [PATCH 2/4] [eg] do not warn when using it from cxx remove this when moving from public to private interface after deprecation --- montecarlo/eg/src/TGenerator.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/montecarlo/eg/src/TGenerator.cxx b/montecarlo/eg/src/TGenerator.cxx index 0d8c41702e26e..b07ca453aa6a1 100644 --- a/montecarlo/eg/src/TGenerator.cxx +++ b/montecarlo/eg/src/TGenerator.cxx @@ -142,6 +142,7 @@ This is especially useful for example with TVirtualMC or similar. #include "TParticlePDG.h" #include "TParticle.h" #include "TObjArray.h" +#define ROOT_TGenerator_cxx #include "Hepevt.h" #include "TVirtualPad.h" #include "TView.h" From 1d7365b6962b2b76c2ed61b27bddf44c865e8d83 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 18:17:37 +0200 Subject: [PATCH 3/4] [eg] do not warn when generating dictionary --- montecarlo/eg/inc/Hepevt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/montecarlo/eg/inc/Hepevt.h b/montecarlo/eg/inc/Hepevt.h index 26415da2ad8b1..984534e1326e0 100644 --- a/montecarlo/eg/inc/Hepevt.h +++ b/montecarlo/eg/inc/Hepevt.h @@ -13,7 +13,7 @@ #include "Rtypes.h" -#ifndef ROOT_TGenerator_cxx +#if !defined(ROOT_TGenerator_cxx) && !defined(G__DICTIONARY) #warning "This header is an implementation detail, is deprecated and will be removed in ROOT 6.44. Use instead the `TGenerator.h` public interface" #endif From 818bf645490334f4976e283106d2796a20ad6eb2 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 18:18:15 +0200 Subject: [PATCH 4/4] [eg,cfitsio] do not warn when generating dict --- montecarlo/eg/inc/cfortran.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/montecarlo/eg/inc/cfortran.h b/montecarlo/eg/inc/cfortran.h index e78d548d7a596..eaa640a428e19 100644 --- a/montecarlo/eg/inc/cfortran.h +++ b/montecarlo/eg/inc/cfortran.h @@ -5,7 +5,7 @@ #ifndef __CFORTRAN_LOADED #define __CFORTRAN_LOADED -#ifndef ROOT_TGenerator_cxx +#if !defined(ROOT_TGenerator_cxx) && !defined(G__DICTIONARY) #warning "This header is an implementation detail, is deprecated and will be removed in ROOT 6.44. Use instead the `cfortran.h` header from `cfitsio` library" #endif