Mantid
Loading...
Searching...
No Matches
CorelliCalibrationDatabase.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 +
12#include "MantidAPI/Run.h"
14#include "MantidAPI/TableRow.h"
26
27#include <boost/algorithm/string/classification.hpp>
28#include <boost/algorithm/string/split.hpp>
29#include <boost/filesystem.hpp>
30#include <boost/filesystem/operations.hpp>
31#include <sstream>
32#include <string>
33
34namespace Mantid::Algorithms {
35
36using namespace Kernel;
37using namespace API;
38using namespace Geometry;
39using namespace DataObjects;
40using Types::Core::DateAndTime;
41
42namespace CorelliCalibration {
43
44//-----------------------------------------------------------------------------
48CalibrationTableHandler::CalibrationTableHandler() : mCalibWS{nullptr}, isSingleComponentTable{false} {}
49
50//-----------------------------------------------------------------------------
63 bool iscomponent) {
64
65 // Create table workspace
66 ITableWorkspace_sptr itablews = WorkspaceFactory::Instance().createTable();
67
68 // Add to ADS if workspace name is given
69 if (wsname.size() > 0) {
70 AnalysisDataService::Instance().addOrReplace(wsname, itablews);
71 }
72
73 TableWorkspace_sptr tablews = std::dynamic_pointer_cast<TableWorkspace>(itablews);
74
75 // Set up columns
76 if (iscomponent)
77 tablews->addColumn("str", "YYYMMDD"); // first column as date stamp
78 else {
79 tablews->addColumn("str", "ComponentName"); // first column as date stamp
80 }
81 for (size_t i = 1; i < CorelliCalibration::calibrationTableColumnNames.size(); ++i) {
84 tablews->addColumn(type, colname);
85 }
86
87 return tablews;
88}
89
90//-----------------------------------------------------------------------------
102 std::string &errormsg) {
103 // Check columns of
104 std::vector<std::string> colNames = calibws->getColumnNames();
105
106 bool valid = true;
107
108 if (colNames.size() != CorelliCalibration::calibrationTableColumnNames.size()) {
109 // column numbers mismatch
110 std::stringstream errorss;
111 errorss << "Calibration table workspace requires " << CorelliCalibration::calibrationTableColumnNames.size()
112 << " columns. Input workspace " << calibws->getName() << " get " << calibws->getColumnNames().size()
113 << "instead.";
114 errormsg = errorss.str();
115 valid = false;
116 } else {
117
118 // Check columns one by one
119 for (size_t i = 0; i < colNames.size(); ++i) {
121 std::stringstream errorss;
122 errorss << i << "-th column is supposed to be " << CorelliCalibration::calibrationTableColumnNames[i]
123 << ", but instead in TableWorkspace " << calibws->getName() << " it is " << colNames[i];
124 errormsg = errorss.str();
125 valid = false;
126 break;
127 }
128 }
129 }
130
131 return valid;
132}
133
134//-----------------------------------------------------------------------------
143 const std::string &datestamp, const ComponentPosition &pos) {
144 // check
145 if (tablews->columnCount() != calibrationTableColumnNames.size()) {
146 throw std::runtime_error("Single component calibration table workspace is not correct.");
147 }
148
149 // Append a new row
150 Mantid::API::TableRow sourceRow = tablews->appendRow();
151 // Date and positions
152 sourceRow << datestamp << pos.x << pos.y << pos.z << pos.xCosine << pos.yCosine << pos.zCosine << pos.rotAngle;
153}
154
161
162 std::string errmsg{""};
163
164 if (!isValidCalibrationTableWorkspace(calibws, errmsg))
165 throw std::runtime_error(errmsg);
166
167 // Set
168 mCalibWS = calibws;
169}
170
181
182 // Check workspace type
184 throw std::runtime_error("TableWorkspace contains a single component's "
185 "calibration in various dates");
186
187 std::vector<std::string> names = mCalibWS->getColVector<std::string>(0);
188
189 return names;
190}
191
199 // Check
200 if (!mCalibWS)
201 throw std::runtime_error("Calibration workspace has not been set up yet.");
202
203 // Get the row number of the specified component
204 size_t row_number = mCalibWS->rowCount();
205 for (size_t i = 0; i < row_number; ++i) {
206 if (mCalibWS->cell<std::string>(i, 0) == component) {
207 row_number = i;
208 break;
209 }
210 }
211 // Check
212 if (row_number == mCalibWS->rowCount())
213 throw std::runtime_error("Specified component does not exist");
214
215 // Get the values
217 pos.x = mCalibWS->cell<double>(row_number, 1);
218 pos.y = mCalibWS->cell<double>(row_number, 2);
219 pos.z = mCalibWS->cell<double>(row_number, 3);
220 pos.xCosine = mCalibWS->cell<double>(row_number, 4);
221 pos.yCosine = mCalibWS->cell<double>(row_number, 5);
222 pos.zCosine = mCalibWS->cell<double>(row_number, 6);
223 pos.rotAngle = mCalibWS->cell<double>(row_number, 7);
224
225 return pos;
226}
227
240CalibrationTableHandler::loadComponentCalibrationTable(const std::string &filename, const std::string &tablewsname) {
241 // Get algorithm handler
242 auto loadAsciiAlg = AlgorithmFactory::Instance().create("LoadAscii", 2);
243 // Set parameters
244 if (tablewsname.size() == 0) {
245 throw std::runtime_error("Failed to load ASCII as OutputWorkspace name is empty string.");
246 }
247 loadAsciiAlg->initialize();
248 loadAsciiAlg->setPropertyValue("Filename", filename);
249 loadAsciiAlg->setPropertyValue("OutputWorkspace", tablewsname);
250 loadAsciiAlg->setPropertyValue("Separator", "CSV");
251 loadAsciiAlg->setPropertyValue("CommentIndicator", "#");
252 loadAsciiAlg->execute();
253 // Convert to TableWorkspace
254 TableWorkspace_sptr tablews =
255 std::dynamic_pointer_cast<TableWorkspace>(AnalysisDataService::Instance().retrieve(tablewsname));
256
257 return tablews;
258}
259
260//-----------------------------------------------------------------------------
275 const std::string &component,
276 const std::string &filename) {
277
278 std::string tablewsname = component + "_" + datestamp;
279
280 // Load the database file for the specific component to a table workspace
281 // if extant, otherwise instantiate an empty table
282 TableWorkspace_sptr compcaltable = nullptr;
283 if (boost::filesystem::exists(filename)) {
284 compcaltable = loadComponentCalibrationTable(filename, tablewsname);
285 } else {
286 compcaltable = createCalibrationTableWorkspace(tablewsname, true);
287 }
288
289 // Append a new row to the table containing the hisotry of positions for
290 // the specific component
291 ComponentPosition componentpos = getComponentCalibratedPosition(component);
292 appendCalibration(compcaltable, datestamp, componentpos);
293
294 // save the updated history of positions to the database file. Will overwrite
295 // the file if extant
296 // Note: only version 2 of SaveAscii can work with TableWorkspace
297 auto saveAsciiAlg = AlgorithmFactory::Instance().create("SaveAscii", 2);
298 saveAsciiAlg->initialize();
299 saveAsciiAlg->setProperty("InputWorkspace", compcaltable);
300 saveAsciiAlg->setProperty("Filename", filename);
301 saveAsciiAlg->setPropertyValue("CommentIndicator", "#");
302 saveAsciiAlg->setPropertyValue("Separator", "CSV");
303 saveAsciiAlg->setProperty("ColumnHeader", true);
304 saveAsciiAlg->setProperty("AppendToFile",
305 false); // always overwrite original file
306 // run
307 saveAsciiAlg->execute();
308
309 return compcaltable;
310}
311
312//-----------------------------------------------------------------------------
317void CalibrationTableHandler::saveCalibrationTable(const std::string &filename) {
318 // create algorithm: only version 2 of SaveAscii can work with TableWorkspace
319 auto saveAsciiAlg = AlgorithmFactory::Instance().create("SaveAscii", 2);
320 saveAsciiAlg->initialize();
321 saveAsciiAlg->setProperty("InputWorkspace", mCalibWS);
322 saveAsciiAlg->setProperty("Filename", filename);
323 saveAsciiAlg->setPropertyValue("CommentIndicator", "#");
324 saveAsciiAlg->setPropertyValue("Separator", "CSV");
325 saveAsciiAlg->setProperty("ColumnHeader", true);
326 // run
327 saveAsciiAlg->execute();
328}
329
330//-----------------------------------------------------------------------------
333
334 size_t num_rows = componentcaltable->rowCount();
335 ComponentPosition pos = CalibrationTableHandler::getCalibratedPosition(componentcaltable, num_rows - 1);
336
337 return pos;
338}
339
340//-----------------------------------------------------------------------------
343 size_t rownumber) {
344 // Get the values
346
347 pos.x = componentcaltable->cell<double>(rownumber, 1);
348 pos.y = componentcaltable->cell<double>(rownumber, 2);
349 pos.z = componentcaltable->cell<double>(rownumber, 3);
350 pos.xCosine = componentcaltable->cell<double>(rownumber, 4);
351 pos.yCosine = componentcaltable->cell<double>(rownumber, 5);
352 pos.zCosine = componentcaltable->cell<double>(rownumber, 6);
353 pos.rotAngle = componentcaltable->cell<double>(rownumber, 7);
354
355 return pos;
356}
357
358} // namespace CorelliCalibration
359
360// Register the algorithm into the AlgorithmFactory
362
363
366 auto wsValidator = std::make_shared<CompositeValidator>();
367 wsValidator->add<InstrumentValidator>();
368
369 // Input MatrixWorkspace which the calibration run is from
370 declareProperty(
371 std::make_unique<WorkspaceProperty<MatrixWorkspace>>("InputWorkspace", "", Direction::Input, wsValidator),
372 "Workspace containing the day-stamp of the calibration");
373
374 // Input calibration patch TableWorkspace
375 declareProperty(
376 std::make_unique<WorkspaceProperty<TableWorkspace>>("InputCalibrationPatchWorkspace", "", Direction::Input),
377 "Table workspace containing calibrated positions and "
378 "orientations for a subset of the banks");
379
380 // Output directory
381 declareProperty(std::make_unique<FileProperty>("DatabaseDirectory", "", FileProperty::Directory),
382 "The directory that the database (csv) files are saved to");
383
384 // Optional output calibration TableWorkspace
385 declareProperty(std::make_unique<WorkspaceProperty<TableWorkspace>>("OutputWorkspace", "", Direction::Output),
386 "Table workspace containing calibrated positions and "
387 "orientations for all banks");
388}
389
390// Validate inputs workspace first.
391std::map<std::string, std::string> CorelliCalibrationDatabase::validateInputs() {
392 std::map<std::string, std::string> errors;
393
394 mInputWS = getProperty("InputWorkspace");
395
396 // check for null pointers - this is to protect against workspace groups
397 if (!mInputWS) {
398 return errors;
399 }
400
401 // This algorithm will only work for CORELLI, check for CORELLI.
402 if (mInputWS->getInstrument()->getName() != "CORELLI")
403 errors["InputWorkspace"] = "This Algorithm will only work for Corelli.";
404 // Must include start_time
405 else if (!mInputWS->run().hasProperty("start_time") && !mInputWS->run().hasProperty("run_start"))
406 errors["InputWorkspace"] = "Workspace is missing property start_time.";
407
408 // check for calibration patch table workspace
409 mInputCalibrationTableWS = getProperty("InputCalibrationPatchWorkspace");
411 errors["InputCalibrationPatchWorkspace"] = "Input calibration patch workspace is not specified";
412 return errors;
413 }
414 // Check columns
415 else {
416 std::string error_msg{""};
418 mInputCalibrationTableWS, error_msg);
419
420 if (!isvalid) {
421 errors["InputCalibrationPatchWorkspace"] = error_msg;
422 }
423 }
424
425 return errors;
426}
427
428//-----------------------------------------------------------------------------
432 // parse input
433 if (!mInputWS)
434 throw std::runtime_error("input workspace not specified");
436 throw std::runtime_error("input calibration workspace not specified");
437
438 std::string calibDatabaseDir = getProperty("DatabaseDirectory");
439
440 // map for (component name, component calibration workspace
441 std::vector<std::string> orderedcomponents = retrieveInstrumentComponents(mInputWS);
442
443 std::map<std::string, TableWorkspace_sptr> component_caibws_map;
444 setComponentMap(orderedcomponents, component_caibws_map);
445
446 // Update component CSV files
447 updateComponentDatabaseFiles(calibDatabaseDir, component_caibws_map);
448
449 // Load data file if necessary and possible: component_caibws_map
450 loadNonCalibratedComponentDatabase(calibDatabaseDir, component_caibws_map);
451
452 // Create summary calibration workspace: input: component_caibws_map output:
453 // new calibration workspace
454 createOutputCalibrationTable(component_caibws_map, orderedcomponents);
455
456 // Create the summary CSV file
457 saveCalibrationTable(calibDatabaseDir);
458
459 // Clean up memory
460 for (auto &[compname, calibws] : component_caibws_map) {
461 if (calibws) {
462 g_log.debug() << "Removing " << compname << "calibration table from ADS\n";
463 AnalysisDataService::Instance().remove(calibws->getName());
464 }
465 }
466
467 // output
468 setProperty("OutputWorkspace", mOutputWS);
469}
470
477 std::map<std::string, TableWorkspace_sptr> &calibwsmap) {
478 // Date stamp
479 std::string timestampstr{""};
480 if (mInputWS->run().hasProperty("start_time")) {
481 // string value from start_time
482 timestampstr = mInputWS->run().getProperty("start_time")->value();
483 } else {
484 // string value from run_start if start_time does not exist.
485 // with input workspace validate, there must be at least one exist
486 // between start_time and run_start
487 timestampstr = mInputWS->run().getProperty("run_start")->value();
488 }
489 // convert
490 mDateStamp = convertTimeStamp(timestampstr);
491
492 // Handler
495
496 // Loop over all the components that have been calibrated in the calibration
497 // table
498 size_t num_rows = mInputCalibrationTableWS->rowCount();
499 for (size_t i = 0; i < num_rows; ++i) {
500 // get component name
501 std::string compname = mInputCalibrationTableWS->cell<const std::string>(i, 0);
502 // get file name
503 std::string compdbname = corelliComponentDatabaseName(compname, calibdbdir);
504 // save
505 TableWorkspace_sptr comptablews = handler.saveCompomentDatabase(mDateStamp, compname, compdbname);
506 // add the map
507 calibwsmap[compname] = comptablews;
508 g_log.debug() << "Component " << compname << " is updated to " << compdbname << " and saved to "
509 << comptablews->getName() << "\n";
510 }
511}
512
519 const std::string &calibdbdir, std::map<std::string, TableWorkspace_sptr> &calibwsmap) {
520 // go through all the components
521 for (auto &[componentname, componentcaltable] : calibwsmap) {
522 // check whether the calibration workspace has been loaded
523 if (componentcaltable) // skip if it has been loaded
524 continue;
525
526 // locate the file
527 std::string compdbname = corelliComponentDatabaseName(componentname, calibdbdir);
528 if (!isFileExist(compdbname)) // skip if the file does not exist
529 {
530 // skip if the database file does not exist
531 g_log.debug() << "Component " << componentname << ": No database file is found at " << compdbname << "\n";
532 continue;
533 }
534
535 // load the database (csv) file and set
537 compdbname, componentname + "_" + mDateStamp);
538 calibwsmap[componentname] = loaded_compcalibws;
539
540 g_log.debug() << "Component " << componentname << " is loaded from " << compdbname << " and saved to "
541 << loaded_compcalibws->getName() << "\n";
542 }
543}
544
545// Create summary calibration workspace: input: component_caibws_map output:
546// new calibration workspace
547void CorelliCalibrationDatabase::createOutputCalibrationTable(std::map<std::string, TableWorkspace_sptr> &calibwsmap,
548 const std::vector<std::string> &orderedcomponents) {
549 // Create an empty calibration table without setting to analysis data service
553
554 for (auto componentname : orderedcomponents) {
555 auto componentcaltable = calibwsmap[componentname];
556 if (componentcaltable) {
557 // only take care of calibrated components (before and now)
559 handler.appendCalibration(mOutputWS, componentname, lastpos);
560 }
561 }
562}
563
564// Create the summary CSV file
565// File name exampe: corelli_instrument_20202015.csv
566void CorelliCalibrationDatabase::saveCalibrationTable(const std::string &calibdbdir) {
567 // file name
568 std::string filename = "corelli_instrument_" + mDateStamp + ".csv";
569 filename = joinPath(calibdbdir, filename);
570
571 // Call the handler: set and save
574 handler.saveCalibrationTable(filename);
575}
576
577//-----------------------------------------------------------------------------
583std::string CorelliCalibrationDatabase::convertTimeStamp(const std::string &run_start_time) {
584 // Get the first sub string by
585 std::string date_str = run_start_time.substr(0, run_start_time.find("T"));
586
587 // Separate year date and time
588 std::string year = date_str.substr(0, date_str.find("-"));
589 std::string monthday = date_str.substr(date_str.find("-") + 1, date_str.size()); // +1 to ignore delimit '-'
590 std::string month = monthday.substr(0, monthday.find("-"));
591 std::string day = monthday.substr(monthday.find("-") + 1,
592 monthday.size()); // +1 to ignore delimit
593 std::string datestamp = year + month + day;
594
595 return datestamp;
596}
597
598//-----------------------------------------------------------------------------
609std::string CorelliCalibrationDatabase::corelliComponentDatabaseName(const std::string &componentname,
610 const std::string &directory) {
611
612 // drop the suffix "/sixteenpack" if found in the component name
613 std::string shortName = componentname;
614 std::string suffix{"/sixteenpack"};
615 size_t pos = componentname.find(suffix);
616 if (pos != std::string::npos)
617 shortName.erase(pos, suffix.length());
618
619 std::string basename = shortName + ".csv";
620 std::string filename = joinPath(directory, basename);
621
622 return filename;
623}
624
625//-----------------------------------------------------------------------------
632std::string CorelliCalibrationDatabase::corelliCalibrationDatabaseName(const std::string &datestamp,
633 const std::string &directory) {
634 std::string basename = datestamp + ".csv";
635 std::string filename = joinPath(directory, basename);
636 return filename;
637}
638
639//-----------------------------------------------------------------------------
645bool CorelliCalibrationDatabase::isFileExist(const std::string &filepath) {
646
647 // TODO - replace by std::filesystem::exists(filename) until C++17 is properly
648 // supported
649 return boost::filesystem::exists(filepath);
650}
651
652//-----------------------------------------------------------------------------
659std::string CorelliCalibrationDatabase::joinPath(const std::string &directory, const std::string &basename) {
660 boost::filesystem::path dir(directory);
661 boost::filesystem::path file(basename);
662 boost::filesystem::path fullpath = dir / file;
663
664 return fullpath.string();
665}
666
675void CorelliCalibrationDatabase::setComponentMap(const std::vector<std::string> &componentnames,
676 std::map<std::string, DataObjects::TableWorkspace_sptr> &compmap) {
677 // Add entries
678 for (auto compname : componentnames)
679 compmap[compname] = nullptr;
680}
681
693 // Get access to instrument information
694 const auto &component_info = ws->componentInfo();
695
696 // Init output
697 std::vector<std::string> componentnames = {"moderator", "sample-position"};
698
699 // Loop over all the components for bankX/sixteenpack
700 const size_t num_components = component_info.size();
701 for (size_t i = 0; i < num_components; ++i) {
702 std::string compname = component_info.name(i);
703 // a component starts with bank must be a bank
704 if (compname.compare(0, 4, "bank") == 0) {
705 componentnames.push_back(compname + "/sixteenpack");
706 }
707 }
708
709 return componentnames;
710}
711
712} // namespace Mantid::Algorithms
#define DECLARE_ALGORITHM(classname)
Definition: Algorithm.h:576
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
Definition: Algorithm.cpp:2076
Kernel::Logger & g_log
Definition: Algorithm.h:451
@ Directory
to specify a directory that must exist
Definition: FileProperty.h:54
A validator which checks that a workspace has a valid instrument.
TableRow represents a row in a TableWorkspace.
Definition: TableRow.h:39
A property class for workspaces.
CorelliCalibrationDatabase: blablabla TODO.
static bool isFileExist(const std::string &filepath)
Check whether a given file does exist.
void saveCalibrationTable(const std::string &calibdbdir)
std::map< std::string, std::string > validateInputs() override
Method checking errors on ALL the inputs, before execution.
void loadNonCalibratedComponentDatabase(const std::string &calibddir, std::map< std::string, DataObjects::TableWorkspace_sptr > &calibwsmap)
Load data file if necessary and possible: component_caibws_map.
void setComponentMap(const std::vector< std::string > &componentnames, std::map< std::string, DataObjects::TableWorkspace_sptr > &compmap)
Set up a component name - TableWorkspace map for single component calibration.
DataObjects::TableWorkspace_sptr mInputCalibrationTableWS
Input calibration worksapce.
static std::string joinPath(const std::string &directory, const std::string &basename)
Join two string for a new path.
static std::string corelliComponentDatabaseName(const std::string &componentname, const std::string &directory)
get standard component calibration database (CSV) file name
DataObjects::TableWorkspace_sptr mOutputWS
Output calibration worksapce (merged with previous calibrated data)
API::MatrixWorkspace_sptr mInputWS
Input workspace where the calibration is from.
void createOutputCalibrationTable(std::map< std::string, DataObjects::TableWorkspace_sptr > &calibwsmap, const std::vector< std::string > &orderedcomponents)
Create output full set calibration workspace.
void updateComponentDatabaseFiles(const std::string &calibdbdir, std::map< std::string, DataObjects::TableWorkspace_sptr > &calibwsmap)
append the newly calibration to each component csv file
static std::string convertTimeStamp(const std::string &run_start_time)
A static method to convert Mantid datetime string to YYYYMMDD format.
static std::vector< std::string > retrieveInstrumentComponents(const API::MatrixWorkspace_sptr &ws)
Retrieve the bank level components names in order.
static std::string corelliCalibrationDatabaseName(const std::string &datestamp, const std::string &directory)
get standard date-base calibration database (CSV) file name
Class containing static and member methods to work with calibration table workspaces.
ComponentPosition getComponentCalibratedPosition(const std::string &component)
Get the calibration of a component.
static bool isValidCalibrationTableWorkspace(const DataObjects::TableWorkspace_sptr &calibws, std::string &errormsg)
Check whether a TableWorkspace is a valid Corelli geometry calibration table for all components.
static ComponentPosition getLatestCalibratedPosition(const DataObjects::TableWorkspace_sptr &componentcaltable)
Get the last entry (latest update) of a compoent calibrated position.
void setCalibrationTable(const DataObjects::TableWorkspace_sptr &calibws)
Set calibration table file.
static ComponentPosition getCalibratedPosition(const DataObjects::TableWorkspace_sptr &componentcaltable, size_t rownumber)
Get the calibration position in the table (component table or full calibration table)
static DataObjects::TableWorkspace_sptr loadComponentCalibrationTable(const std::string &filename, const std::string &tablewsname)
Load a single-component calibration table.
static DataObjects::TableWorkspace_sptr createCalibrationTableWorkspace(const std::string &wsname, bool iscomponent)
Create a calibration TableWorkspace from scratch for either single component or full set of component...
DataObjects::TableWorkspace_sptr saveCompomentDatabase(const std::string &datestamp, const std::string &component, const std::string &filename)
Save a single component in the calibration workspace.
void saveCalibrationTable(const std::string &filename)
Save the calibration table (of a single date)
static void appendCalibration(const DataObjects::TableWorkspace_sptr &tablews, const std::string &datestamp, const ComponentPosition &pos)
Append a new row to single component calibration table.
std::vector< std::string > getComponentNames()
Get component name from the table.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void debug(const std::string &msg)
Logs at debug level.
Definition: Logger.cpp:114
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
static const std::vector< std::string > calibrationTableColumnTypes
static const std::vector< std::string > calibrationTableColumnNames
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
Load a single-component database file to a table workspace of history of positions for the component.
Structure to handle all the calibration component positions.
@ Input
An input workspace.
Definition: Property.h:53
@ Output
An output workspace.
Definition: Property.h:54