BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DepthProbeComputationTerm.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Core/Term/DepthProbeComputationTerm.h
6 //! @brief Defines functor DepthProbeComputationTerm.
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_CORE_TERM_DEPTHPROBECOMPUTATIONTERM_H
21 #define BORNAGAIN_CORE_TERM_DEPTHPROBECOMPUTATIONTERM_H
22 
23 #include <memory>
24 
26 class ProcessedSample;
27 class ProgressHandler;
28 class DepthProbeElement;
29 
31 public:
34 
35  void setProgressHandler(ProgressHandler* p_progress);
36 
37  void compute(DepthProbeElement& elem) const;
38 
39 private:
41  std::unique_ptr<DelayedProgressCounter> m_progress_counter;
42 };
43 
44 #endif // BORNAGAIN_CORE_TERM_DEPTHPROBECOMPUTATIONTERM_H
45 #endif // USER_API
Counter for reporting progress (with delay interval) in a threaded computation.
DepthProbeComputationTerm(const ProcessedSample *p_sample)
void setProgressHandler(ProgressHandler *p_progress)
const ProcessedSample * m_sample
std::unique_ptr< DelayedProgressCounter > m_progress_counter
void compute(DepthProbeElement &elem) const
Data structure that contains all the necessary data for scattering calculations.
Maintains information about progress of a computation.