From 54ec19b35adac17954df88ee6847795adc828da8 Mon Sep 17 00:00:00 2001 From: LamarMoore <lamar.moore@stfc.ac.uk> Date: Fri, 15 Sep 2017 07:21:26 +0100 Subject: [PATCH] Updated codebase with new DateAndTime --- Framework/Algorithms/src/CalculateCountRate.cpp | 4 ++-- Framework/DataObjects/inc/MantidDataObjects/Events.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Framework/Algorithms/src/CalculateCountRate.cpp b/Framework/Algorithms/src/CalculateCountRate.cpp index 129cf2f368f..94a67999e1e 100644 --- a/Framework/Algorithms/src/CalculateCountRate.cpp +++ b/Framework/Algorithms/src/CalculateCountRate.cpp @@ -269,8 +269,8 @@ void CalculateCountRate::calcRateLog( double dt = (dTRangeMax - dTRangeMin) / static_cast<double>(m_numLogSteps); auto t0 = m_TRangeMin.totalNanoseconds(); for (auto i = 0; i < m_numLogSteps; i++) { - times[i] = Mantid::Types::DateAndTime( - t0 + static_cast<int64_t>((0.5 + double(i)) * dt)); + times[i] = + Mantid::Types::DateAndTime(t0 + static_cast<int64_t>((0.5 + double(i)) * dt)); } // store calculated values within the target log. targLog->replaceValues(times, countRate); diff --git a/Framework/DataObjects/inc/MantidDataObjects/Events.h b/Framework/DataObjects/inc/MantidDataObjects/Events.h index d6d04faa74c..30f7b805a4e 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/Events.h +++ b/Framework/DataObjects/inc/MantidDataObjects/Events.h @@ -6,6 +6,7 @@ #endif #include "MantidAPI/MatrixWorkspace_fwd.h" // get MantidVec declaration #include "MantidKernel/System.h" +#include "MantidTypes/DateAndTime.h" #include "MantidKernel/TimeSplitter.h" #include "MantidKernel/cow_ptr.h" #include "MantidTypes/DateAndTime.h" @@ -181,9 +182,7 @@ inline double WeightedEventNoTime::tof() const { return m_tof; } /** Return the pulse time; this returns 0 since this * type of Event has no time associated. */ -inline Mantid::Types::DateAndTime WeightedEventNoTime::pulseTime() const { - return 0; -} +inline Mantid::Types::DateAndTime WeightedEventNoTime::pulseTime() const { return 0; } /// Return the weight of the neutron, as a double (it is saved as a float). inline double WeightedEventNoTime::weight() const { return m_weight; } -- GitLab