From deb3af1a13e87822152fed8543207d20e549b907 Mon Sep 17 00:00:00 2001 From: Juraj Smiesko Date: Wed, 23 Aug 2023 16:54:30 +0200 Subject: [PATCH 1/3] Add forgotten deprecation info --- SimG4Components/src/SimG4SaveTrackerHits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimG4Components/src/SimG4SaveTrackerHits.h b/SimG4Components/src/SimG4SaveTrackerHits.h index bd9c9b4..c3c879f 100644 --- a/SimG4Components/src/SimG4SaveTrackerHits.h +++ b/SimG4Components/src/SimG4SaveTrackerHits.h @@ -58,7 +58,7 @@ class SimG4SaveTrackerHits : public GaudiTool, virtual public ISimG4SaveOutputTo /// Output handle for cell ID encoding string MetaDataHandle m_cellIDEncoding { m_trackHits, "CellIDEncodingString", Gaudi::DataHandle::Writer}; - /// Names of the readouts (hits collections) to save + /// Names of the readouts (hits collections) to save, deprecated Gaudi::Property> m_readoutNames { this, "readoutNames", {}, "[Deprecated] Name of the readouts (hits collections) to save"}; /// Name of the readout (hits collection) to save From b3da7682557f400fc9ca4ece0778aeebc205ef0f Mon Sep 17 00:00:00 2001 From: Juraj Smiesko Date: Wed, 23 Aug 2023 17:34:50 +0200 Subject: [PATCH 2/3] More changes --- SimG4Components/src/SimG4SaveCalHits.h | 22 +++++++++++++++++----- SimG4Components/src/SimG4SaveTrackerHits.h | 22 +++++++++++++++++----- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/SimG4Components/src/SimG4SaveCalHits.h b/SimG4Components/src/SimG4SaveCalHits.h index 14f31e5..91cf875 100644 --- a/SimG4Components/src/SimG4SaveCalHits.h +++ b/SimG4Components/src/SimG4SaveCalHits.h @@ -19,14 +19,26 @@ /** @class SimG4SaveCalHits SimG4Components/src/SimG4SaveCalHits.h SimG4SaveCalHits.h * - * Save calorimeter hits tool. - * All collections passed in the job options will be saved (\b'readoutNames'). - * Readout name is defined in DD4hep XML file as the attribute 'readout' of 'detector' tag. - * If (\b'readoutNames') contain no elements or names that do not correspond to any hit collection, - * tool will fail at initialization. + * \brief Save calorimeter hits tool. + * + * The tool expects one readout name and will produce one collection. + * + * Readout name is defined in DD4hep compact file as the attribute `readout` of + * a `detector` tag. + * + * If readout name which does not correspond to any Geant4 hit collection is + * provided, the tool will fail at initialization. + * + * If both `readoutName` and `readoutNames` are provided, the tool will fail at + * initialization. + * + * If the readout name is provided through the deprecated `readoutNames` + * parameter only the first name in that vector is considered. + * * [For more information please see](@ref md_sim_doc_geant4fullsim). * * @author Anna Zaborowska + * @author Juraj Smiesko (deprecated `readoutNames`) */ class SimG4SaveCalHits : public GaudiTool, virtual public ISimG4SaveOutputTool { diff --git a/SimG4Components/src/SimG4SaveTrackerHits.h b/SimG4Components/src/SimG4SaveTrackerHits.h index c3c879f..ef99e6c 100644 --- a/SimG4Components/src/SimG4SaveTrackerHits.h +++ b/SimG4Components/src/SimG4SaveTrackerHits.h @@ -19,15 +19,27 @@ /** @class SimG4SaveTrackerHits SimG4Components/src/SimG4SaveTrackerHits.h SimG4SaveTrackerHits.h * - * Save tracker hits tool. - * All collections passed in the job options will be saved (\b'readoutNames'). - * Readout name is defined in DD4hep XML file as the attribute 'readout' of 'detector' tag. - * If (\b'readoutNames') contain no elements or names that do not correspond to any hit collection, - * tool will fail at initialization. + * \brief Save tracker hits tool. + * + * The tool expects one readout name and will produce one collection. + * + * Readout name is defined in DD4hep compact file as the attribute `readout` of + * a `detector` tag. + * + * If readout name which does not correspond to any Geant4 hit collection is + * provided, the tool will fail at initialization. + * + * If both `readoutName` and `readoutNames` are provided, the tool will fail at + * initialization. + * + * If the readout name is provided through the deprecated `readoutNames` + * parameter only the first name in that vector is considered. + * * [For more information please see](@ref md_sim_doc_geant4fullsim). * * @author Anna Zaborowska * @author Valentin Volkl (extended with Digi Info) + * @author Juraj Smiesko (deprecated `readoutNames`) */ class SimG4SaveTrackerHits : public GaudiTool, virtual public ISimG4SaveOutputTool { From 95d9849993ffa4aeb887907257572fce252f9dba Mon Sep 17 00:00:00 2001 From: Juraj Smiesko Date: Wed, 23 Aug 2023 17:50:44 +0200 Subject: [PATCH 3/3] Even more changes --- SimG4Components/src/SimG4SaveCalHits.h | 8 ++++---- SimG4Components/src/SimG4SaveTrackerHits.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SimG4Components/src/SimG4SaveCalHits.h b/SimG4Components/src/SimG4SaveCalHits.h index 91cf875..8580772 100644 --- a/SimG4Components/src/SimG4SaveCalHits.h +++ b/SimG4Components/src/SimG4SaveCalHits.h @@ -29,11 +29,11 @@ * If readout name which does not correspond to any Geant4 hit collection is * provided, the tool will fail at initialization. * - * If both `readoutName` and `readoutNames` are provided, the tool will fail at - * initialization. + * If both `readoutName` and deprecated `readoutNames` are provided, the tool + * will fail at initialization. * - * If the readout name is provided through the deprecated `readoutNames` - * parameter only the first name in that vector is considered. + * If the more than one readout names is provided through the deprecated + * `readoutNames` parameter, the tool will fail at initialization. * * [For more information please see](@ref md_sim_doc_geant4fullsim). * diff --git a/SimG4Components/src/SimG4SaveTrackerHits.h b/SimG4Components/src/SimG4SaveTrackerHits.h index ef99e6c..1c304e3 100644 --- a/SimG4Components/src/SimG4SaveTrackerHits.h +++ b/SimG4Components/src/SimG4SaveTrackerHits.h @@ -29,11 +29,11 @@ * If readout name which does not correspond to any Geant4 hit collection is * provided, the tool will fail at initialization. * - * If both `readoutName` and `readoutNames` are provided, the tool will fail at - * initialization. + * If both `readoutName` and deprecated `readoutNames` are provided, the tool + * will fail at initialization. * - * If the readout name is provided through the deprecated `readoutNames` - * parameter only the first name in that vector is considered. + * If the more than one readout names is provided through the deprecated + * `readoutNames` parameter, the tool will fail at initialization. * * [For more information please see](@ref md_sim_doc_geant4fullsim). *