diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h index c43254191aa8..c85cbb505054 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h @@ -117,7 +117,7 @@ class DLLExport LoadDetectorInfo : public API::Algorithm void readLibisisNXS(::NeXus::File *hFile, std::vector &detStruct,std::vector&detType,std::vector &detOffset,std::vector &detList); void readDetDotDatNXS(::NeXus::File *hFile, std::vector &detStruct,std::vector&detType,std::vector &detOffset,std::vector &detList); - void setDetectorParams(const detectorInfo ¶ms, detectorInfo &changed); + void setDetectorParams(const detectorInfo ¶ms, detectorInfo &changed,bool doLogging=true); void adjDelayTOFs(double lastOffset, bool &differentDelays, const std::vector &detectIDs=std::vector(), const std::vector &delays=std::vector()); void adjDelayTOFs(double lastOffset, bool &differentDelays, const detid_t * const detectIDs, const float * const delays, int numDetectors); void adjustXs(const std::vector &detIDs, const std::vector &offsets); diff --git a/Code/Mantid/Framework/DataHandling/src/LoadDetectorInfo.cpp b/Code/Mantid/Framework/DataHandling/src/LoadDetectorInfo.cpp index b88cc8c52ac8..20c6d6833330 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadDetectorInfo.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadDetectorInfo.cpp @@ -423,7 +423,7 @@ void LoadDetectorInfo::readRAW(const std::string& fName) * @param change :: if the parameters are successfully changed they are stored here * @throw NotFoundError if a pointer to the specified detector couldn't be retrieved */ -void LoadDetectorInfo::setDetectorParams(const detectorInfo ¶ms, detectorInfo &change) +void LoadDetectorInfo::setDetectorParams(const detectorInfo ¶ms, detectorInfo &change,bool doLogging) { Geometry::IDetector_const_sptr det = m_instrument->getDetector(params.detID); // Set the detectors pressure. @@ -445,7 +445,8 @@ void LoadDetectorInfo::setDetectorParams(const detectorInfo ¶ms, detectorInf // this operation has been successful if we are here, the following information is useful for logging - change = params; + if(doLogging) + change = params; } /** Decides if the bin boundaries for all non-monitor spectra will be the same and runs the appropriate @@ -847,10 +848,10 @@ void LoadDetectorInfo::readNXS(const std::string& fName) bool noneSet = true; size_t detectorProblemCount(0); - PRAGMA(omp parallel for reduction(|| : differentOffsets)) + //PRAGMA(omp parallel for reduction(|| : differentOffsets)) for(int i=0;i(i)); interruption_point(); } } } - PARALLEL_END_INTERUPT_REGION + //PARALLEL_END_INTERUPT_REGION } - PARALLEL_CHECK_INTERUPT_REGION + //PARALLEL_CHECK_INTERUPT_REGION sometimesLogSuccess(log, noneSet = true); g_log.notice() << "Adjusting time of flight X-values by detector delay times, detector have the different offsets: "<< differentOffsets << std::endl; diff --git a/Code/Mantid/Framework/DataHandling/test/LoadDetectorInfoTest.h b/Code/Mantid/Framework/DataHandling/test/LoadDetectorInfoTest.h index 2c6ad99ed6a5..ba4f3b9e0be8 100644 --- a/Code/Mantid/Framework/DataHandling/test/LoadDetectorInfoTest.h +++ b/Code/Mantid/Framework/DataHandling/test/LoadDetectorInfoTest.h @@ -450,6 +450,7 @@ class LoadDetectorInfoTest : public CxxTest::TestSuite if ( code[j] == "3" ) { TS_ASSERT(par); + if(!par)return; if (singleWallPressure) { TS_ASSERT_DELTA(par->value(),boost::lexical_cast(pressure[j]),1.e-3); @@ -462,6 +463,7 @@ class LoadDetectorInfoTest : public CxxTest::TestSuite par = pmap.get(baseComp,"wallT(m)"); TS_ASSERT(par); + if(!par)return; if(singleWallPressure) { if(j<3)TS_ASSERT_DELTA(par->value(), boost::lexical_cast(wallThick[j]),1.e-3);