From a43bd904293a48994ee56a4b8993cdf435cc654b Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Thu, 30 Nov 2023 10:58:27 -0600 Subject: [PATCH] move things around --- application/include/geant4/DataModel.h | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/application/include/geant4/DataModel.h b/application/include/geant4/DataModel.h index c8b3129..745740d 100644 --- a/application/include/geant4/DataModel.h +++ b/application/include/geant4/DataModel.h @@ -17,6 +17,23 @@ class G4Step; namespace geant4::data { +using UserDefinedMap = std::map; + +template +using RecordField = awkward::LayoutBuilder::Field; + +template +using RecordBuilder = awkward::LayoutBuilder::Record; + +template +using ListOffsetBuilder = awkward::LayoutBuilder::ListOffset; + +template +using IndexedBuilder = awkward::LayoutBuilder::IndexedOption; + +template +using NumpyBuilder = awkward::LayoutBuilder::Numpy; + enum Field : std::size_t { runId, eventId, @@ -48,8 +65,6 @@ enum Field : std::size_t { stepTrackKineticEnergy, }; -using UserDefinedMap = std::map; - inline static const UserDefinedMap fieldToNameEvent = { {Field::runId, "run_id"}, {Field::eventId, "event_id"}, @@ -84,21 +99,6 @@ inline static const UserDefinedMap fieldToNameStep = { // {Field::stepVolume, "track.step.volume"}}, }; -template -using RecordField = awkward::LayoutBuilder::Field; - -template -using RecordBuilder = awkward::LayoutBuilder::Record; - -template -using ListOffsetBuilder = awkward::LayoutBuilder::ListOffset; - -template -using IndexedBuilder = awkward::LayoutBuilder::IndexedOption; - -template -using NumpyBuilder = awkward::LayoutBuilder::Numpy; - typedef unsigned int id; using Builder = RecordBuilder< RecordField>, @@ -133,7 +133,6 @@ using Builder = RecordBuilder< Builder MakeBuilder(); - void InsertEventBegin(const G4Event* event, Builder& builder); void InsertEventEnd(const G4Event* event, Builder& builder); void InsertTrackBegin(const G4Track* track, Builder& builder);