Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Algorithms::MonIDPropChanger Class Reference

#include <NormaliseToMonitor.h>

Inheritance diagram for Mantid::Algorithms::MonIDPropChanger:
Mantid::Kernel::IPropertySettings

Public Member Functions

void applyChanges (const Mantid::Kernel::IPropertyManager *algo, Kernel::Property *const pProp) override
 The function user have to overload it in their custom code to modify the property according to the changes to other properties. More...
 
IPropertySettingsclone () const override
 Make a copy of the present type of IPropertySettings. More...
 
bool isConditionChanged (const Mantid::Kernel::IPropertyManager *algo, const std::string &changedPropName="") const override
 to verify if the properties, this one depends on have changed or other special condition occurs which needs the framework to react to More...
 
bool isEnabled (const Mantid::Kernel::IPropertyManager *algo) const override
 Is the property to be shown as "enabled" in the GUI. More...
 
 MonIDPropChanger (const std::string &WSProperty, const std::string &SpectrToNormByProperty, const std::string &MonitorWorkspace)
 
- Public Member Functions inherited from Mantid::Kernel::IPropertySettings
virtual void applyChanges (const IPropertyManager *, Property *const)
 The function user have to overload it in their custom code to modify the property according to the changes to other properties. More...
 
virtual IPropertySettingsclone () const =0
 Make a copy of the present type of IPropertySettings. More...
 
 IPropertySettings ()=default
 Constructor. More...
 
virtual bool isConditionChanged (const IPropertyManager *algo, const std::string &changedPropName="") const
 to verify if the properties, this one depends on have changed or other special condition occurs which needs the framework to react to More...
 
virtual bool isEnabled (const IPropertyManager *algo) const
 Is the property to be shown as "enabled" in the GUI. More...
 
virtual bool isVisible (const IPropertyManager *algo) const
 Is the property to be shown in the GUI? Default true. More...
 
virtual ~IPropertySettings ()=default
 Destructor. More...
 

Private Member Functions

bool monitorIdReader (const API::MatrixWorkspace_const_sptr &inputWS) const
 

Private Attributes

std::string hostWSname
 
std::vector< int > iExistingAllowedValues
 
bool is_enabled
 
std::string MonitorWorkspaceProp
 
std::string SpectraNum
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::Kernel::IPropertySettings
 IPropertySettings (const IPropertySettings &)=default
 

Detailed Description

Definition at line 120 of file NormaliseToMonitor.h.

Constructor & Destructor Documentation

◆ MonIDPropChanger()

Mantid::Algorithms::MonIDPropChanger::MonIDPropChanger ( const std::string &  WSProperty,
const std::string &  SpectrToNormByProperty,
const std::string &  MonitorWorkspace 
)
inline

Definition at line 125 of file NormaliseToMonitor.h.

Member Function Documentation

◆ applyChanges()

void Mantid::Algorithms::MonIDPropChanger::applyChanges ( const Mantid::Kernel::IPropertyManager ,
Kernel::Property *const   
)
overridevirtual

The function user have to overload it in their custom code to modify the property according to the changes to other properties.

Currently it has been tested to modify the property values as function of other properties

Allowed property values are obtained from property's allowedValues function, and the purpose the function interfaced here is to modify its output.

allowedValues function on propertyWithValue class obtains its data from a validator, so in the case of simple PropertyWithValue, this function has to replace the validator. For WorkspaceProperty, which obtains its values from dataservice and filters them by validators, a new validator has to be a new filter

Reimplemented from Mantid::Kernel::IPropertySettings.

Definition at line 75 of file NormaliseToMonitor.cpp.

References Mantid::Kernel::IPropertyManager::getProperty(), hostWSname, and iExistingAllowedValues.

◆ clone()

IPropertySettings * Mantid::Algorithms::MonIDPropChanger::clone ( ) const
inlineoverridevirtual

Make a copy of the present type of IPropertySettings.

Implements Mantid::Kernel::IPropertySettings.

Definition at line 136 of file NormaliseToMonitor.h.

◆ isConditionChanged()

bool Mantid::Algorithms::MonIDPropChanger::isConditionChanged ( const Mantid::Kernel::IPropertyManager algo,
const std::string &  changedPropName = "" 
) const
overridevirtual

to verify if the properties, this one depends on have changed or other special condition occurs which needs the framework to react to

Reimplemented from Mantid::Kernel::IPropertySettings.

Definition at line 64 of file NormaliseToMonitor.cpp.

References Mantid::Kernel::IPropertyManager::getProperty(), hostWSname, is_enabled, monitorIdReader(), and UNUSED_ARG.

◆ isEnabled()

bool Mantid::Algorithms::MonIDPropChanger::isEnabled ( const Mantid::Kernel::IPropertyManager algo) const
overridevirtual

Is the property to be shown as "enabled" in the GUI.

Default true.

Reimplemented from Mantid::Kernel::IPropertySettings.

Definition at line 40 of file NormaliseToMonitor.cpp.

References Mantid::Kernel::IPropertyManager::getProperty(), is_enabled, MonitorWorkspaceProp, and SpectraNum.

◆ monitorIdReader()

bool Mantid::Algorithms::MonIDPropChanger::monitorIdReader ( const API::MatrixWorkspace_const_sptr inputWS) const
private

Definition at line 97 of file NormaliseToMonitor.cpp.

References iExistingAllowedValues.

Referenced by isConditionChanged().

Member Data Documentation

◆ hostWSname

std::string Mantid::Algorithms::MonIDPropChanger::hostWSname
private

Definition at line 143 of file NormaliseToMonitor.h.

Referenced by applyChanges(), and isConditionChanged().

◆ iExistingAllowedValues

std::vector<int> Mantid::Algorithms::MonIDPropChanger::iExistingAllowedValues
mutableprivate

Definition at line 152 of file NormaliseToMonitor.h.

Referenced by applyChanges(), and monitorIdReader().

◆ is_enabled

bool Mantid::Algorithms::MonIDPropChanger::is_enabled
mutableprivate

Definition at line 154 of file NormaliseToMonitor.h.

Referenced by isConditionChanged(), and isEnabled().

◆ MonitorWorkspaceProp

std::string Mantid::Algorithms::MonIDPropChanger::MonitorWorkspaceProp
private

Definition at line 149 of file NormaliseToMonitor.h.

Referenced by isEnabled().

◆ SpectraNum

std::string Mantid::Algorithms::MonIDPropChanger::SpectraNum
private

Definition at line 146 of file NormaliseToMonitor.h.

Referenced by isEnabled().


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