From cc58b0cc35fc44a909fa6a1a231f89e029bd32fe Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Tue, 18 Aug 2026 11:35:05 -0700 Subject: [PATCH 1/2] CHG: Update XML tags of `EnergyCalibration` and `DepthCalibration` --- Config/Nuclearizer_EM_DEE.cfg | 11 ++--------- .../unittestdata/406-1/hdf5-to-tra.nuclearizer.cfg | 12 ++++++------ .../unittestdata/542-1/hdf5-to-tra.nuclearizer.cfg | 12 ++++++------ src/MModuleDepthCalibration.cxx | 4 ++-- src/MModuleEnergyCalibration.cxx | 2 +- 5 files changed, 17 insertions(+), 24 deletions(-) diff --git a/Config/Nuclearizer_EM_DEE.cfg b/Config/Nuclearizer_EM_DEE.cfg index e65b0cb6..2df463a4 100644 --- a/Config/Nuclearizer_EM_DEE.cfg +++ b/Config/Nuclearizer_EM_DEE.cfg @@ -73,23 +73,16 @@ -1 inf - + 0 15 100 -1000 - + - - - - true - - true - /Users/parshadkp/Library/CloudStorage/OneDrive-ClemsonUniversity/COSI/nuclearizer_files/nuclearizer_outputs/STTC/STTC_DEE_Cs137.evta 2 diff --git a/resource/unittestdata/406-1/hdf5-to-tra.nuclearizer.cfg b/resource/unittestdata/406-1/hdf5-to-tra.nuclearizer.cfg index f26a70d2..26b79112 100644 --- a/resource/unittestdata/406-1/hdf5-to-tra.nuclearizer.cfg +++ b/resource/unittestdata/406-1/hdf5-to-tra.nuclearizer.cfg @@ -2,10 +2,10 @@ 1 XmlTagMeasurementLoaderHDF - EnergyCalibration + XmlTagEnergyCalibration XmlTagTACcut XmlTagStripPairingMultiRoundChiSquare - DepthCalibration + XmlTagDepthCalibration XmlTagRevan XmlTagEventSaver @@ -17,22 +17,22 @@ $(NUCLEARIZER)/resource/unittestdata/406-1/hp52406-1.stripmap.map false - + $(NUCLEARIZER)/resource/unittestdata/406-1/hp52406-1.full.ecal 1 20 100 -1000 - + - + $(NUCLEARIZER)/resource/unittestdata/406-1/hp52406-1.coeffs.csv $(NUCLEARIZER)/resource/unittestdata/406-1/hp52406-1.splines.csv false false - + $(NUCLEARIZER)/resource/unittestdata/406-1/hdf5-to-tra.tra 3 diff --git a/resource/unittestdata/542-1/hdf5-to-tra.nuclearizer.cfg b/resource/unittestdata/542-1/hdf5-to-tra.nuclearizer.cfg index c7e75bdd..6484e26b 100644 --- a/resource/unittestdata/542-1/hdf5-to-tra.nuclearizer.cfg +++ b/resource/unittestdata/542-1/hdf5-to-tra.nuclearizer.cfg @@ -2,10 +2,10 @@ 1 XmlTagMeasurementLoaderHDF - EnergyCalibration + XmlTagEnergyCalibration XmlTagTACcut XmlTagStripPairingMultiRoundChiSquare - DepthCalibration + XmlTagDepthCalibration XmlTagRevan XmlTagEventSaver @@ -17,22 +17,22 @@ $(NUCLEARIZER)/resource/unittestdata/542-1/hp52542-1.stripmap.map false - + $(NUCLEARIZER)/resource/unittestdata/542-1/hp52542-1.full.ecal 1 20 100 -1000 - + - + $(NUCLEARIZER)/resource/unittestdata/542-1/hp52542-1.coeffs.csv $(NUCLEARIZER)/resource/unittestdata/542-1/hp52542-1.splines.csv false false - + $(NUCLEARIZER)/resource/unittestdata/542-1/hdf5-to-tra.tra 3 diff --git a/src/MModuleDepthCalibration.cxx b/src/MModuleDepthCalibration.cxx index 3d5d3874..939e0cd6 100644 --- a/src/MModuleDepthCalibration.cxx +++ b/src/MModuleDepthCalibration.cxx @@ -59,7 +59,7 @@ MModuleDepthCalibration::MModuleDepthCalibration() : MModule() m_Name = "Depth Calibration"; // - Determining the depth of each event (by Sean); // Set the XML tag --- has to be unique --- no spaces allowed - m_XmlTag = "DepthCalibration"; + m_XmlTag = "XmlTagDepthCalibration"; // Set all modules, which have to be done before this module AddPreceedingModuleType(MAssembly::c_EnergyCalibration, true); @@ -142,7 +142,7 @@ bool MModuleDepthCalibration::Initialize() } MSupervisor* S = MSupervisor::GetSupervisor(); - m_EnergyCalibration = (MModuleEnergyCalibration*) S->GetAvailableModuleByXmlTag("EnergyCalibration"); + m_EnergyCalibration = (MModuleEnergyCalibration*) S->GetAvailableModuleByXmlTag("XmlTagEnergyCalibration"); if (m_EnergyCalibration == nullptr) { cout << "MModuleDepthCalibration: couldn't resolve pointer to Energy Calibration Module... need access to this module for energy resolution lookup!" << endl; return false; diff --git a/src/MModuleEnergyCalibration.cxx b/src/MModuleEnergyCalibration.cxx index c35817d0..221cdfc1 100644 --- a/src/MModuleEnergyCalibration.cxx +++ b/src/MModuleEnergyCalibration.cxx @@ -70,7 +70,7 @@ MModuleEnergyCalibration::MModuleEnergyCalibration() : MModule() m_Name = "Energy calibrator"; // Set the XML tag --- has to be unique --- no spaces allowed - m_XmlTag = "EnergyCalibration"; + m_XmlTag = "XmlTagEnergyCalibration"; // Set all modules, which have to be done before this module AddPreceedingModuleType(MAssembly::c_EventLoader); From 89a1f130cc40512cc6869aa6e123589f9a0a835b Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Tue, 18 Aug 2026 12:31:19 -0700 Subject: [PATCH 2/2] ADD: Add remark on XML tags to `CodingConventions.md` --- CodingConventions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodingConventions.md b/CodingConventions.md index c081e9bd..3819450d 100644 --- a/CodingConventions.md +++ b/CodingConventions.md @@ -37,14 +37,14 @@ To format a file do the following: ## New classes -For new classes, copy and modify an existing one, or use the MModuleTemplate class as tempplate. +For new classes, copy and modify an existing one, or use the MModuleTemplate class as template. ## Naming ### Classes * Due to historic reasons, all classes start with M. -* Modules start with MModule +* Modules start with MModule, with XML tags starting with XmlTag * Option GUI's start with MGUIOptions * Expo (= data display) GUI's start with MGUIExpo