Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::Geometry::BraggScattererInCrystalStructure Class Reference

This class provides an extension of BraggScatterer, suitable for scatterers that are part of a crystal structure. More...

#include <BraggScattererInCrystalStructure.h>

Inheritance diagram for Mantid::Geometry::BraggScattererInCrystalStructure:
Mantid::Geometry::BraggScatterer Mantid::Kernel::PropertyManager Mantid::Kernel::IPropertyManager Mantid::Geometry::IsotropicAtomBraggScatterer

Public Member Functions

 BraggScattererInCrystalStructure ()
 Default constructor.
 
UnitCell getCell () const
 Returns the cell which is currently set.
 
Kernel::V3D getPosition () const
 Returns the position of the scatterer.
 
- Public Member Functions inherited from Mantid::Geometry::BraggScatterer
 BraggScatterer ()
 Default constructor.
 
double calculateFSquared (const Kernel::V3D &hkl) const
 Returns |F(hkl)|^2.
 
virtual StructureFactor calculateStructureFactor (const Kernel::V3D &hkl) const =0
 
virtual BraggScatterer_sptr clone () const =0
 
void initialize ()
 Initialization method that calls declareProperties() and sets initialized state to true.
 
bool isInitialized ()
 Returns whether the instance has been initialized.
 
bool isPropertyExposedToComposite (const std::string &propertyName) const
 Checks whether a property with the given name is exposed to BraggScattererComposite.
 
bool isPropertyExposedToComposite (Kernel::Property *property) const
 Checks if a property is exposed to BraggScattererComposite or throws std::invalid_argument if a null-pointer is supplied.
 
virtual std::string name () const =0
 
- Public Member Functions inherited from Mantid::Kernel::PropertyManager
::Json::Value asJson (bool withDefaultValues=false) const override
 Return the property manager serialized as a json object.
 
std::string asString (bool withDefaultValues=false) const override
 Return the property manager serialized as a string.
 
void clear () override final
 Clears the whole property map.
 
PropertyManagercloneInTimeROI (const Kernel::TimeROI &timeROI)
 Create a partial copy of this object such that every time series property is cloned according to the input TimeROI.
 
void declareOrReplaceProperty (std::unique_ptr< Property > p, const std::string &doc="") override
 Add or replace a property in the list of managed properties.
 
void declareProperty (const std::string &name, const char *value, const std::string &doc, IValidator_sptr validator=std::make_shared< NullValidator >(), const unsigned int direction=Direction::Input)
 Specialised version of declareProperty template method to prevent the creation of a PropertyWithValue of type const char* if an argument in quotes is passed (it will be converted to a string).
 
void declareProperty (const std::string &name, const char *value, const unsigned int direction)
 Add a property of string type to the list of managed properties.
 
void declareProperty (const std::string &name, const char *value, IValidator_sptr validator=std::make_shared< NullValidator >(), const std::string &doc=std::string(), const unsigned int direction=Direction::Input)
 Specialised version of declareProperty template method to prevent the creation of a PropertyWithValue of type const char* if an argument in quotes is passed (it will be converted to a string).
 
template<typename T >
void declareProperty (const std::string &name, T value, const std::string &doc, const unsigned int direction=Direction::Input)
 Add a property to the list of managed properties with no validator.
 
template<typename T >
void declareProperty (const std::string &name, T value, const unsigned int direction)
 Add a property of the template type to the list of managed properties.
 
template<typename T >
void declareProperty (const std::string &name, T value, IValidator_sptr validator=std::make_shared< NullValidator >(), const std::string &doc="", const unsigned int direction=Direction::Input)
 Add a property of the template type to the list of managed properties.
 
void declareProperty (std::unique_ptr< Property > p, const std::string &doc="") override
 Add a property to the list of managed properties.
 
virtual void declareProperty (std::unique_ptr< Property > p, const std::string &doc="")=0
 Function to declare properties (i.e. store them)
 
bool existsProperty (const std::string &name) const override
 Checks whether the named property is already in the list of managed property.
 
void filterByProperty (Mantid::Kernel::LogFilter *logFilter, const std::vector< std::string > &excludedFromFiltering=std::vector< std::string >()) override
 Filter the managed properties by the given boolean property mask.
 
std::vector< std::string > getDeclaredPropertyNames () const noexcept override
 Return the list of declared property names.
 
PropertygetPointerToProperty (const std::string &name) const override
 Get a property by name.
 
const std::vector< Property * > & getProperties () const override
 Get the list of managed properties.
 
TypedValue getProperty (const std::string &name) const override
 Get the value of a property.
 
std::string getPropertyValue (const std::string &name) const override
 Get the value of a property as a string.
 
bool operator!= (const PropertyManager &other) const
 
PropertyManageroperator+= (const PropertyManager &rhs)
 Addition operator.
 
PropertyManageroperator= (const PropertyManager &)
 Assignment operator - performs a deep copy.
 
bool operator== (const PropertyManager &other) const
 
size_t propertyCount () const override
 Count the number of properties under management.
 
 PropertyManager ()
 Default constructor.
 
 PropertyManager (const PropertyManager &)
 copy constructor
 
void removeDataOutsideTimeROI (const Kernel::TimeROI &timeROI)
 For time series properties, remove time values outside of TimeROI regions, each defined as [roi_begin,roi_end].
 
void removeProperty (const std::string &name, const bool delproperty=true) override
 removes the property from properties map
 
void resetProperties () override
 Reset property values back to initial values (blank or default values)
 
void setProperties (const ::Json::Value &jsonValue, const std::unordered_set< std::string > &ignoreProperties=std::unordered_set< std::string >(), bool createMissing=false) override
 Set the ordered list of properties by a json value collection.
 
void setProperties (const ::Json::Value &jsonValue, IPropertyManager *targetPropertyManager, const std::unordered_set< std::string > &ignoreProperties=std::unordered_set< std::string >(), bool createMissing=false)
 Set the ordered list of properties by a json value collection.
 
void setProperties (const std::string &propertiesJson, const std::unordered_set< std::string > &ignoreProperties=std::unordered_set< std::string >(), bool createMissing=false) override
 Set the ordered list of properties by one string of values, separated by semicolons.
 
void setProperties (const std::string &propertiesJson, IPropertyManager *targetPropertyManager, const std::unordered_set< std::string > &ignoreProperties, bool createMissing=false)
 Set the ordered list of properties by one string of values, separated by semicolons.
 
void setPropertiesWithString (const std::string &propertiesString, const std::unordered_set< std::string > &ignoreProperties=std::unordered_set< std::string >()) override
 Sets all the declared properties from a string.
 
void setPropertyOrdinal (const int &index, const std::string &value) override
 Set the value of a property by an index N.B.
 
void setPropertyValue (const std::string &name, const std::string &value) override
 Set the value of a property by string N.B.
 
void setPropertyValueFromJson (const std::string &name, const Json::Value &value) override
 Set the value of a property by Json::Value.
 
std::unique_ptr< PropertytakeProperty (const size_t index) override
 removes the property from the properties map and returns a pointer to it
 
bool validateProperties () const override
 Validates all the properties in the collection.
 
virtual ~PropertyManager () override
 Virtual destructor.
 
- Public Member Functions inherited from Mantid::Kernel::IPropertyManager
void declareProperty (const std::string &name, const char *value, const std::string &doc, IValidator_sptr validator=std::make_shared< NullValidator >(), const unsigned int direction=Direction::Input)
 Specialised version of declareProperty template method to prevent the creation of a PropertyWithValue of type const char* if an argument in quotes is passed (it will be converted to a string).
 
void declareProperty (const std::string &name, const char *value, const unsigned int direction)
 Add a property of string type to the list of managed properties.
 
void declareProperty (const std::string &name, const char *value, IValidator_sptr validator=std::make_shared< NullValidator >(), const std::string &doc=std::string(), const unsigned int direction=Direction::Input)
 Specialised version of declareProperty template method to prevent the creation of a PropertyWithValue of type const char* if an argument in quotes is passed (it will be converted to a string).
 
template<typename T >
void declareProperty (const std::string &name, T value, const std::string &doc, const unsigned int direction=Direction::Input)
 Add a property to the list of managed properties with no validator.
 
template<typename T >
void declareProperty (const std::string &name, T value, const unsigned int direction)
 Add a property of the template type to the list of managed properties.
 
template<typename T >
void declareProperty (const std::string &name, T value, IValidator_sptr validator=std::make_shared< NullValidator >(), const std::string &doc="", const unsigned int direction=Direction::Input)
 Add a property of the template type to the list of managed properties.
 
std::vector< Property * > getPropertiesInGroup (const std::string &group) const
 Get the list of managed properties in a given group.
 
IPropertyManagersetProperty (const std::string &name, const char *value)
 Specialised version of setProperty template method to handle const char *.
 
IPropertyManagersetProperty (const std::string &name, const std::string &value)
 Specialised version of setProperty template method to handle std::string.
 
template<typename T >
IPropertyManagersetProperty (const std::string &name, const T &value)
 Templated method to set the value of a PropertyWithValue.
 
template<typename T >
IPropertyManagersetProperty (const std::string &name, std::unique_ptr< T > value)
 Templated method to set the value of a PropertyWithValue from a std::unique_ptr.
 
void setPropertyGroup (const std::string &name, const std::string &group)
 Set the group for a given property.
 
void setPropertySettings (const std::string &name, std::unique_ptr< IPropertySettings > settings)
 
void updatePropertyValues (const IPropertyManager &other)
 Update values of the existing properties.
 
virtual ~IPropertyManager ()=default
 

Protected Member Functions

void afterPropertySet (const std::string &propertyName) override
 Additional property processing.
 
virtual void afterScattererPropertySet (const std::string &)
 This method should be re-implemented by subclasses for additional parameter processing.
 
void declareProperties () override
 Declares basic properties, should not be overridden by subclasses, use declareScattererProperties instead.
 
virtual void declareScattererProperties ()
 This method should be implemented by subclasses for declaring additional properties.
 
Kernel::V3D getPositionFromString (const std::string &positionString) const
 
virtual void setCell (const UnitCell &cell)
 Assigns a unit cell, which may be required for certain calculations.
 
virtual void setPosition (const Kernel::V3D &position)
 Sets the position of the scatterer to the supplied coordinates - vector is wrapped to [0, 1).
 
- Protected Member Functions inherited from Mantid::Geometry::BraggScatterer
void exposePropertyToComposite (const std::string &propertyName)
 Exposes the property with the supplied name to BraggScattererComposite.
 
const std::string & getPropagatingGroupName () const
 Returns the group name that is used to mark properties that are propagated.
 
void unexposePropertyFromComposite (const std::string &propertyName)
 Removes exposure to composite for specified property.
 
- Protected Member Functions inherited from Mantid::Kernel::PropertyManager
PropertygetPointerToPropertyOrdinal (const int &index) const override
 Get a property by an index.
 
PropertygetPointerToPropertyOrNull (const std::string &name) const
 Get a property by name.
 
- Protected Member Functions inherited from Mantid::Kernel::IPropertyManager
template<typename T >
getValue (const std::string &name) const
 Templated method to get the value of a property.
 
template<>
MANTID_KERNEL_DLL PropertyManager_sptr getValue (const std::string &name) const
 
template<>
MANTID_KERNEL_DLL PropertyManager_const_sptr getValue (const std::string &name) const
 

Protected Attributes

UnitCell m_cell
 
Kernel::V3D m_position
 

Additional Inherited Members

- Static Public Member Functions inherited from Mantid::Kernel::PropertyManager
static std::string getInvalidValuesFilterLogName (const std::string &logName)
 Gets the correct log name for the matching invalid values log for a given log name.
 
static std::string getLogNameFromInvalidValuesFilter (const std::string &logName)
 
static bool isAnInvalidValuesFilterLog (const std::string &logName)
 Determine if the log's name has a substring indicating it should not be filtered.
 
- Static Public Attributes inherited from Mantid::Kernel::PropertyManager
static const std::string INVALID_VALUES_SUFFIX = "_invalid_values"
 

Detailed Description

This class provides an extension of BraggScatterer, suitable for scatterers that are part of a crystal structure.

Information about the unit cell can be set.

The unit cell is marked as exposed to BraggScattererComposite, so all members of one composite will have the same unit cell.

Author
Michael Wedel, Paul Scherrer Institut - SINQ
Date
04/11/2014

Definition at line 31 of file BraggScattererInCrystalStructure.h.

Constructor & Destructor Documentation

◆ BraggScattererInCrystalStructure()

Mantid::Geometry::BraggScattererInCrystalStructure::BraggScattererInCrystalStructure ( )

Default constructor.

Definition at line 32 of file BraggScattererInCrystalStructure.cpp.

Member Function Documentation

◆ afterPropertySet()

void Mantid::Geometry::BraggScattererInCrystalStructure::afterPropertySet ( const std::string &  propertyName)
overrideprotectedvirtual

Additional property processing.

Takes care of handling new property values.

Please note that derived classes should not re-implement this method, as the processing for the base properties is absolutely necessary. Instead, all deriving classes should override the method afterScattererPropertySet, which is called from this method.

Reimplemented from Mantid::Kernel::IPropertyManager.

Definition at line 89 of file BraggScattererInCrystalStructure.cpp.

References afterScattererPropertySet(), getPositionFromString(), Mantid::Kernel::PropertyManager::getProperty(), position, setCell(), setPosition, and Mantid::Geometry::strToUnitCell().

◆ afterScattererPropertySet()

virtual void Mantid::Geometry::BraggScattererInCrystalStructure::afterScattererPropertySet ( const std::string &  )
inlineprotectedvirtual

This method should be re-implemented by subclasses for additional parameter processing.

Reimplemented in Mantid::Geometry::IsotropicAtomBraggScatterer.

Definition at line 43 of file BraggScattererInCrystalStructure.h.

Referenced by afterPropertySet().

◆ declareProperties()

void Mantid::Geometry::BraggScattererInCrystalStructure::declareProperties ( )
overrideprotectedvirtual

Declares basic properties, should not be overridden by subclasses, use declareScattererProperties instead.

Reimplemented from Mantid::Geometry::BraggScatterer.

Definition at line 52 of file BraggScattererInCrystalStructure.cpp.

References Mantid::Kernel::PropertyManager::declareProperty(), declareScattererProperties(), and Mantid::Geometry::BraggScatterer::exposePropertyToComposite().

◆ declareScattererProperties()

virtual void Mantid::Geometry::BraggScattererInCrystalStructure::declareScattererProperties ( )
inlineprotectedvirtual

This method should be implemented by subclasses for declaring additional properties.

Reimplemented in Mantid::Geometry::IsotropicAtomBraggScatterer.

Definition at line 47 of file BraggScattererInCrystalStructure.h.

Referenced by declareProperties().

◆ getCell()

UnitCell Mantid::Geometry::BraggScattererInCrystalStructure::getCell ( ) const

Returns the cell which is currently set.

Definition at line 45 of file BraggScattererInCrystalStructure.cpp.

References m_cell.

Referenced by Mantid::Geometry::IsotropicAtomBraggScatterer::getDebyeWallerFactor().

◆ getPosition()

Kernel::V3D Mantid::Geometry::BraggScattererInCrystalStructure::getPosition ( ) const

Returns the position of the scatterer.

Definition at line 42 of file BraggScattererInCrystalStructure.cpp.

References m_position.

◆ getPositionFromString()

V3D Mantid::Geometry::BraggScattererInCrystalStructure::getPositionFromString ( const std::string &  positionString) const
protected

◆ setCell()

void Mantid::Geometry::BraggScattererInCrystalStructure::setCell ( const UnitCell cell)
protectedvirtual

Assigns a unit cell, which may be required for certain calculations.

Definition at line 48 of file BraggScattererInCrystalStructure.cpp.

References m_cell.

Referenced by afterPropertySet().

◆ setPosition()

void Mantid::Geometry::BraggScattererInCrystalStructure::setPosition ( const Kernel::V3D position)
protectedvirtual

Sets the position of the scatterer to the supplied coordinates - vector is wrapped to [0, 1).

Definition at line 37 of file BraggScattererInCrystalStructure.cpp.

References Mantid::Geometry::getWrappedVector(), m_position, and position.

Member Data Documentation

◆ m_cell

UnitCell Mantid::Geometry::BraggScattererInCrystalStructure::m_cell
protected

Definition at line 57 of file BraggScattererInCrystalStructure.h.

Referenced by getCell(), and setCell().

◆ m_position

Kernel::V3D Mantid::Geometry::BraggScattererInCrystalStructure::m_position
protected

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