diff --git a/SimDataFormats/GeneratorProducts/src/classes.h b/SimDataFormats/GeneratorProducts/src/classes.h index 63a8fcc3b0af5..1d39debbf6ea8 100644 --- a/SimDataFormats/GeneratorProducts/src/classes.h +++ b/SimDataFormats/GeneratorProducts/src/classes.h @@ -39,3 +39,19 @@ namespace hepmc_rootio { } } } // namespace hepmc_rootio + +// needed for backwards compatibility for auto_ptr +namespace pdfinfo_autoptr_rootio { + // Following the pattern in DataFormats/TestObjects/src/classes.h + template + struct deprecated_auto_ptr { + // We use compat_auto_ptr only to assign the wrapped raw pointer + // to a unique pointer in an I/O customization rule. + // Therefore, we don't delete on destruction (because ownership + // gets transferred to the unique pointer). + + // ~deprecated_auto_ptr() { delete _M_ptr; } + + T* _M_ptr = nullptr; + }; +} // namespace pdfinfo_autoptr_rootio diff --git a/SimDataFormats/GeneratorProducts/src/classes_def.xml b/SimDataFormats/GeneratorProducts/src/classes_def.xml index f2e9d93f012f6..80dce92c1be88 100644 --- a/SimDataFormats/GeneratorProducts/src/classes_def.xml +++ b/SimDataFormats/GeneratorProducts/src/classes_def.xml @@ -121,7 +121,8 @@ - + + @@ -193,8 +194,8 @@ - - + + @@ -241,8 +242,8 @@ - - + +