diff --git a/config/8x8SiPM_crystal.json b/config/8x8SiPM_crystal.json index 67f977e24..56e1e6b66 100644 --- a/config/8x8SiPM_crystal.json +++ b/config/8x8SiPM_crystal.json @@ -24,7 +24,7 @@ }, "event": { - "mode": "Minimal", + "event_mode": "Minimal", "maxslot": 1000000, "max_bounce": 31, "propagate_epsilon": 0.05, diff --git a/config/dev.json b/config/dev.json index 03b3e2488..f62e522bd 100644 --- a/config/dev.json +++ b/config/dev.json @@ -24,10 +24,10 @@ }, "event": { + "event_mode": "DebugLite", "max_bounce": 31, "max_genstep": 10000000, "maxslot": 1000000, - "mode": "DebugLite", "mode_lite": "Unspecified", "mode_merge": "Unspecified", "output_dir": "./", diff --git a/config/sphere_leak.json b/config/sphere_leak.json index ce059b147..2fc1be89d 100644 --- a/config/sphere_leak.json +++ b/config/sphere_leak.json @@ -24,7 +24,7 @@ }, "event": { - "mode": "DebugLite", + "event_mode": "DebugLite", "maxslot": 1000000, "max_bounce": 31, "propagate_epsilon": 0.05, diff --git a/config/trap_iso.json b/config/trap_iso.json index 96eef0896..17fa60de6 100644 --- a/config/trap_iso.json +++ b/config/trap_iso.json @@ -24,7 +24,7 @@ }, "event": { - "mode": "DebugLite", + "event_mode": "DebugLite", "maxslot": 1000000, "max_bounce": 10000, "propagate_epsilon": 0.001, diff --git a/config/wls_test.json b/config/wls_test.json index 4c3dc8006..e7ae9ba96 100644 --- a/config/wls_test.json +++ b/config/wls_test.json @@ -24,7 +24,7 @@ }, "event": { - "mode": "DebugLite", + "event_mode": "DebugLite", "maxslot": 1000000, "max_bounce": 31, "propagate_epsilon": 0.05, diff --git a/sysrap/config.cpp b/sysrap/config.cpp index 9ee7b18a1..18a0c8880 100644 --- a/sysrap/config.cpp +++ b/sysrap/config.cpp @@ -320,7 +320,7 @@ void Config::ReadConfig(std::string filepath) Assign(event_, "max_bounce", max_bounce); Assign(event_, "max_genstep", max_genstep); Assign(event_, "maxslot", maxslot); - AssignNamedEnum(event_, "event", "mode", event_mode, EventModeInfos); + AssignNamedEnum(event_, "event", "event_mode", event_mode, EventModeInfos); AssignNamedEnum(event_, "event", "mode_lite", mode_lite, ModeLiteInfos); AssignNamedEnum(event_, "event", "mode_merge", mode_merge, ModeMergeInfos); AssignOutputDir(event_, output_dir); @@ -344,10 +344,10 @@ void Config::Apply() const const std::string event_mode_name{EventModeName(event_mode)}; const std::string output_dir_str = output_dir.string(); + SEventConfig::SetEventMode(event_mode_name.c_str()); SEventConfig::SetMaxBounce(max_bounce); SEventConfig::SetMaxGenstep(max_genstep); SEventConfig::SetMaxSlot(maxslot); - SEventConfig::SetEventMode(event_mode_name.c_str()); if (mode_lite != ModeLite::Unspecified) SEventConfig::SetModeLite(static_cast(mode_lite)); if (mode_merge != ModeMerge::Unspecified) diff --git a/sysrap/config.h b/sysrap/config.h index bb22e8572..8b4620943 100644 --- a/sysrap/config.h +++ b/sysrap/config.h @@ -65,6 +65,9 @@ class Config /// A unique name associated with this Config std::string name{"dev"}; + /// Event persistence mode applied to SEventConfig. + EventMode event_mode{EventMode::Minimal}; + /// Maximum photon bounce count. int max_bounce{31}; @@ -74,9 +77,6 @@ class Config /// Maximum event slots applied to SEventConfig. int maxslot{0}; - /// Event persistence mode applied to SEventConfig. - EventMode event_mode{EventMode::Minimal}; - /// Optional compact photon/hit storage mode. ModeLite mode_lite{ModeLite::Unspecified};