Skip to content

Commit

Permalink
Refs #4472: search/replace to use camelCase convention
Browse files Browse the repository at this point in the history
in DateAndTime methods.
  • Loading branch information
Janik Zikovsky committed Feb 22, 2012
1 parent 101e2eb commit ac44e8e
Show file tree
Hide file tree
Showing 46 changed files with 178 additions and 172 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ namespace Mantid
try
{
if (!m_isChildAlgorithm) m_running = true;
start_time = Mantid::Kernel::DateAndTime::get_current_time();
start_time = Mantid::Kernel::DateAndTime::getCurrentTime();
//count used for defining the algorithm execution order
++Algorithm::g_execCount;
// Start a timer
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/AlgorithmHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void AlgorithmHistory::printSelf(std::ostream& os, const int indent)const
os << std::string(indent,' ') << " v" << m_version << std::endl;
if (m_executionDate != Mantid::Kernel::DateAndTime::defaultTime())
{
os << std::string(indent,' ') << "Execution Date: " << m_executionDate.to_string() <<std::endl;
os << std::string(indent,' ') << "Execution Date: " << m_executionDate.toFormattedString() <<std::endl;
os << std::string(indent,' ') << "Execution Duration: "<< m_executionDuration << " seconds" << std::endl;
}
std::vector<Kernel::PropertyHistory>::const_iterator it;
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/DeprecatedAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace API
// TODO warn people that it wasn't set
return;
}
if (!Kernel::DateAndTime::string_isISO8601(date)) {
if (!Kernel::DateAndTime::stringIsISO8601(date)) {
// TODO warn people that it wasn't set
return;
}
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/API/src/ExperimentInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ namespace API
else
{
g_log.information("run_start not stored in workspace. Default to current date.");
date = Kernel::DateAndTime::get_current_time().to_ISO8601_string();
date = Kernel::DateAndTime::getCurrentTime().toISO8601String();
}
return date;
}
Expand Down Expand Up @@ -508,9 +508,9 @@ namespace API
// Use a default valid-to date if none was found.
DateAndTime to;
if (validTo.length() > 0)
to.set_from_ISO8601_string(validTo);
to.setFromISO8601(validTo);
else
to.set_from_ISO8601_string("2100-01-01");
to.setFromISO8601("2100-01-01");

if ( from <= d && d <= to )
{
Expand Down Expand Up @@ -539,7 +539,7 @@ namespace API
std::string ExperimentInfo::getInstrumentFilename(const std::string &instrumentName)
{
// Just use the current date
const std::string date = Kernel::DateAndTime::get_current_time().to_ISO8601_string();
const std::string date = Kernel::DateAndTime::getCurrentTime().toISO8601String();
return ExperimentInfo::getInstrumentFilename(instrumentName, date);
}

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/PropertyNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ namespace PropertyNexus
timeSec[i] = double(times[i].total_nanoseconds() - start.total_nanoseconds()) * 1e-9;
file->writeData("time", timeSec);
file->openData("time");
file->putAttr("start", start.to_ISO8601_string() );
file->putAttr("start", start.toISO8601String() );
file->closeData();
}

Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/API/src/Run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ Kernel::Logger& Run::g_log = Kernel::Logger::get("Run");
*/
void Run::setStartAndEndTime(const Kernel::DateAndTime & start, const Kernel::DateAndTime & end)
{
this->addProperty<std::string>("start_time", start.to_ISO8601_string(), true);
this->addProperty<std::string>("end_time", end.to_ISO8601_string(), true);
this->addProperty<std::string>("start_time", start.toISO8601String(), true);
this->addProperty<std::string>("end_time", end.toISO8601String(), true);
}

/// Return the run start time
Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/API/test/ExperimentInfoTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ class ExperimentInfoTest : public CxxTest::TestSuite
found = l_filenamePart.find("_Definition");
fromToEntry ft;
ft.path = dir_itr->path();
ft.from.set_from_ISO8601_string(validFrom);
ft.from.setFromISO8601(validFrom);
// Valid TO is optional
if (validTo.length() > 0)
ft.to.set_from_ISO8601_string(validTo);
ft.to.setFromISO8601(validTo);
else
ft.to.set_from_ISO8601_string("2100-01-01");
ft.to.setFromISO8601("2100-01-01");

idfFiles.insert( std::pair<std::string,fromToEntry>(l_filenamePart.substr(0,found),
ft) );
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Algorithms/src/AddSampleLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void AddSampleLog::exec()
double val;
if (!Strings::convert(propValue, val))
throw std::invalid_argument("Error interpreting string '" + propValue + "' as a number.");
Kernel::DateAndTime now = Kernel::DateAndTime::get_current_time();
Kernel::DateAndTime now = Kernel::DateAndTime::getCurrentTime();
TimeSeriesProperty<double> * tsp = new TimeSeriesProperty<double>(propName);
tsp->addValue(now, val);
theRun.addLogData(tsp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ namespace Algorithms
outfile << "# Base and up give directions of unit vectors for a local\n";
outfile << "# x,y coordinate system on the face of the detector.\n";
outfile << "#\n";
std::time_t current_t = DateAndTime::get_current_time().to_time_t() ;
std::time_t current_t = DateAndTime::getCurrentTime().to_time_t() ;
std::tm * current = gmtime( &current_t );
outfile << "# "<<asctime (current) <<"\n";
outfile << "#\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,9 @@ namespace Algorithms
g_log.information() << "Number of Inverted Time Stamps = " << countinverse << std::endl;
g_log.information() << "Run Start = " << t0.total_nanoseconds() << std::endl;
g_log.information() << "First Log (Absolute Time, Relative Time): " << times[0].total_nanoseconds() << ", "
<< Kernel::DateAndTime::nanoseconds_from_duration(dts) << std::endl;
<< Kernel::DateAndTime::nanosecondsFromDuration(dts) << std::endl;
g_log.information() << "Last Log (Absolute Time, Relative Time): " << times[f].total_nanoseconds() << ", "
<< Kernel::DateAndTime::nanoseconds_from_duration(dtf) << std::endl;
<< Kernel::DateAndTime::nanosecondsFromDuration(dtf) << std::endl;

return;
}
Expand Down
16 changes: 8 additions & 8 deletions Code/Mantid/Framework/Algorithms/test/AddLogDerivativeTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ class AddLogDerivativeTest : public CxxTest::TestSuite
if (!p) return;

TS_ASSERT_EQUALS( p->size(), 3);
TS_ASSERT_EQUALS( p->nthTime(0).to_ISO8601_string(), "2007-11-30T16:17:05");
TS_ASSERT_EQUALS( p->nthTime(0).toISO8601String(), "2007-11-30T16:17:05");
TS_ASSERT_DELTA( p->nthValue(0), 0.1, 1e-5);
TS_ASSERT_EQUALS( p->nthTime(1).to_ISO8601_string(), "2007-11-30T16:17:15");
TS_ASSERT_EQUALS( p->nthTime(1).toISO8601String(), "2007-11-30T16:17:15");
TS_ASSERT_DELTA( p->nthValue(1), -0.2, 1e-5);
TS_ASSERT_EQUALS( p->nthTime(2).to_ISO8601_string(), "2007-11-30T16:17:25");
TS_ASSERT_EQUALS( p->nthTime(2).toISO8601String(), "2007-11-30T16:17:25");
TS_ASSERT_DELTA( p->nthValue(2), 0.5, 1e-5);
}

Expand All @@ -101,9 +101,9 @@ class AddLogDerivativeTest : public CxxTest::TestSuite
if (!p) return;

TS_ASSERT_EQUALS( p->size(), 2);
TS_ASSERT_EQUALS( p->nthTime(0).to_ISO8601_string(), "2007-11-30T16:17:10");
TS_ASSERT_EQUALS( p->nthTime(0).toISO8601String(), "2007-11-30T16:17:10");
TS_ASSERT_DELTA( p->nthValue(0), -0.03, 1e-5);
TS_ASSERT_EQUALS( p->nthTime(1).to_ISO8601_string(), "2007-11-30T16:17:20");
TS_ASSERT_EQUALS( p->nthTime(1).toISO8601String(), "2007-11-30T16:17:20");
TS_ASSERT_DELTA( p->nthValue(1), 0.07, 1e-5);
}

Expand All @@ -113,7 +113,7 @@ class AddLogDerivativeTest : public CxxTest::TestSuite
if (!p) return;

TS_ASSERT_EQUALS( p->size(), 1);
TS_ASSERT_EQUALS( p->nthTime(0).to_ISO8601_string(), "2007-11-30T16:17:15");
TS_ASSERT_EQUALS( p->nthTime(0).toISO8601String(), "2007-11-30T16:17:15");
TS_ASSERT_DELTA( p->nthValue(0), 0.01, 1e-5);
}

Expand All @@ -123,9 +123,9 @@ class AddLogDerivativeTest : public CxxTest::TestSuite
TimeSeriesProperty<double> * p = do_test(1, false, true);
if (!p) return;
TS_ASSERT_EQUALS( p->size(), 5);
TS_ASSERT_EQUALS( p->nthTime(3).to_ISO8601_string(), "2007-11-30T16:17:35");
TS_ASSERT_EQUALS( p->nthTime(3).toISO8601String(), "2007-11-30T16:17:35");
TS_ASSERT_DELTA( p->nthValue(3), 1.0, 1e-5);
TS_ASSERT_EQUALS( p->nthTime(4).to_ISO8601_string(), "2007-11-30T16:17:45");
TS_ASSERT_EQUALS( p->nthTime(4).toISO8601String(), "2007-11-30T16:17:45");
TS_ASSERT_DELTA( p->nthValue(4), 0.5, 1e-5);
}

Expand Down
10 changes: 5 additions & 5 deletions Code/Mantid/Framework/Algorithms/test/ChangePulsetimeTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,27 @@ class ChangePulsetimeTest : public CxxTest::TestSuite
for (size_t wi=10; wi < 20; wi++)
{
double secs;
secs = DateAndTime::seconds_from_duration(out_ws->getEventList(wi).getEvent(0).pulseTime() - DateAndTime("2010-01-01"));
secs = DateAndTime::secondsFromDuration(out_ws->getEventList(wi).getEvent(0).pulseTime() - DateAndTime("2010-01-01"));
TS_ASSERT_DELTA(secs, 1000.0, 1e-5);
secs = DateAndTime::seconds_from_duration(out_ws->getEventList(wi).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
secs = DateAndTime::secondsFromDuration(out_ws->getEventList(wi).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
TS_ASSERT_DELTA(secs, 1001.0, 1e-5);
}

// If only modifying SOME spectra, check that the others did not change
if (WorkspaceIndexList != "")
{
double secs;
secs = DateAndTime::seconds_from_duration(out_ws->getEventList(0).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
secs = DateAndTime::secondsFromDuration(out_ws->getEventList(0).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
TS_ASSERT_DELTA(secs, 1.0, 1e-5);
secs = DateAndTime::seconds_from_duration(out_ws->getEventList(30).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
secs = DateAndTime::secondsFromDuration(out_ws->getEventList(30).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
TS_ASSERT_DELTA(secs, 1.0, 1e-5);
}

// If not inplace, then the original did not change
if (in_ws_name != out_ws_name)
{
double secs;
secs = DateAndTime::seconds_from_duration(in_ws->getEventList(0).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
secs = DateAndTime::secondsFromDuration(in_ws->getEventList(0).getEvent(2).pulseTime() - DateAndTime("2010-01-01"));
TS_ASSERT_DELTA(secs, 1.0, 1e-5);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class FilterEventsHighFrequencyTest : public CxxTest::TestSuite
std::string logname, size_t lenlog, double dtof){

// 1. Add run_start
iws->mutableRun().addProperty("run_start", run_start.to_ISO8601_string(), true);
iws->mutableRun().addProperty("run_start", run_start.toISO8601String(), true);

// 2. Add a log at the same intervals to events added
Kernel::TimeSeriesProperty<double> *timeprop = new Kernel::TimeSeriesProperty<double>(logname);
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/src/LoadIsawPeaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace Crystal
std::string date;
tag = getWord( in , false );
if(tag.empty())
date = Kernel::DateAndTime::get_current_time().to_ISO8601_string();
date = Kernel::DateAndTime::getCurrentTime().toISO8601String();
else if(tag == "Date:")
date = getWord( in , false );
readToEndOfLine( in , true );
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/src/SaveIsawPeaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ namespace Crystal
//TODO: The experiment date might be more useful than the instrument date.
// For now, this allows the proper instrument to be loaded back after saving.
Kernel::DateAndTime expDate = inst->getValidFromDate() + 1.0;
out << expDate.to_ISO8601_string() << std::endl;
out << expDate.toISO8601String() << std::endl;

out << "6 L1 T0_SHIFT" << std::endl;
out << "7 "<< std::setw( 10 ) ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace DataHandling
WorkspaceFactory::Instance().create("EventWorkspace", 2, 2, 1) );
// Set a sample tof range
m_rand->setRange(40000,60000);
m_rand->setSeed(Kernel::DateAndTime::get_current_time().total_nanoseconds());
m_rand->setSeed(Kernel::DateAndTime::getCurrentTime().total_nanoseconds());

return;
}
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadDAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ namespace Mantid
int numSpectra = static_cast<int>(localWorkspace->getNumberHistograms());
runDetails.addProperty("nspectra", numSpectra);

runDetails.addProperty("run_start", Kernel::DateAndTime::get_current_time().to_ISO8601_string());
runDetails.addProperty("run_start", Kernel::DateAndTime::getCurrentTime().toISO8601String());
}

double LoadDAE::dblSqrt(double in)
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ BankPulseTimes * LoadEventNexus::runLoadNexusLogs(const std::string &nexusfilena
Kernel::DateAndTime run_start = localWorkspace->getFirstPulseTime();
// add the start of the run as a ISO8601 date/time string. The start = first non-zero time.
// (this is used in LoadInstrument to find the right instrument file to use).
localWorkspace->mutableRun().addProperty("run_start", run_start.to_ISO8601_string(), true );
localWorkspace->mutableRun().addProperty("run_start", run_start.toISO8601String(), true );
}
else
alg->getLogger().warning() << "Empty proton_charge sample log. You will not be able to filter by time.\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void LoadEventPreNexus::exec()
{
// add the start of the run as a ISO8601 date/time string. The start = the first pulse.
// (this is used in LoadInstrument to find the right instrument file to use).
localWorkspace->mutableRun().addProperty("run_start", pulsetimes[0].to_ISO8601_string(), true );
localWorkspace->mutableRun().addProperty("run_start", pulsetimes[0].toISO8601String(), true );
}

// determine the run number and add it to the run object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void LoadEventPreNexus2::exec()
{
// add the start of the run as a ISO8601 date/time string. The start = the first pulse.
// (this is used in LoadInstrument to find the right instrument file to use).
localWorkspace->mutableRun().addProperty("run_start", pulsetimes[0].to_ISO8601_string(), true );
localWorkspace->mutableRun().addProperty("run_start", pulsetimes[0].toISO8601String(), true );
}

// b. determine the run number and add it to the run object
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/LoadLiveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ namespace DataHandling
MatrixWorkspace_sptr chunkWS = listener->extractData();

// TODO: Have the ILiveListener tell me exactly the time stamp
DateAndTime lastTimeStamp = DateAndTime::get_current_time();
this->setPropertyValue("LastTimeStamp", lastTimeStamp.to_ISO8601_string());
DateAndTime lastTimeStamp = DateAndTime::getCurrentTime();
this->setPropertyValue("LastTimeStamp", lastTimeStamp.toISO8601String());

// Now we process the chunk
Workspace_sptr processed = this->processChunk(chunkWS);
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ bool LoadLog::isAscii(const std::string& filename)
*/
bool LoadLog::isDateTimeString(const std::string& str) const
{
return DateAndTime::string_isISO8601(str.substr(0,19));
return DateAndTime::stringIsISO8601(str.substr(0,19));
}


Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadMuonNexus2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ namespace Mantid
{ // Duration taken to be stop_time minus stat_time
DateAndTime start(start_time);
DateAndTime end(stop_time);
double duration_in_secs = DateAndTime::seconds_from_duration( end - start);
double duration_in_secs = DateAndTime::secondsFromDuration( end - start);
runDetails.addProperty("dur_secs",duration_in_secs);
}

Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/LoadRawHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,11 @@ namespace Mantid
std::string isisDate = std::string(localISISRaw->rpb.r_enddate, 11);
if ( isisDate[0] == ' ' ) isisDate[0] = '0';
runDetails.addProperty("run_end", DateAndTime(isisDate.substr(7,4) + "-" + convertMonthLabelToIntStr(isisDate.substr(3,3))
+ "-" + isisDate.substr(0,2) + "T" + std::string(localISISRaw->rpb.r_endtime, 8)).to_ISO8601_string());
+ "-" + isisDate.substr(0,2) + "T" + std::string(localISISRaw->rpb.r_endtime, 8)).toISO8601String());
isisDate = std::string(localISISRaw->hdr.hd_date, 11);
if ( isisDate[0] == ' ' ) isisDate[0] = '0';
runDetails.addProperty("run_start", DateAndTime(isisDate.substr(7,4) + "-" + convertMonthLabelToIntStr(isisDate.substr(3,3))
+ "-" + isisDate.substr(0,2) + "T" + std::string(localISISRaw->hdr.hd_time, 8)).to_ISO8601_string());
+ "-" + isisDate.substr(0,2) + "T" + std::string(localISISRaw->hdr.hd_time, 8)).toISO8601String());
}

/// To help transforming date stored in ISIS raw file into iso 8601
Expand Down
6 changes: 6 additions & 0 deletions Code/Mantid/Framework/DataHandling/src/MonitorLiveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ namespace DataHandling
*/
void MonitorLiveData::init()
{
declareProperty(new PropertyWithValue<double>("UpdateEvery", 60.0, Direction::Input),
"Frequency of updates, in seconds. Default 60.");

this->initProps();
}

Expand All @@ -61,6 +64,9 @@ namespace DataHandling
*/
void MonitorLiveData::exec()
{
// The last time we called LoadLiveData.
// Since StartLiveData _just_ called it, use the current time.
DateAndTime lastTime = DateAndTime::getCurrentTime();
}


Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/ProcessDasNexusLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ namespace DataHandling
g_log.information() << "Number of Inverted Time Stamps = " << countinverse << std::endl;
g_log.information() << "Run Start = " << t0.total_nanoseconds() << std::endl;
g_log.information() << "First Log (Absolute Time, Relative Time): " << times[0].total_nanoseconds() << ", "
<< Kernel::DateAndTime::nanoseconds_from_duration(dts) << std::endl;
<< Kernel::DateAndTime::nanosecondsFromDuration(dts) << std::endl;
g_log.information() << "Last Log (Absolute Time, Relative Time): " << times[f].total_nanoseconds() << ", "
<< Kernel::DateAndTime::nanoseconds_from_duration(dtf) << std::endl;
<< Kernel::DateAndTime::nanosecondsFromDuration(dtf) << std::endl;

return;
}
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/SaveCalFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ namespace DataHandling

// Header of the file
std::ofstream fout(calFileName.c_str());
fout <<"# Calibration file for instrument " << inst->getName() << " written on " << DateAndTime::get_current_time().to_ISO8601_string() << ".\n";
fout <<"# Calibration file for instrument " << inst->getName() << " written on " << DateAndTime::getCurrentTime().toISO8601String() << ".\n";
fout <<"# Format: number UDET offset select group\n";

// Get all the detectors
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataHandling/src/StartLiveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace DataHandling

// Adjust the StartTime if you are starting from run/now.
if (FromNow)
this->setPropertyValue("StartTime", DateAndTime::get_current_time().to_ISO8601_string());
this->setPropertyValue("StartTime", DateAndTime::getCurrentTime().toISO8601String());
else if (FromStartOfRun)
// TODO: implement
throw Kernel::Exception::NotImplementedError("Cannot start from the run start yet.");
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/DataHandling/test/LoadEventNexusTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ class LoadEventNexusTest : public CxxTest::TestSuite
for (; it != logMap.end(); )
{
//Same times within a millisecond
//TS_ASSERT_DELTA( it->first, it2->first, DateAndTime::duration_from_seconds(1e-3));
//TS_ASSERT_DELTA( it->first, it2->first, DateAndTime::durationFromSeconds(1e-3));
//Same times?
TS_ASSERT_LESS_THAN( fabs(DateAndTime::seconds_from_duration(it->first - it2->first)), 1); //TODO: Fix the nexus file times here
TS_ASSERT_LESS_THAN( fabs(DateAndTime::secondsFromDuration(it->first - it2->first)), 1); //TODO: Fix the nexus file times here
//Same proton charge?
TS_ASSERT_DELTA( it->second, it2->second, 1e-5);
it++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class LoadLogsFromSNSNexusTest : public CxxTest::TestSuite
TS_ASSERT_DELTA( tsp->nthValue(1), 13715.55, 2);

//The time diff between the 0th and 1st entry is 0.328 seconds
TS_ASSERT_DELTA( DateAndTime::seconds_from_duration(tsp->nthInterval(0).length()), 0.328, 0.01);
TS_ASSERT_DELTA( DateAndTime::secondsFromDuration(tsp->nthInterval(0).length()), 0.328, 0.01);

//Now the stats

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LoadNexusLogsTest : public CxxTest::TestSuite
TS_ASSERT_DELTA( tsp->nthValue(1), 13715.55, 2);

//The time diff between the 0th and 1st entry is 0.328 seconds
TS_ASSERT_DELTA( Kernel::DateAndTime::seconds_from_duration(tsp->nthInterval(0).length()), 0.328, 0.01);
TS_ASSERT_DELTA( Kernel::DateAndTime::secondsFromDuration(tsp->nthInterval(0).length()), 0.328, 0.01);

//Now the stats

Expand Down

0 comments on commit ac44e8e

Please sign in to comment.