BornAgain  1.18.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 scattering at grazing incidence
4 //
5 //! @file Core/Computation/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 #ifndef BORNAGAIN_CORE_COMPUTATION_DEPTHPROBECOMPUTATIONTERM_H
16 #define BORNAGAIN_CORE_COMPUTATION_DEPTHPROBECOMPUTATIONTERM_H
17 
18 #include <memory>
19 
21 class ProcessedSample;
22 class ProgressHandler;
23 class DepthProbeElement;
24 
26 {
27 public:
30 
31  void setProgressHandler(ProgressHandler* p_progress);
32 
33  void compute(DepthProbeElement& elem) const;
34 
35 private:
37  std::unique_ptr<DelayedProgressCounter> mP_progress_counter;
38 };
39 
40 #endif // BORNAGAIN_CORE_COMPUTATION_DEPTHPROBECOMPUTATIONTERM_H
Counter for reporting progress (with delay interval) in a threaded computation.
DepthProbeComputationTerm(const ProcessedSample *p_sample)
void setProgressHandler(ProgressHandler *p_progress)
std::unique_ptr< DelayedProgressCounter > mP_progress_counter
void compute(DepthProbeElement &elem) const
const ProcessedSample * mp_sample
Data structure that contains all the necessary data for scattering calculations.
Maintains information about progress of a computation.