From 6026db420a2396b6c048cff039526373a109c7ab Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 29 Aug 2025 21:44:24 +0200 Subject: [PATCH 1/5] List PortableTestHost{Collection,Object} nested type aliases before their aliased types in classes_def.xml In ROOT presently the type alias gets listed in the rootmap file only if the alias is requested before the real type. Having the type alias in the rootmap file is necessary to avoid header parsing for the execution of the read rules that use the type alias names. --- .../PortableTestObjects/src/classes_def.xml | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/DataFormats/PortableTestObjects/src/classes_def.xml b/DataFormats/PortableTestObjects/src/classes_def.xml index 19d897f4bfd90..01157baa8b17a 100644 --- a/DataFormats/PortableTestObjects/src/classes_def.xml +++ b/DataFormats/PortableTestObjects/src/classes_def.xml @@ -1,15 +1,29 @@ + + - + + + + + + + + + + + + + @@ -18,9 +32,6 @@ - - - @@ -35,9 +46,6 @@ --> - - - From 69ddd79acea0d5243c2095302fd6e9d36d70b1d8 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 30 Dec 2025 21:17:25 +0100 Subject: [PATCH 2/5] Add class version and checksum for TestStruct --- DataFormats/PortableTestObjects/src/classes_def.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DataFormats/PortableTestObjects/src/classes_def.xml b/DataFormats/PortableTestObjects/src/classes_def.xml index 01157baa8b17a..0faaba6a9e74a 100644 --- a/DataFormats/PortableTestObjects/src/classes_def.xml +++ b/DataFormats/PortableTestObjects/src/classes_def.xml @@ -6,9 +6,14 @@ - + + + + + + + - From 7e8047fd72c05c99ecf1d56026711e35a9553600 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 29 Dec 2025 18:51:41 +0100 Subject: [PATCH 3/5] Include the necessity of dictionaries for the nested type alias in README --- DataFormats/Portable/README.md | 5 +++++ DataFormats/Portable/scripts/portableHostCollectionHints | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DataFormats/Portable/README.md b/DataFormats/Portable/README.md index f496c03659597..56922621e380d 100644 --- a/DataFormats/Portable/README.md +++ b/DataFormats/Portable/README.md @@ -34,6 +34,8 @@ would create the file `classes.cc` with the content: SET_PORTABLEHOSTOBJECT_READ_RULES(portabletest::TestHostObject); ``` +**Note:** The dictionary for `portabletest::TestHostObject::Product` (using the same type alias as in the registration macro above) must be placed in the `classes_def.xml` file before the type that `Product` aliases. + `PortableHostObject` objects can also be read back in "bare ROOT" mode, without any dictionaries. They have no implicit or explicit references to alpaka (neither as part of the class signature nor as part of its name). @@ -93,6 +95,8 @@ one would create the file `classes.cc` with the content: SET_PORTABLEHOSTCOLLECTION_READ_RULES(portabletest::TestHostCollection); ``` +**Note:** The dictionary for `portabletest::TestHostCollection::Layout` (using the same type alias as in the registration macro above) must be placed in the `classes_def.xml` file before the type that `Layout` aliases. + `PortableHostCollection` collections can also be read back in "bare ROOT" mode, without any dictionaries. They have no implicit or explicit references to alpaka (neither as part of the class signature nor as part of its name). @@ -159,6 +163,7 @@ Both scripts expect the collections to be aliased as in: ``` using TestDeviceMultiCollection3 = PortableCollection3; ``` +and assume the `TestDeviceMultiCollection3` is used in the `SET_PORTABLEHOSTMULTICOLLECTION_READ_RULES()` macro. For the host xml, SoA layouts have to be listed and duplicates should be removed manually is multiple collections share a same layout. The scripts are called as follows: diff --git a/DataFormats/Portable/scripts/portableHostCollectionHints b/DataFormats/Portable/scripts/portableHostCollectionHints index d92e9cb2f132e..ef13bfd71733f 100755 --- a/DataFormats/Portable/scripts/portableHostCollectionHints +++ b/DataFormats/Portable/scripts/portableHostCollectionHints @@ -16,6 +16,11 @@ print("") for l in layouts: print(" "% l) print() +print(" ") +print(" "% collectionName) +print(" "% collectionName) +print(" "% collectionName) +print() if len(layouts) > 1: print(" ") for i in range(0, len(layouts)): @@ -27,7 +32,5 @@ if len(layouts) > 1: for i in range(0, len(layouts)): print(" \"/>" % (i, layouts[i])) print("") -print(" ") -print(" "% collectionName) print(" \" splitLevel=\"0\"/>"% collectionName) print("") From 5bebe3bef39c8912fbde52473b1f891be794af6c Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 29 Dec 2025 20:08:23 +0100 Subject: [PATCH 4/5] Define dictionaries of nested type aliases of Portable* before their aliased-to types This should avoid ROOT header parsing --- DataFormats/BeamSpot/src/classes_def.xml | 8 ++++++- DataFormats/EcalRecHit/src/classes_def.xml | 8 +++++-- DataFormats/HGCalReco/src/classes_def.xml | 19 +++++++++------ DataFormats/HcalDigi/src/classes_def.xml | 12 ++++++---- DataFormats/HcalRecHit/src/classes_def.xml | 4 +++- .../src/classes_serial_def.xml | 24 +++++++++---------- .../PortableTestObjects/src/classes_def.xml | 24 ++++++++++++++----- .../SiPixelClusterSoA/src/classes_def.xml | 8 +++---- .../SiPixelDigiSoA/src/classes_def.xml | 17 +++++++------ RecoTracker/LSTCore/src/classes_def.xml | 9 +++++-- 10 files changed, 85 insertions(+), 48 deletions(-) diff --git a/DataFormats/BeamSpot/src/classes_def.xml b/DataFormats/BeamSpot/src/classes_def.xml index 10a42156d995c..e3fb016fa64ba 100644 --- a/DataFormats/BeamSpot/src/classes_def.xml +++ b/DataFormats/BeamSpot/src/classes_def.xml @@ -5,11 +5,17 @@ + + + + + + + - diff --git a/DataFormats/EcalRecHit/src/classes_def.xml b/DataFormats/EcalRecHit/src/classes_def.xml index 7d1cdb32f56e7..c70bbd1d347ca 100644 --- a/DataFormats/EcalRecHit/src/classes_def.xml +++ b/DataFormats/EcalRecHit/src/classes_def.xml @@ -39,15 +39,19 @@ + + + - + + + - diff --git a/DataFormats/HGCalReco/src/classes_def.xml b/DataFormats/HGCalReco/src/classes_def.xml index e06c014d85813..a8def7b0a1300 100644 --- a/DataFormats/HGCalReco/src/classes_def.xml +++ b/DataFormats/HGCalReco/src/classes_def.xml @@ -76,24 +76,29 @@ + + + - - + + + - - - - + + + - + + + diff --git a/DataFormats/HcalDigi/src/classes_def.xml b/DataFormats/HcalDigi/src/classes_def.xml index b6bb89cb7a7dd..4b5ce52dca15a 100644 --- a/DataFormats/HcalDigi/src/classes_def.xml +++ b/DataFormats/HcalDigi/src/classes_def.xml @@ -114,15 +114,19 @@ - - - - + + + + + + + + diff --git a/DataFormats/HcalRecHit/src/classes_def.xml b/DataFormats/HcalRecHit/src/classes_def.xml index b5520847e8d86..38a58e28f47d1 100644 --- a/DataFormats/HcalRecHit/src/classes_def.xml +++ b/DataFormats/HcalRecHit/src/classes_def.xml @@ -120,8 +120,10 @@ + + + - diff --git a/DataFormats/ParticleFlowReco/src/classes_serial_def.xml b/DataFormats/ParticleFlowReco/src/classes_serial_def.xml index a3a14bd53e9a4..8494ea92aff6c 100644 --- a/DataFormats/ParticleFlowReco/src/classes_serial_def.xml +++ b/DataFormats/ParticleFlowReco/src/classes_serial_def.xml @@ -1,29 +1,29 @@ + + + - - - + + + - - - + + + - - - + + + - - - diff --git a/DataFormats/PortableTestObjects/src/classes_def.xml b/DataFormats/PortableTestObjects/src/classes_def.xml index 0faaba6a9e74a..e452b6191885d 100644 --- a/DataFormats/PortableTestObjects/src/classes_def.xml +++ b/DataFormats/PortableTestObjects/src/classes_def.xml @@ -57,39 +57,51 @@ + + + - + + + - + + + - + + + - + + + - + + + - diff --git a/DataFormats/SiPixelClusterSoA/src/classes_def.xml b/DataFormats/SiPixelClusterSoA/src/classes_def.xml index 96b9df2725473..587e9c7fd05a0 100644 --- a/DataFormats/SiPixelClusterSoA/src/classes_def.xml +++ b/DataFormats/SiPixelClusterSoA/src/classes_def.xml @@ -1,10 +1,10 @@ + + + - - - - + diff --git a/DataFormats/SiPixelDigiSoA/src/classes_def.xml b/DataFormats/SiPixelDigiSoA/src/classes_def.xml index 0d17fff166eae..bfd5ec3f60375 100644 --- a/DataFormats/SiPixelDigiSoA/src/classes_def.xml +++ b/DataFormats/SiPixelDigiSoA/src/classes_def.xml @@ -1,18 +1,17 @@ + + + - - - - - + + + + - - - - + diff --git a/RecoTracker/LSTCore/src/classes_def.xml b/RecoTracker/LSTCore/src/classes_def.xml index b3ea81c1cc5a1..70f584bd1a2cb 100644 --- a/RecoTracker/LSTCore/src/classes_def.xml +++ b/RecoTracker/LSTCore/src/classes_def.xml @@ -2,16 +2,21 @@ + + + + - - + + + From d001897e21f624c9387b0f5160264a236b16643d Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 30 Dec 2025 15:50:44 +0100 Subject: [PATCH 5/5] Mark LST collections transient They are not in DataFormats, so they are allowed to be transient only. --- RecoTracker/LSTCore/src/classes_def.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoTracker/LSTCore/src/classes_def.xml b/RecoTracker/LSTCore/src/classes_def.xml index 70f584bd1a2cb..a86cf567d14f5 100644 --- a/RecoTracker/LSTCore/src/classes_def.xml +++ b/RecoTracker/LSTCore/src/classes_def.xml @@ -12,11 +12,11 @@ - + - +