12#include <boost/python/class.hpp>
13#include <boost/python/copy_const_reference.hpp>
14#include <boost/python/list.hpp>
15#include <boost/python/operators.hpp>
16#include <boost/python/register_ptr_to_python.hpp>
17#include <boost/python/return_internal_reference.hpp>
18#include <boost/python/self.hpp>
30 boost::python::list names;
31 const auto histories = self->getChildHistories();
32 for (
const auto &
history : histories) {
45 boost::python::list names;
47 for (
const auto &
history : histories) {
54 register_ptr_to_python<Mantid::API::AlgorithmHistory_sptr>();
56 class_<AlgorithmHistory>(
"AlgorithmHistory", no_init)
58 "Returns the name of the algorithm.")
61 "Returns the version of the algorithm.")
64 "Returns the execution duration of the algorithm.")
67 "Returns the execution date of the algorithm.")
70 "Returns the execution number of the algorithm.")
73 "Returns the number of the child algorithms.")
76 "Returns the child algorithm at the given index in the history")
79 "Returns a list of child "
80 "algorithm histories for "
81 "this algorithm history.")
83 .def(
"getProperties", &
getPropertiesAsList, arg(
"self"),
"Returns properties for this algorithm history.")
86 return_value_policy<copy_const_reference>(),
"Returns the string representation of a specified property.")
89 "Returns the algorithm at the given index in the history")
91 .def(self_ns::str(self));
boost::python::list getChildrenAsList(const std::shared_ptr< AlgorithmHistory > &self)
Return a Python list of child history objects from the history as this is far easier to work with tha...
boost::python::list getPropertiesAsList(const AlgorithmHistory &self)
Return a Python list of property history objects from the history.
void export_AlgorithmHistory()
std::vector< history_type > history
history information
This class stores information about the Command History used by algorithms on a workspace.
std::shared_ptr< IAlgorithm > getChildAlgorithm(const size_t index) const
Create an child algorithm from a history record at a given index.
Mantid::Types::Core::DateAndTime executionDate() const
get execution date
const std::string & getPropertyValue(const std::string &name) const
get the string representation of a specified property
const std::size_t & execCount() const
get the execution count
size_t childHistorySize() const
Retrieve the number of child algorithms.
const std::string & name() const
get name of algorithm in history const
double executionDuration() const
get execution duration
const int & version() const
get version number of algorithm in history const
AlgorithmHistory_sptr getChildAlgorithmHistory(const size_t index) const
Retrieve a child algorithm history by index.
const Mantid::Kernel::PropertyHistories & getProperties() const
get parameter list of algorithm in history const