27 "An input event workspace.");
29 "Number of seconds (a float) to add to each event's pulse "
32 "An optional list of workspace indices to change. If blank, "
33 "all spectra in the workspace are modified.");
35 "An output event workspace.");
45 out_ws = in_ws->clone();
49 std::vector<int> workspaceIndices =
getProperty(
"WorkspaceIndexList");
50 auto num_to_do =
static_cast<int64_t
>(workspaceIndices.size());
52 if (workspaceIndices.empty()) {
54 num_to_do = in_ws->getNumberHistograms();
59 Progress prog(
this, 0.0, 1.0, num_to_do);
61 for (int64_t i = 0; i < num_to_do; i++) {
67 wi = workspaceIndices[i];
70 out_ws->getSpectrum(wi).addPulsetime(timeOffset);
#define DECLARE_ALGORITHM(classname)
#define PARALLEL_FOR_NO_WSP_CHECK()
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
Helper class for reporting progress from algorithms.
A property class for workspaces.
const std::string name() const override
Algorithm's name for identification.
void init() override
Initialise the properties.
void exec() override
Run the algorithm.
Support for a property that holds an array of values.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void report()
Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm.
The concrete, templated class for properties.
std::shared_ptr< const EventWorkspace > EventWorkspace_const_sptr
shared pointer to a const Workspace2D
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
@ Input
An input workspace.
@ Output
An output workspace.