BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Instrument Class Reference

Description

Assembles beam, detector and their relative positions with respect to the sample.

Definition at line 26 of file Instrument.h.

Collaboration diagram for Instrument:
[legend]

Public Member Functions

 Instrument (const Beam &beam, const IDetector &detector)
 
 ~Instrument ()
 
const Beam & beam () const
 
const IDetector & detector () const
 

Protected Attributes

std::unique_ptr< Beam > m_beam
 
std::unique_ptr< IDetector > m_detector
 

Constructor & Destructor Documentation

◆ Instrument()

Instrument::Instrument ( const Beam &  beam,
const IDetector &  detector 
)

Definition at line 19 of file Instrument.cpp.

20  : m_beam(beam.clone()) // TODO take ownership of pointer arg instead of cloning
21  , m_detector(detector.clone())
22 {
23 }
const IDetector & detector() const
Definition: Instrument.h:32
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

◆ ~Instrument()

Instrument::~Instrument ( )
default

Member Function Documentation

◆ beam()

const Beam& Instrument::beam ( ) const
inline

Definition at line 31 of file Instrument.h.

31 { return *m_beam; }

References m_beam.

◆ detector()

const IDetector& Instrument::detector ( ) const
inline

Definition at line 32 of file Instrument.h.

32 { return *m_detector; }

References m_detector.

Member Data Documentation

◆ m_beam

std::unique_ptr<Beam> Instrument::m_beam
protected

Definition at line 35 of file Instrument.h.

Referenced by beam().

◆ m_detector

std::unique_ptr<IDetector> Instrument::m_detector
protected

Definition at line 36 of file Instrument.h.

Referenced by detector().


The documentation for this class was generated from the following files: