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

Description

Definition at line 37 of file BackgroundItems.h.

Inheritance diagram for ConstantBackgroundItem:
[legend]
Collaboration diagram for ConstantBackgroundItem:
[legend]

Public Member Functions

 ConstantBackgroundItem ()
 
std::unique_ptr< IBackground > createBackground () const override
 
 DOUBLE_PROPERTY (backgroundValue, BackgroundValue)
 
void serialize (Streamer &s) override
 

Constructor & Destructor Documentation

◆ ConstantBackgroundItem()

ConstantBackgroundItem::ConstantBackgroundItem ( )

Definition at line 21 of file BackgroundItems.cpp.

22 {
23  m_backgroundValue.init("Background value", "Constant background value", 0.0, "counts/pixel", 3,
24  RealLimits::nonnegative(), "value");
25 }

Member Function Documentation

◆ createBackground()

std::unique_ptr< IBackground > ConstantBackgroundItem::createBackground ( ) const
overridevirtual

Implements BackgroundItem.

Definition at line 27 of file BackgroundItems.cpp.

28 {
29  return std::make_unique<ConstantBackground>(m_backgroundValue);
30 }

◆ DOUBLE_PROPERTY()

ConstantBackgroundItem::DOUBLE_PROPERTY ( backgroundValue  ,
BackgroundValue   
)

◆ serialize()

void ConstantBackgroundItem::serialize ( Streamer s)
overridevirtual

Reimplemented from BackgroundItem.

Definition at line 32 of file BackgroundItems.cpp.

33 {
34  s.assertVersion(0);
35  Serialize::rwProperty(s, m_backgroundValue);
36 }
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Definition: Streamer.cpp:26
void rwProperty(Streamer &s, DoubleProperty &d)

References Streamer::assertVersion(), and Serialize::rwProperty().

Here is the call graph for this function:

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