diff --git a/include/RMGDetectorMetadata.hh b/include/RMGDetectorMetadata.hh new file mode 100644 index 00000000..6b313577 --- /dev/null +++ b/include/RMGDetectorMetadata.hh @@ -0,0 +1,35 @@ +// Copyright (C) 2022 Luigi Pertoldi +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation, either version 3 of the License, or (at your option) any +// later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . + +#ifndef _RMG_DETECTOR_METADATA_HH_ +#define _RMG_DETECTOR_METADATA_HH_ + +#include + +enum RMGDetectorType { + kGermanium, + kOptical, + kScintillator, +}; + +struct RMGDetectorMetadata { + RMGDetectorType type; + int uid; + std::string name; +}; + +#endif + +// vim: tabstop=2 shiftwidth=2 expandtab diff --git a/include/RMGHardware.hh b/include/RMGHardware.hh index 9fe23670..c6b0faab 100644 --- a/include/RMGHardware.hh +++ b/include/RMGHardware.hh @@ -26,6 +26,7 @@ #include "G4Region.hh" #include "G4VUserDetectorConstruction.hh" +#include "RMGDetectorMetadata.hh" #include "RMGHardwareMessenger.hh" #include "RMGNavigationTools.hh" #include "RMGVOutputScheme.hh" @@ -46,19 +47,8 @@ class RMGHardware : public G4VUserDetectorConstruction { G4VPhysicalVolume* Construct() override; void ConstructSDandField() override; - enum DetectorType { - kGermanium, - kOptical, - kScintillator, - }; - - struct DetectorMetadata { - DetectorType type; - int uid; - }; - - void RegisterDetector(DetectorType type, const std::string& pv_name, int uid, int copy_nr = 0, - bool allow_uid_reuse = false); + void RegisterDetector(RMGDetectorType type, const std::string& pv_name, int uid, + int copy_nr = 0, bool allow_uid_reuse = false); inline const auto& GetDetectorMetadataMap() { return fDetectorMetadata; } inline const auto& GetDetectorMetadata(const std::pair& det) { return fDetectorMetadata.at(det); @@ -84,8 +74,8 @@ class RMGHardware : public G4VUserDetectorConstruction { std::map fPhysVolStepLimits; // one element for each sensitive detector physical volume - std::map, DetectorMetadata> fDetectorMetadata; - std::set fActiveDetectors; + std::map, RMGDetectorMetadata> fDetectorMetadata; + std::set fActiveDetectors; static G4ThreadLocal std::vector> fActiveOutputSchemes; static G4ThreadLocal bool fActiveDetectorsInitialized; diff --git a/include/RMGVOutputScheme.hh b/include/RMGVOutputScheme.hh index fb77cea2..a06e8756 100644 --- a/include/RMGVOutputScheme.hh +++ b/include/RMGVOutputScheme.hh @@ -23,6 +23,8 @@ #include "G4Track.hh" #include "G4UserStackingAction.hh" +#include "RMGDetectorMetadata.hh" + #include "fmt/format.h" class G4Event; @@ -55,8 +57,11 @@ class RMGVOutputScheme { protected: - [[nodiscard]] virtual inline std::string GetNtupleName(int det_uid) const { - return fNtuplePerDetector ? fmt::format("det{:03}", det_uid) : GetNtuplenameFlat(); + [[nodiscard]] virtual inline std::string GetNtupleName(RMGDetectorMetadata det) const { + if (fNtuplePerDetector) { + return !det.name.empty() ? det.name : fmt::format("det{:03}", det.uid); + } + return GetNtuplenameFlat(); } [[nodiscard]] virtual inline std::string GetNtuplenameFlat() const { throw new std::logic_error("GetNtuplenameFlat not implemented"); diff --git a/include/RMGVertexOutputScheme.hh b/include/RMGVertexOutputScheme.hh index 05a20ec8..ae5e4d65 100644 --- a/include/RMGVertexOutputScheme.hh +++ b/include/RMGVertexOutputScheme.hh @@ -38,7 +38,7 @@ class RMGVertexOutputScheme : public RMGVOutputScheme { protected: - [[nodiscard]] inline std::string GetNtupleName(int) const override { + [[nodiscard]] inline std::string GetNtupleName(RMGDetectorMetadata) const override { throw std::logic_error("vertex output scheme has no detectors"); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index adf9b1d1..d7c717f9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,6 +4,7 @@ set(_root ${PROJECT_SOURCE_DIR}) set(PROJECT_PUBLIC_HEADERS + ${_root}/include/RMGDetectorMetadata.hh ${_root}/include/RMGExceptionHandler.hh ${_root}/include/RMGEventAction.hh ${_root}/include/RMGGeneratorCosmicMuons.hh diff --git a/src/RMGGermaniumDetector.cc b/src/RMGGermaniumDetector.cc index 9ce3a92d..f4084fb4 100644 --- a/src/RMGGermaniumDetector.cc +++ b/src/RMGGermaniumDetector.cc @@ -98,7 +98,7 @@ bool RMGGermaniumDetector::ProcessHits(G4Step* step, G4TouchableHistory* /*histo const auto det_cons = RMGManager::Instance()->GetDetectorConstruction(); try { auto d_type = det_cons->GetDetectorMetadata({pv_name, pv_copynr}).type; - if (d_type != RMGHardware::kGermanium) { + if (d_type != RMGDetectorType::kGermanium) { RMGLog::OutFormatDev(RMGLog::debug, "Volume '{}' (copy nr. {} not registered as germanium detector", pv_name, pv_copynr); return false; diff --git a/src/RMGGermaniumOutputScheme.cc b/src/RMGGermaniumOutputScheme.cc index 62f34089..4ea13601 100644 --- a/src/RMGGermaniumOutputScheme.cc +++ b/src/RMGGermaniumOutputScheme.cc @@ -43,13 +43,13 @@ void RMGGermaniumOutputScheme::AssignOutputNames(G4AnalysisManager* ana_man) { std::set registered_uids; std::map registered_ntuples; for (auto&& det : detectors) { - if (det.second.type != RMGHardware::kGermanium) continue; + if (det.second.type != RMGDetectorType::kGermanium) continue; // do not register the ntuple twice if two detectors share their uid. auto had_uid = registered_uids.emplace(det.second.uid); if (!had_uid.second) continue; - auto ntuple_name = this->GetNtupleName(det.second.uid); + auto ntuple_name = this->GetNtupleName(det.second); auto ntuple_reg = registered_ntuples.find(ntuple_name); if (ntuple_reg != registered_ntuples.end()) { // ntuple already exists, but also store the ntuple id for the other uid(s). diff --git a/src/RMGHardware.cc b/src/RMGHardware.cc index 1b6945f2..10cf0ac8 100644 --- a/src/RMGHardware.cc +++ b/src/RMGHardware.cc @@ -115,7 +115,7 @@ void RMGHardware::ConstructSDandField() { else sd_man->SetVerboseLevel(0); // map holding a list of sensitive detectors to activate - std::map active_dets; + std::map active_dets; for (const auto& [k, v] : fDetectorMetadata) { @@ -128,21 +128,21 @@ void RMGHardware::ConstructSDandField() { G4VSensitiveDetector* obj = nullptr; std::shared_ptr output; switch (v.type) { - case DetectorType::kOptical: + case RMGDetectorType::kOptical: obj = new RMGOpticalDetector(); output = std::make_shared(); break; - case DetectorType::kGermanium: + case RMGDetectorType::kGermanium: obj = new RMGGermaniumDetector(); output = std::make_shared(); break; - case DetectorType::kScintillator: + case RMGDetectorType::kScintillator: obj = new RMGScintillatorDetector(); output = std::make_shared(); break; default: RMGLog::OutDev(RMGLog::fatal, "No behaviour for sensitive detector type '", - magic_enum::enum_name(v.type), "' implemented (implement me)"); + magic_enum::enum_name(v.type), "' implemented (implement me)"); } sd_man->AddNewDetector(obj); active_dets.emplace(v.type, obj); @@ -198,7 +198,7 @@ void RMGHardware::ConstructSDandField() { } } -void RMGHardware::RegisterDetector(DetectorType type, const std::string& pv_name, int uid, +void RMGHardware::RegisterDetector(RMGDetectorType type, const std::string& pv_name, int uid, int copy_nr, bool allow_uid_reuse) { if (fActiveDetectorsInitialized) { RMGLog::Out(RMGLog::error, @@ -220,7 +220,7 @@ void RMGHardware::RegisterDetector(DetectorType type, const std::string& pv_name fActiveDetectors.insert(type); // FIXME: can this be done with emplace? - auto r_value = fDetectorMetadata.insert({{pv_name, copy_nr}, {type, uid}}); + auto r_value = fDetectorMetadata.insert({{pv_name, copy_nr}, {type, uid, pv_name}}); if (!r_value.second) { // if insertion did not take place RMGLog::OutFormat(RMGLog::warning, "Physical volume '{}' (copy number {}) has already been registered as detector", pv_name, diff --git a/src/RMGHardwareMessenger.cc b/src/RMGHardwareMessenger.cc index b576555c..aa200af1 100644 --- a/src/RMGHardwareMessenger.cc +++ b/src/RMGHardwareMessenger.cc @@ -26,7 +26,7 @@ RMGHardwareMessenger::RMGHardwareMessenger(RMGHardware* hw) : fHardware(hw) { fRegisterCmd->SetGuidance("register a sensitive detector"); auto p_type = new G4UIparameter("type", 's', false); - p_type->SetParameterCandidates(RMGTools::GetCandidates().c_str()); + p_type->SetParameterCandidates(RMGTools::GetCandidates().c_str()); p_type->SetGuidance("Detector type"); fRegisterCmd->SetParameter(p_type); @@ -62,7 +62,7 @@ void RMGHardwareMessenger::RegisterDetectorCmd(const std::string& parameters) { G4Tokenizer next(parameters); auto type_str = next(); - auto type = RMGTools::ToEnum(std::string(type_str), "detector type"); + auto type = RMGTools::ToEnum(std::string(type_str), "detector type"); auto pv_name = next(); const int uid = std::stoi(next()); int copy_nr = 0; diff --git a/src/RMGOpticalDetector.cc b/src/RMGOpticalDetector.cc index 1bd75591..9c29c5f2 100644 --- a/src/RMGOpticalDetector.cc +++ b/src/RMGOpticalDetector.cc @@ -102,7 +102,7 @@ bool RMGOpticalDetector::ProcessHits(G4Step* step, G4TouchableHistory* /*history auto det_cons = RMGManager::Instance()->GetDetectorConstruction(); try { auto d_type = det_cons->GetDetectorMetadata({pv_name, pv_copynr}).type; - if (d_type != RMGHardware::kOptical) { + if (d_type != RMGDetectorType::kOptical) { RMGLog::OutFormatDev(RMGLog::debug, "Volume '{}' (copy nr. {} not registered as optical detector", pv_name, pv_copynr); return false; diff --git a/src/RMGOpticalOutputScheme.cc b/src/RMGOpticalOutputScheme.cc index 71ae3524..0db058c6 100644 --- a/src/RMGOpticalOutputScheme.cc +++ b/src/RMGOpticalOutputScheme.cc @@ -41,13 +41,13 @@ void RMGOpticalOutputScheme::AssignOutputNames(G4AnalysisManager* ana_man) { std::set registered_uids; std::map registered_ntuples; for (auto&& det : detectors) { - if (det.second.type != RMGHardware::kOptical) continue; + if (det.second.type != RMGDetectorType::kOptical) continue; // do not register the ntuple twice if two detectors share their uid. auto had_uid = registered_uids.emplace(det.second.uid); if (!had_uid.second) continue; - auto ntuple_name = this->GetNtupleName(det.second.uid); + auto ntuple_name = this->GetNtupleName(det.second); auto ntuple_reg = registered_ntuples.find(ntuple_name); if (ntuple_reg != registered_ntuples.end()) { // ntuple already exists, but also store the ntuple id for the other uid(s). diff --git a/src/RMGScintillatorDetector.cc b/src/RMGScintillatorDetector.cc index a857fe01..e577a28a 100644 --- a/src/RMGScintillatorDetector.cc +++ b/src/RMGScintillatorDetector.cc @@ -99,7 +99,7 @@ bool RMGScintillatorDetector::ProcessHits(G4Step* step, G4TouchableHistory* /*hi const auto det_cons = RMGManager::Instance()->GetDetectorConstruction(); try { auto d_type = det_cons->GetDetectorMetadata({pv_name, pv_copynr}).type; - if (d_type != RMGHardware::kScintillator) { + if (d_type != RMGDetectorType::kScintillator) { RMGLog::OutFormatDev(RMGLog::debug, "Volume '{}' (copy nr. {} not registered as scintillator detector", pv_name, pv_copynr); return false; diff --git a/src/RMGScintillatorOutputScheme.cc b/src/RMGScintillatorOutputScheme.cc index 85a85fde..0b43a3ba 100644 --- a/src/RMGScintillatorOutputScheme.cc +++ b/src/RMGScintillatorOutputScheme.cc @@ -42,13 +42,13 @@ void RMGScintillatorOutputScheme::AssignOutputNames(G4AnalysisManager* ana_man) std::set registered_uids; std::map registered_ntuples; for (auto&& det : detectors) { - if (det.second.type != RMGHardware::kScintillator) continue; + if (det.second.type != RMGDetectorType::kScintillator) continue; // do not register the ntuple twice if two detectors share their uid. auto had_uid = registered_uids.emplace(det.second.uid); if (!had_uid.second) continue; - auto ntuple_name = this->GetNtupleName(det.second.uid); + auto ntuple_name = this->GetNtupleName(det.second); auto ntuple_reg = registered_ntuples.find(ntuple_name); if (ntuple_reg != registered_ntuples.end()) { // ntuple already exists, but also store the ntuple id for the other uid(s). diff --git a/tests/output/macros/ntuple-per-det.hdf5ls b/tests/output/macros/ntuple-per-det.hdf5ls index 824e3a7f..3266a6cb 100644 --- a/tests/output/macros/ntuple-per-det.hdf5ls +++ b/tests/output/macros/ntuple-per-det.hdf5ls @@ -1,140 +1,140 @@ default_histograms header stp -stp/det001 -stp/det001/columns -stp/det001/edep_in_keV -stp/det001/edep_in_keV/entries -stp/det001/edep_in_keV/pages -stp/det001/entries -stp/det001/evtid -stp/det001/evtid/entries -stp/det001/evtid/pages -stp/det001/forms -stp/det001/names -stp/det001/particle -stp/det001/particle/entries -stp/det001/particle/pages -stp/det001/time_in_ns -stp/det001/time_in_ns/entries -stp/det001/time_in_ns/pages -stp/det001/v_post_in_m\ns -stp/det001/v_post_in_m\ns/entries -stp/det001/v_post_in_m\ns/pages -stp/det001/v_pre_in_m\ns -stp/det001/v_pre_in_m\ns/entries -stp/det001/v_pre_in_m\ns/pages -stp/det001/xloc_post_in_m -stp/det001/xloc_post_in_m/entries -stp/det001/xloc_post_in_m/pages -stp/det001/xloc_pre_in_m -stp/det001/xloc_pre_in_m/entries -stp/det001/xloc_pre_in_m/pages -stp/det001/yloc_post_in_m -stp/det001/yloc_post_in_m/entries -stp/det001/yloc_post_in_m/pages -stp/det001/yloc_pre_in_m -stp/det001/yloc_pre_in_m/entries -stp/det001/yloc_pre_in_m/pages -stp/det001/zloc_post_in_m -stp/det001/zloc_post_in_m/entries -stp/det001/zloc_post_in_m/pages -stp/det001/zloc_pre_in_m -stp/det001/zloc_pre_in_m/entries -stp/det001/zloc_pre_in_m/pages -stp/det002 -stp/det002/columns -stp/det002/edep_in_keV -stp/det002/edep_in_keV/entries -stp/det002/edep_in_keV/pages -stp/det002/entries -stp/det002/evtid -stp/det002/evtid/entries -stp/det002/evtid/pages -stp/det002/forms -stp/det002/names -stp/det002/particle -stp/det002/particle/entries -stp/det002/particle/pages -stp/det002/time_in_ns -stp/det002/time_in_ns/entries -stp/det002/time_in_ns/pages -stp/det002/v_post_in_m\ns -stp/det002/v_post_in_m\ns/entries -stp/det002/v_post_in_m\ns/pages -stp/det002/v_pre_in_m\ns -stp/det002/v_pre_in_m\ns/entries -stp/det002/v_pre_in_m\ns/pages -stp/det002/xloc_post_in_m -stp/det002/xloc_post_in_m/entries -stp/det002/xloc_post_in_m/pages -stp/det002/xloc_pre_in_m -stp/det002/xloc_pre_in_m/entries -stp/det002/xloc_pre_in_m/pages -stp/det002/yloc_post_in_m -stp/det002/yloc_post_in_m/entries -stp/det002/yloc_post_in_m/pages -stp/det002/yloc_pre_in_m -stp/det002/yloc_pre_in_m/entries -stp/det002/yloc_pre_in_m/pages -stp/det002/zloc_post_in_m -stp/det002/zloc_post_in_m/entries -stp/det002/zloc_post_in_m/pages -stp/det002/zloc_pre_in_m -stp/det002/zloc_pre_in_m/entries -stp/det002/zloc_pre_in_m/pages -stp/det011 -stp/det011/columns -stp/det011/edep_in_keV -stp/det011/edep_in_keV/entries -stp/det011/edep_in_keV/pages -stp/det011/entries -stp/det011/evtid -stp/det011/evtid/entries -stp/det011/evtid/pages -stp/det011/forms -stp/det011/names -stp/det011/particle -stp/det011/particle/entries -stp/det011/particle/pages -stp/det011/time_in_ns -stp/det011/time_in_ns/entries -stp/det011/time_in_ns/pages -stp/det011/xloc_in_m -stp/det011/xloc_in_m/entries -stp/det011/xloc_in_m/pages -stp/det011/yloc_in_m -stp/det011/yloc_in_m/entries -stp/det011/yloc_in_m/pages -stp/det011/zloc_in_m -stp/det011/zloc_in_m/entries -stp/det011/zloc_in_m/pages -stp/det012 -stp/det012/columns -stp/det012/edep_in_keV -stp/det012/edep_in_keV/entries -stp/det012/edep_in_keV/pages -stp/det012/entries -stp/det012/evtid -stp/det012/evtid/entries -stp/det012/evtid/pages -stp/det012/forms -stp/det012/names -stp/det012/particle -stp/det012/particle/entries -stp/det012/particle/pages -stp/det012/time_in_ns -stp/det012/time_in_ns/entries -stp/det012/time_in_ns/pages -stp/det012/xloc_in_m -stp/det012/xloc_in_m/entries -stp/det012/xloc_in_m/pages -stp/det012/yloc_in_m -stp/det012/yloc_in_m/entries -stp/det012/yloc_in_m/pages -stp/det012/zloc_in_m -stp/det012/zloc_in_m/entries -stp/det012/zloc_in_m/pages +stp/det1 +stp/det1/columns +stp/det1/edep_in_keV +stp/det1/edep_in_keV/entries +stp/det1/edep_in_keV/pages +stp/det1/entries +stp/det1/evtid +stp/det1/evtid/entries +stp/det1/evtid/pages +stp/det1/forms +stp/det1/names +stp/det1/particle +stp/det1/particle/entries +stp/det1/particle/pages +stp/det1/time_in_ns +stp/det1/time_in_ns/entries +stp/det1/time_in_ns/pages +stp/det1/xloc_in_m +stp/det1/xloc_in_m/entries +stp/det1/xloc_in_m/pages +stp/det1/yloc_in_m +stp/det1/yloc_in_m/entries +stp/det1/yloc_in_m/pages +stp/det1/zloc_in_m +stp/det1/zloc_in_m/entries +stp/det1/zloc_in_m/pages +stp/det2 +stp/det2/columns +stp/det2/edep_in_keV +stp/det2/edep_in_keV/entries +stp/det2/edep_in_keV/pages +stp/det2/entries +stp/det2/evtid +stp/det2/evtid/entries +stp/det2/evtid/pages +stp/det2/forms +stp/det2/names +stp/det2/particle +stp/det2/particle/entries +stp/det2/particle/pages +stp/det2/time_in_ns +stp/det2/time_in_ns/entries +stp/det2/time_in_ns/pages +stp/det2/xloc_in_m +stp/det2/xloc_in_m/entries +stp/det2/xloc_in_m/pages +stp/det2/yloc_in_m +stp/det2/yloc_in_m/entries +stp/det2/yloc_in_m/pages +stp/det2/zloc_in_m +stp/det2/zloc_in_m/entries +stp/det2/zloc_in_m/pages +stp/scint1 +stp/scint1/columns +stp/scint1/edep_in_keV +stp/scint1/edep_in_keV/entries +stp/scint1/edep_in_keV/pages +stp/scint1/entries +stp/scint1/evtid +stp/scint1/evtid/entries +stp/scint1/evtid/pages +stp/scint1/forms +stp/scint1/names +stp/scint1/particle +stp/scint1/particle/entries +stp/scint1/particle/pages +stp/scint1/time_in_ns +stp/scint1/time_in_ns/entries +stp/scint1/time_in_ns/pages +stp/scint1/v_post_in_m\ns +stp/scint1/v_post_in_m\ns/entries +stp/scint1/v_post_in_m\ns/pages +stp/scint1/v_pre_in_m\ns +stp/scint1/v_pre_in_m\ns/entries +stp/scint1/v_pre_in_m\ns/pages +stp/scint1/xloc_post_in_m +stp/scint1/xloc_post_in_m/entries +stp/scint1/xloc_post_in_m/pages +stp/scint1/xloc_pre_in_m +stp/scint1/xloc_pre_in_m/entries +stp/scint1/xloc_pre_in_m/pages +stp/scint1/yloc_post_in_m +stp/scint1/yloc_post_in_m/entries +stp/scint1/yloc_post_in_m/pages +stp/scint1/yloc_pre_in_m +stp/scint1/yloc_pre_in_m/entries +stp/scint1/yloc_pre_in_m/pages +stp/scint1/zloc_post_in_m +stp/scint1/zloc_post_in_m/entries +stp/scint1/zloc_post_in_m/pages +stp/scint1/zloc_pre_in_m +stp/scint1/zloc_pre_in_m/entries +stp/scint1/zloc_pre_in_m/pages +stp/scint2 +stp/scint2/columns +stp/scint2/edep_in_keV +stp/scint2/edep_in_keV/entries +stp/scint2/edep_in_keV/pages +stp/scint2/entries +stp/scint2/evtid +stp/scint2/evtid/entries +stp/scint2/evtid/pages +stp/scint2/forms +stp/scint2/names +stp/scint2/particle +stp/scint2/particle/entries +stp/scint2/particle/pages +stp/scint2/time_in_ns +stp/scint2/time_in_ns/entries +stp/scint2/time_in_ns/pages +stp/scint2/v_post_in_m\ns +stp/scint2/v_post_in_m\ns/entries +stp/scint2/v_post_in_m\ns/pages +stp/scint2/v_pre_in_m\ns +stp/scint2/v_pre_in_m\ns/entries +stp/scint2/v_pre_in_m\ns/pages +stp/scint2/xloc_post_in_m +stp/scint2/xloc_post_in_m/entries +stp/scint2/xloc_post_in_m/pages +stp/scint2/xloc_pre_in_m +stp/scint2/xloc_pre_in_m/entries +stp/scint2/xloc_pre_in_m/pages +stp/scint2/yloc_post_in_m +stp/scint2/yloc_post_in_m/entries +stp/scint2/yloc_post_in_m/pages +stp/scint2/yloc_pre_in_m +stp/scint2/yloc_pre_in_m/entries +stp/scint2/yloc_pre_in_m/pages +stp/scint2/zloc_post_in_m +stp/scint2/zloc_post_in_m/entries +stp/scint2/zloc_post_in_m/pages +stp/scint2/zloc_pre_in_m +stp/scint2/zloc_pre_in_m/entries +stp/scint2/zloc_pre_in_m/pages stp/vertices stp/vertices/columns stp/vertices/entries diff --git a/tests/output/macros/ntuple-per-det.hdf5ls-lh5 b/tests/output/macros/ntuple-per-det.hdf5ls-lh5 index 1dc3ccbd..f9a5a889 100644 --- a/tests/output/macros/ntuple-per-det.hdf5ls-lh5 +++ b/tests/output/macros/ntuple-per-det.hdf5ls-lh5 @@ -1,46 +1,46 @@ -stp : struct{det001,det002,det011,det012,vertices} -stp/det001 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} -stp/det001/edep : array<1>{real} -stp/det001/evtid : array<1>{real} -stp/det001/particle : array<1>{real} -stp/det001/time : array<1>{real} -stp/det001/v_post : array<1>{real} -stp/det001/v_pre : array<1>{real} -stp/det001/xloc_post : array<1>{real} -stp/det001/xloc_pre : array<1>{real} -stp/det001/yloc_post : array<1>{real} -stp/det001/yloc_pre : array<1>{real} -stp/det001/zloc_post : array<1>{real} -stp/det001/zloc_pre : array<1>{real} -stp/det002 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} -stp/det002/edep : array<1>{real} -stp/det002/evtid : array<1>{real} -stp/det002/particle : array<1>{real} -stp/det002/time : array<1>{real} -stp/det002/v_post : array<1>{real} -stp/det002/v_pre : array<1>{real} -stp/det002/xloc_post : array<1>{real} -stp/det002/xloc_pre : array<1>{real} -stp/det002/yloc_post : array<1>{real} -stp/det002/yloc_pre : array<1>{real} -stp/det002/zloc_post : array<1>{real} -stp/det002/zloc_pre : array<1>{real} -stp/det011 : table{evtid,particle,edep,time,xloc,yloc,zloc} -stp/det011/edep : array<1>{real} -stp/det011/evtid : array<1>{real} -stp/det011/particle : array<1>{real} -stp/det011/time : array<1>{real} -stp/det011/xloc : array<1>{real} -stp/det011/yloc : array<1>{real} -stp/det011/zloc : array<1>{real} -stp/det012 : table{evtid,particle,edep,time,xloc,yloc,zloc} -stp/det012/edep : array<1>{real} -stp/det012/evtid : array<1>{real} -stp/det012/particle : array<1>{real} -stp/det012/time : array<1>{real} -stp/det012/xloc : array<1>{real} -stp/det012/yloc : array<1>{real} -stp/det012/zloc : array<1>{real} +stp : struct{det1,det2,scint1,scint2,vertices} +stp/det1 : table{evtid,particle,edep,time,xloc,yloc,zloc} +stp/det1/edep : array<1>{real} +stp/det1/evtid : array<1>{real} +stp/det1/particle : array<1>{real} +stp/det1/time : array<1>{real} +stp/det1/xloc : array<1>{real} +stp/det1/yloc : array<1>{real} +stp/det1/zloc : array<1>{real} +stp/det2 : table{evtid,particle,edep,time,xloc,yloc,zloc} +stp/det2/edep : array<1>{real} +stp/det2/evtid : array<1>{real} +stp/det2/particle : array<1>{real} +stp/det2/time : array<1>{real} +stp/det2/xloc : array<1>{real} +stp/det2/yloc : array<1>{real} +stp/det2/zloc : array<1>{real} +stp/scint1 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} +stp/scint1/edep : array<1>{real} +stp/scint1/evtid : array<1>{real} +stp/scint1/particle : array<1>{real} +stp/scint1/time : array<1>{real} +stp/scint1/v_post : array<1>{real} +stp/scint1/v_pre : array<1>{real} +stp/scint1/xloc_post : array<1>{real} +stp/scint1/xloc_pre : array<1>{real} +stp/scint1/yloc_post : array<1>{real} +stp/scint1/yloc_pre : array<1>{real} +stp/scint1/zloc_post : array<1>{real} +stp/scint1/zloc_pre : array<1>{real} +stp/scint2 : table{evtid,particle,edep,time,xloc_pre,yloc_pre,zloc_pre,xloc_post,yloc_post,zloc_post,v_pre,v_post} +stp/scint2/edep : array<1>{real} +stp/scint2/evtid : array<1>{real} +stp/scint2/particle : array<1>{real} +stp/scint2/time : array<1>{real} +stp/scint2/v_post : array<1>{real} +stp/scint2/v_pre : array<1>{real} +stp/scint2/xloc_post : array<1>{real} +stp/scint2/xloc_pre : array<1>{real} +stp/scint2/yloc_post : array<1>{real} +stp/scint2/yloc_pre : array<1>{real} +stp/scint2/zloc_post : array<1>{real} +stp/scint2/zloc_pre : array<1>{real} stp/vertices : table{evtid,time,xloc,yloc,zloc,n_part} stp/vertices/evtid : array<1>{real} stp/vertices/n_part : array<1>{real}