Skip to content

Commit

Permalink
Tidy up Instrument.h
Browse files Browse the repository at this point in the history
Some users of Instrument now require a couple of extra headers.
Refs #8784
  • Loading branch information
martyngigg committed Feb 10, 2014
1 parent 98845ef commit 6d5c348
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
6 changes: 4 additions & 2 deletions Code/Mantid/Framework/API/src/MatrixWorkspace.cpp
@@ -1,16 +1,18 @@
#include "MantidAPI/MatrixWorkspace.h"
#include <numeric>
#include <boost/math/special_functions/fpclassify.hpp>
#include "MantidAPI/NumericAxis.h"
#include "MantidAPI/SpectraAxis.h"
#include "MantidAPI/MatrixWorkspaceMDIterator.h"
#include "MantidAPI/SpectrumDetectorMapping.h"
#include "MantidAPI/WorkspaceIteratorCode.h"
#include "MantidGeometry/Instrument/Detector.h"
#include "MantidGeometry/Instrument/DetectorGroup.h"
#include "MantidGeometry/Instrument/NearestNeighboursFactory.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
#include "MantidKernel/TimeSeriesProperty.h"

#include <numeric>
#include <boost/math/special_functions/fpclassify.hpp>

using Mantid::Kernel::DateAndTime;
using Mantid::Kernel::TimeSeriesProperty;
using NeXus::NXcompression;
Expand Down
Expand Up @@ -2,13 +2,11 @@
#define MANTID_API_MATRIXWORKSPACEMDITERATORTEST_H_

#include "MantidAPI/MatrixWorkspaceMDIterator.h"
#include "MantidKernel/System.h"
#include "MantidKernel/Timer.h"
#include "MantidGeometry/Instrument.h"
#include "MantidGeometry/Instrument/Detector.h"
#include "MantidTestHelpers/FakeObjects.h"

#include <cxxtest/TestSuite.h>
#include <iomanip>
#include <iostream>

using namespace Mantid;
using namespace Mantid::API;
Expand Down
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/API/test/MatrixWorkspaceTest.h
Expand Up @@ -8,11 +8,13 @@
#include "MantidAPI/SpectrumDetectorMapping.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidGeometry/Instrument.h"
#include "MantidGeometry/Instrument/Detector.h"
#include "MantidKernel/TimeSeriesProperty.h"
#include "MantidKernel/VMD.h"
#include "MantidTestHelpers/FakeGmockObjects.h"
#include "MantidTestHelpers/FakeObjects.h"
#include "MantidTestHelpers/NexusTestHelper.h"

#include <cxxtest/TestSuite.h>
#include <boost/make_shared.hpp>

Expand Down
16 changes: 8 additions & 8 deletions Code/Mantid/Framework/Geometry/inc/MantidGeometry/Instrument.h
Expand Up @@ -4,16 +4,16 @@
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidKernel/cow_ptr.h"
#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/Logger.h"
#include "MantidGeometry/DllConfig.h"
#include "MantidGeometry/IDetector.h"
#include "MantidGeometry/Instrument/CompAssembly.h"
#include "MantidGeometry/Instrument/ObjComponent.h"
#include "MantidGeometry/Instrument/Detector.h"

#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/Logger.h"

#include <string>
#include <map>
#include <ostream>

namespace Mantid
{
Expand Down Expand Up @@ -118,7 +118,7 @@ namespace Mantid
void markAsMonitor(IDetector*);

/// Remove a detector from the instrument
void removeDetector(Detector*);
void removeDetector(IDetector*);

/// return reference to detector cache
void getDetectors(detid2det_map & out_map) const;
Expand Down Expand Up @@ -182,11 +182,11 @@ namespace Mantid

/// Set the date from which the instrument definition begins to be valid.
/// @param val :: date
void setValidFromDate(const Kernel::DateAndTime val);
void setValidFromDate(const Kernel::DateAndTime & val);

/// Set the date at which the instrument definition is no longer valid.
/// @param val :: date
void setValidToDate(const Kernel::DateAndTime val) { m_ValidTo = val; }
void setValidToDate(const Kernel::DateAndTime & val) { m_ValidTo = val; }

// Methods for use with indirect geometry instruments,
// where the physical instrument differs from the 'neutronic' one
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/Geometry/src/Instrument.cpp
Expand Up @@ -8,10 +8,10 @@
#include "MantidGeometry/Instrument/DetectorGroup.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
#include "MantidGeometry/Instrument/RectangularDetector.h"

#include <Poco/Path.h>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <Poco/Path.h>
#include <queue>

using namespace Mantid::Kernel;
Expand Down Expand Up @@ -758,7 +758,7 @@ namespace Mantid
* The object is deleted.
* @param det The detector to remove
*/
void Instrument::removeDetector(Detector* det)
void Instrument::removeDetector(IDetector* det)
{
if (m_isParametrized)
throw std::runtime_error("Instrument::removeDetector() called on a parameterized Instrument object.");
Expand Down Expand Up @@ -1236,7 +1236,7 @@ namespace Mantid
/// Set the date from which the instrument definition begins to be valid.
/// @param val :: date and time
/// @throw InstrumentDefinitionError Thrown if date is earlier than 1900-01-31 23:59:01
void Instrument::setValidFromDate(const Kernel::DateAndTime val)
void Instrument::setValidFromDate(const Kernel::DateAndTime & val)
{
Kernel::DateAndTime earliestAllowedDate("1900-01-31 23:59:01");
if ( val < earliestAllowedDate )
Expand Down
4 changes: 1 addition & 3 deletions Code/Mantid/Framework/Geometry/test/ParInstrumentTest.h
Expand Up @@ -4,9 +4,7 @@
#include <cxxtest/TestSuite.h>

#include "MantidGeometry/Instrument.h"
#include "MantidKernel/Exception.h"
#include "MantidGeometry/Instrument/DetectorGroup.h"
#include "MantidKernel/cow_ptr.h"
#include "MantidGeometry/Instrument/Detector.h"

using namespace Mantid::Kernel;
using namespace Mantid::Geometry;
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Geometry/test/ParameterMapTest.h
Expand Up @@ -2,6 +2,7 @@
#define PARAMETERMAPTEST_H_

#include "MantidGeometry/Instrument/ParameterMap.h"
#include "MantidGeometry/Instrument/Detector.h"
#include "MantidTestHelpers/ComponentCreationHelper.h"
#include <cxxtest/TestSuite.h>

Expand Down

0 comments on commit 6d5c348

Please sign in to comment.