diff --git a/Framework/DataHandling/src/LoadEventNexus.cpp b/Framework/DataHandling/src/LoadEventNexus.cpp index db598919e3fb1a77c7700002cbf5ed6644d0d18d..981e5ee436d1bdc4b548b16e13550b61a1b3bb5a 100644 --- a/Framework/DataHandling/src/LoadEventNexus.cpp +++ b/Framework/DataHandling/src/LoadEventNexus.cpp @@ -688,6 +688,17 @@ void LoadEventNexus::loadEvents(API::Progress *const prog, m_ws->mutableRun().addProperty("run_start", run_start.toISO8601String(), true); } + // set more properties on the workspace + try { + // this is a static method that is why it is passing the + // file object and the file path + loadEntryMetadata<EventWorkspaceCollection_sptr>(m_filename, m_ws, + m_top_entry_name); + } catch (std::runtime_error &e) { + // Missing metadata is not a fatal error. Log and go on with your life + g_log.error() << "Error loading metadata: " << e.what() << '\n'; + } + m_ws->setNPeriods( static_cast<size_t>(nPeriods), periodLog); // This is how many workspaces we are going to make. @@ -776,17 +787,6 @@ void LoadEventNexus::loadEvents(API::Progress *const prog, if (AnalysisDataService::Instance().doesExist(outName)) AnalysisDataService::Instance().remove(outName); - // set more properties on the workspace - try { - // this is a static method that is why it is passing the - // file object and the file path - loadEntryMetadata<EventWorkspaceCollection_sptr>(m_filename, m_ws, - m_top_entry_name); - } catch (std::runtime_error &e) { - // Missing metadata is not a fatal error. Log and go on with your life - g_log.error() << "Error loading metadata: " << e.what() << '\n'; - } - // --------------------------- Time filtering // ------------------------------------ double filter_time_start_sec, filter_time_stop_sec;