Skip to content
Snippets Groups Projects
InstrumentGeometryAbstraction.h 1.67 KiB
Newer Older
#ifndef INSTRUMENT_ABSTRACT_BUILDER_H
#define INSTRUMENT_ABSTRACT_BUILDER_H

//----------------------
// Includes
//----------------------

#include "MantidGeometry/Instrument_fwd.h"
#include "MantidGeometry/Instrument/ObjCompAssembly.h"
#include "MantidNexusGeometry/InstrumentAbstractBuilder.h"
#include "MantidNexusGeometry/ShapeGeometryAbstraction.h"

#include "Eigen/Core"
#include <string>

Owen Arnold's avatar
Owen Arnold committed
namespace Mantid {
namespace NexusGeometry {
Owen Arnold's avatar
Owen Arnold committed
class DLLExport InstrumentGeometryAbstraction
    : public NexusGeometry::InstrumentAbstractBuilder<
          InstrumentGeometryAbstraction> {
public:
  /// Constructor creates the instrument
  InstrumentGeometryAbstraction(const std::string &instrumentName);
  /// Adds component to instrument
Owen Arnold's avatar
Owen Arnold committed
  Geometry::IComponent *addComponent(const std::string &compName,
                                     const Eigen::Vector3d &position);
Owen Arnold's avatar
Owen Arnold committed
  /// Adds detector to instrument
Owen Arnold's avatar
Owen Arnold committed
  void addDetector(const std::string &detName, int detId,
                   const Eigen::Vector3d &position, objectHolder &shape);
  /// Adds detector to instrument
  void addMonitor(const std::string &detName, int detId,
                  const Eigen::Vector3d &position, objectHolder &shape);
Owen Arnold's avatar
Owen Arnold committed
  /// Sorts detectors
  void sortDetectors();
  /// Add sample
Owen Arnold's avatar
Owen Arnold committed
  void addSample(const std::string &sampleName,
                 const Eigen::Vector3d &position);
Owen Arnold's avatar
Owen Arnold committed
  /// Add source
Owen Arnold's avatar
Owen Arnold committed
  void addSource(const std::string &sourceName,
                 const Eigen::Vector3d &position);
Owen Arnold's avatar
Owen Arnold committed
  /// Returns underlying instrument
  Geometry::Instrument_sptr _unAbstractInstrument() {
    return this->instrument_sptr;
  }

private:
  Geometry::Instrument_sptr instrument_sptr;
Owen Arnold's avatar
Owen Arnold committed
#endif // INSTRUMENT_ABSTRACT_BUILDER_H