BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Instrument.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Device/Instrument.h
6 //! @brief Defines class Instrument.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef USER_API
16 #ifndef BORNAGAIN_GUI_MODEL_DEVICE_INSTRUMENT_H
17 #define BORNAGAIN_GUI_MODEL_DEVICE_INSTRUMENT_H
18 
19 #include <memory>
20 
21 class Beam;
22 class IDetector;
23 
24 //! Assembles beam, detector and their relative positions with respect to the sample.
25 
26 class Instrument {
27 public:
28  Instrument(const Beam& beam, const IDetector& detector);
30 
31  const Beam& beam() const { return *m_beam; }
32  const IDetector& detector() const { return *m_detector; }
33 
34 protected:
35  std::unique_ptr<Beam> m_beam;
36  std::unique_ptr<IDetector> m_detector;
37 };
38 
39 #endif // BORNAGAIN_GUI_MODEL_DEVICE_INSTRUMENT_H
40 #endif // USER_API
Assembles beam, detector and their relative positions with respect to the sample.
Definition: Instrument.h:26
const IDetector & detector() const
Definition: Instrument.h:32
Instrument(const Beam &beam, const IDetector &detector)
Definition: Instrument.cpp:19
const Beam & beam() const
Definition: Instrument.h:31
std::unique_ptr< Beam > m_beam
Definition: Instrument.h:35
std::unique_ptr< IDetector > m_detector
Definition: Instrument.h:36