Mantid
Loading...
Searching...
No Matches
LiveListener.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX-License-Identifier: GPL-3.0+
9
10namespace Mantid::API {
11
16std::shared_ptr<Workspace> LiveListener::extractData() {
18 auto workspace = doExtractData();
20 return workspace;
21}
22
25
28
31 const bool retval = m_dataReset;
32 // Should this be done here or should extractData do it?
33 m_dataReset = false;
34 return retval;
35}
36
41void LiveListener::setSpectra(const std::vector<specnum_t> &specList) { UNUSED_ARG(specList); }
42
47void LiveListener::setAlgorithm(const IAlgorithm &callingAlgorithm) { this->updatePropertyValues(callingAlgorithm); }
48
49} // namespace Mantid::API
IPeaksWorkspace_sptr workspace
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Definition System.h:44
IAlgorithm is the interface implemented by the Algorithm base class.
Definition IAlgorithm.h:45
std::shared_ptr< Workspace > extractData() final
Template-method entry point for extracting accumulated data.
virtual std::shared_ptr< Workspace > doExtractData()=0
Listener-specific workspace-construction step invoked by the extractData() template method.
virtual void onBeforeExtract()
Hook invoked by extractData() immediately before doExtractData().
virtual void onAfterExtract()
Hook invoked by extractData() immediately after doExtractData() returns normally and before the works...
void setAlgorithm(const class IAlgorithm &callingAlgorithm) override
Default behaviour updates property values on Listener using those on calling algorithm.
void setSpectra(const std::vector< specnum_t > &specList) override
Default behaviour reads all spectrum numbers.
bool m_dataReset
Indicates receipt of a reset signal from the DAS.
bool dataReset() override
Indicates that a reset (or period change?) signal has been received from the DAS.
void updatePropertyValues(const IPropertyManager &other)
Update values of the existing properties.