18#include <boost/algorithm/string.hpp>
19#include <boost/algorithm/string/finder.hpp>
20#include <boost/algorithm/string/iter_find.hpp>
21#include <boost/algorithm/string/trim.hpp>
23#include <Poco/DOM/AutoPtr.h>
24#include <Poco/DOM/DOMWriter.h>
25#include <Poco/DOM/Element.h>
26#include <Poco/XML/XMLWriter.h>
52 "Path to an Fullprof .irf file to load.");
55 auto wsprop = std::make_unique<WorkspaceProperty<API::ITableWorkspace>>(
"OutputTableWorkspace",
"",
Direction::Output,
57 declareProperty(std::move(wsprop),
"Name of the output TableWorkspace containing "
58 "profile parameters or bank information. ");
62 "Use bank IDs as given in file rather than ordinal number of bank."
63 "If the bank IDs in the file are not unique, it is advised to set this "
68 "The IDs are as specified by UseBankIDsInFile."
69 "Default is all banks contained in input .irf file.");
75 "A workspace group with the instrument to which we add the "
76 "parameters from the Fullprof .irf file with one workspace "
77 "for each bank of the .irf file");
81 "For each Fullprof bank,"
82 " the ID of the corresponding workspace in same order as the "
83 "Fullprof banks are specified. "
84 "ID=1 refers to the first workspace in the workspace group, "
85 "ID=2 refers to the second workspace and so on. "
86 "Default is all workspaces in numerical order."
87 "If default banks are specified, they too are taken to be in "
97 const bool useBankIDsInFile =
getProperty(
"UseBankIDsInFile");
100 vector<int> outputwsids =
getProperty(
"WorkspacesForBanks");
103 vector<string> lines;
110 vector<int> vec_bankinirf;
111 map<int, int> bankstartindexmap, bankendindexmap;
112 scanBanks(lines, useBankIDsInFile, vec_bankinirf, bankstartindexmap, bankendindexmap);
113 if (useBankIDsInFile)
114 sort(vec_bankinirf.begin(), vec_bankinirf.end());
116 for (
auto bank : vec_bankinirf)
117 g_log.
debug() <<
"Irf containing bank " << bank <<
".\n";
120 map<int, size_t> workspaceOfBank;
122 vector<int> vec_bankids;
124 if (vec_bankinirf.empty()) {
125 throw runtime_error(
"No Bank is found in input file.");
126 }
else if (outputbankids.empty()) {
127 vec_bankids = vec_bankinirf;
138 sort(outputbankids.begin(), outputbankids.end());
139 for (
auto outputbankid : outputbankids) {
140 if (outputbankid < 0) {
141 g_log.
warning() <<
"Input bank ID (" << outputbankid <<
") is negative. It is not allowed and is ignored. "
144 auto fiter = lower_bound(vec_bankinirf.begin(), vec_bankinirf.end(), outputbankid);
145 if (fiter == vec_bankinirf.end() || *fiter != outputbankid) {
148 errmsg <<
"Specified output bank (ID = " << outputbankid <<
") cannot be found in input " << datafile
149 <<
", which includes bank : ";
150 for (
size_t i = 0; i < vec_bankinirf.size(); ++i) {
151 errmsg << vec_bankinirf[i];
152 if (i != vec_bankinirf.size() - 1)
156 throw runtime_error(errmsg.str());
158 vec_bankids.emplace_back(outputbankid);
162 if (vec_bankids.empty()) {
163 g_log.
error(
"There is no valid specified bank IDs for output.");
164 throw runtime_error(
"There is no valid specified bank IDs for output.");
169 map<int, map<string, double>> bankparammap;
170 for (
int bankid : vec_bankids) {
171 g_log.
debug() <<
"Parse bank " << bankid <<
" of total " << vec_bankids.size() <<
".\n";
172 map<string, double> parammap;
174 bankendindexmap[bankid], nProf);
175 bankparammap.emplace(bankid, parammap);
190 if ((outputwsids.empty()) && (wsg->size() != vec_bankids.size())) {
191 std::ostringstream mess;
192 mess <<
"Number of banks (" << vec_bankids.size() <<
") does not match number of workspaces (" << wsg->size()
193 <<
") in group. Parameters not put into workspaces.";
198 for (
size_t i = 0; i < vec_bankids.size(); ++i) {
199 int bankId = vec_bankids[i];
200 size_t wsId = workspaceOfBank[bankId];
202 auto workspace = std::dynamic_pointer_cast<MatrixWorkspace>(wsi);
205 std::string parameterXMLString;
210 loadParamAlg->setProperty(
"ParameterXML", parameterXMLString);
211 loadParamAlg->setProperty(
"Workspace",
workspace);
212 loadParamAlg->execute();
217 throw std::runtime_error(
"Either the OutputTableWorkspace or Workspace property must be set.");
227 ifstream myfile(filename.c_str());
229 if (myfile.is_open()) {
230 while (!myfile.eof()) {
232 getline(myfile, line);
234 boost::algorithm::trim(line);
236 lines.emplace_back(line);
242 errmsg <<
"Input .irf file " << filename <<
" cannot be open. ";
244 throw runtime_error(errmsg.str());
254 if (lines[1].find(
"NPROF") != string::npos) {
256 size_t nStart = lines[1].find(
"NPROF");
257 size_t nEq = lines[1].find(
'=', nStart);
258 size_t nEnd = lines[1].find(
' ', nStart);
259 if (nEq == string::npos || nEnd == string::npos)
261 size_t nNumber = nEq + 1;
262 return (boost::lexical_cast<int>(lines[1].substr(nNumber, nEnd - nNumber)));
280 map<int, int> &bankstartindexmap, map<int, int> &bankendindexmap) {
284 for (
size_t i = 0; i < lines.size(); ++i) {
285 string line = lines[i];
286 if (line.find(
"Bank") != string::npos) {
288 if (startindex >= 0) {
291 endindex =
static_cast<int>(i) - 1;
292 bankstartindexmap.emplace(banks.back(), startindex);
293 bankendindexmap.emplace(banks.back(), endindex);
297 startindex =
static_cast<int>(i);
300 if (useFileBankIDs) {
301 vector<string> level1s;
302 boost::split(level1s, line, boost::is_any_of(
"Bank"));
303 vector<string> level2s;
304 string bankterm = level1s.back();
305 boost::algorithm::trim(bankterm);
306 boost::split(level2s, bankterm, boost::is_any_of(
" "));
307 bankid = std::stoi(level2s[0]);
311 banks.emplace_back(bankid);
314 if (startindex >= 0) {
315 endindex =
static_cast<int>(lines.size()) - 1;
316 bankstartindexmap.emplace(banks.back(), startindex);
317 bankendindexmap.emplace(banks.back(), endindex);
320 g_log.
debug() <<
"[DB1112] Number of bank IDs = " << banks.size() <<
", "
321 <<
"Number of ranges = " << bankstartindexmap.size() <<
'\n';
322 for (
const auto &bank : banks) {
323 g_log.
debug() <<
"Bank " << bank <<
" From line " << bankstartindexmap[bank] <<
" to " << bankendindexmap[bank]
342 const bool useFileBankIDs,
int bankid,
int startlineindex,
343 int endlineindex,
int profNumber) {
344 string bankline = lines[startlineindex];
348 if (tmpbankid != -1) {
349 g_log.
debug() <<
"Found CWL = " << cwl <<
", Bank ID = " << tmpbankid <<
"\n";
354 if (useFileBankIDs && (bankid != tmpbankid)) {
356 errss <<
"Input bank ID (" << bankid <<
") is not same as the bank ID (" << tmpbankid
357 <<
") found in the specified region from input. ";
358 throw runtime_error(errss.str());
361 parammap[
"NPROF"] = profNumber;
362 parammap[
"CWL"] = cwl;
364 for (
int i = startlineindex + 1; i <= endlineindex; ++i) {
365 string line = lines[i];
372 if (line.find(
"NPROF") != string::npos)
376 g_log.
debug() <<
"Parse Line " << i <<
"\t\t" << line <<
"\n";
378 if (line.starts_with(
"TOFRG")) {
380 vector<string> terms;
381 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
382 if (terms.size() != 4) {
384 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
386 throw runtime_error(errmsg.str());
392 }
else if (line.starts_with(
"D2TOF")) {
394 vector<string> terms;
395 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
396 if (terms.size() != 2 && terms.size() != 4) {
398 errmsg <<
"Line D2TOF has " << terms.size() <<
" terms. Different from 2/4 terms in definition.";
400 throw runtime_error(errmsg.str());
403 if (terms.size() == 4) {
407 parammap[
"Dtt2"] = 0.0;
408 parammap[
"Zero"] = 0.0;
412 else if (line.starts_with(
"ZD2TOF")) {
413 vector<string> terms;
414 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
415 if (terms.size() != 3) {
417 errmsg <<
"Line ZD2TOF has " << terms.size() <<
" terms. Different from 4 terms in definition.";
419 throw runtime_error(errmsg.str());
423 parammap[
"Dtt2"] = 0.;
426 else if (line.starts_with(
"D2TOT")) {
427 vector<string> terms;
428 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
429 if (terms.size() != 6) {
431 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
433 throw runtime_error(errmsg.str());
442 else if (line.starts_with(
"ZD2TOT")) {
443 vector<string> terms;
444 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
445 if (terms.size() != 6) {
447 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
449 throw runtime_error(errmsg.str());
458 else if (line.starts_with(
"TWOTH")) {
459 vector<string> terms;
460 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
461 if (terms.size() != 2) {
463 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
465 throw runtime_error(errmsg.str());
470 else if (line.starts_with(
"SIGMA")) {
471 vector<string> terms;
472 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
473 if (terms.size() != 4) {
475 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
477 throw runtime_error(errmsg.str());
484 else if (line.starts_with(
"GAMMA")) {
485 vector<string> terms;
486 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
487 if (terms.size() != 4) {
489 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
491 throw runtime_error(errmsg.str());
498 else if (line.starts_with(
"ALFBE")) {
500 vector<string> terms;
501 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
502 if (terms.size() != 5) {
504 errmsg <<
"Line ALFBE has " << terms.size() <<
" terms. Different from 4 terms in definition.";
506 throw runtime_error(errmsg.str());
514 else if (line.starts_with(
"ALFBT")) {
515 vector<string> terms;
516 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
517 if (terms.size() != 5) {
519 errmsg <<
"Line ALFBT has " << terms.size() <<
" terms. Different from 4 terms in definition.";
521 throw runtime_error(errmsg.str());
529 else if (line.starts_with(
"END")) {
533 g_log.
warning() <<
"Line '" << line <<
"' is not processed.\n";
544 std::vector<std::string> v;
545 iter_split(v, line, boost::algorithm::first_finder(
"Bank"));
548 string infostr = v[1];
549 boost::algorithm::trim(infostr);
554 if (infostr.find(
"CWL") != string::npos) {
557 iter_split(v, infostr, boost::algorithm::first_finder(
"CWL"));
560 bankid = std::stoi(v[0]);
565 boost::split(v, infostr, boost::is_any_of(
"=A"));
566 for (
size_t i = 0; i < v.size(); ++i) {
567 g_log.
debug() <<
"Last CWL splitted. Term " << i <<
": \t\t"
568 <<
"'" << v[i] <<
"'\n";
569 string candidate = v[i];
570 boost::algorithm::trim(candidate);
571 if (!candidate.empty()) {
580 if (!
value.empty()) {
582 return std::stod(
value);
584 std::stringstream msg;
585 msg <<
"Failed to convert \"" <<
value <<
"\" to a double";
586 if (!label.empty()) {
587 msg <<
" for \"" << label <<
"\"";
589 msg <<
" using 0. instead";
600 g_log.
notice() <<
"Start to generate table workspace ...."
604 size_t numbanks = bankparammap.size();
606 throw runtime_error(
"Unable to generate a table from an empty map!");
608 auto bankmapiter = bankparammap.begin();
609 size_t numparams = bankmapiter->second.size();
612 vector<string> vec_parname;
613 vector<int> vec_bankids;
615 map<string, double>::iterator parmapiter;
616 for (parmapiter = bankmapiter->second.begin(); parmapiter != bankmapiter->second.end(); ++parmapiter) {
617 string parname = parmapiter->first;
618 vec_parname.emplace_back(parname);
621 for (bankmapiter = bankparammap.begin(); bankmapiter != bankparammap.end(); ++bankmapiter) {
622 int bankid = bankmapiter->first;
623 vec_bankids.emplace_back(bankid);
626 g_log.
debug() <<
"[DBx240] Number of imported parameters is " << numparams
627 <<
", Number of banks = " << vec_bankids.size() <<
"."
631 auto tablews = std::make_shared<TableWorkspace>();
635 tablews->addColumn(
"str",
"Name");
636 for (
size_t i = 0; i < numbanks; ++i) {
637 stringstream colnamess;
638 int bankid = vec_bankids[i];
639 colnamess <<
"Value_" << bankid;
640 tablews->addColumn(
"double", colnamess.str());
643 g_log.
debug() <<
"Number of column = " << tablews->columnCount() <<
".\n";
646 TableRow newrow = tablews->appendRow();
648 for (
size_t i = 0; i < numbanks; ++i)
649 newrow <<
static_cast<double>(vec_bankids[i]);
651 g_log.
debug() <<
"Number of row now = " << tablews->rowCount() <<
".\n";
654 for (
size_t i = 0; i < numparams; ++i) {
655 newrow = tablews->appendRow();
657 string parname = vec_parname[i];
660 for (
size_t j = 0; j < numbanks; ++j) {
661 int bankid = vec_bankids[j];
664 map<int, map<string, double>>::iterator bpmapiter;
665 bpmapiter = bankparammap.find(bankid);
666 if (bpmapiter == bankparammap.end()) {
667 throw runtime_error(
"Bank cannot be found in map.");
671 parmapiter = bpmapiter->second.find(parname);
672 if (parmapiter == bpmapiter->second.end()) {
673 throw runtime_error(
"Parameter cannot be found in a bank's map.");
675 double pvalue = parmapiter->second;
695 std::map<int, size_t> &workspaceOfBank) {
696 if (workspaces.empty()) {
697 for (
size_t i = 0; i < banks.size(); i++) {
698 workspaceOfBank.emplace(banks[i], i + 1);
701 for (
size_t i = 0; i < banks.size(); i++) {
702 workspaceOfBank.emplace(banks[i], workspaces[i]);
718 std::string ¶meterXMLString) {
721 std::string instrumentName = ws->getInstrument()->getName();
726 writer.setNewLine(
"\n");
727 writer.setOptions(XMLWriter::PRETTY_PRINT);
730 Types::Core::DateAndTime date = Types::Core::DateAndTime::getCurrentTime();
731 std::string ISOdate = date.toISO8601String();
732 std::string ISOdateShort = ISOdate.substr(0, 19);
735 AutoPtr<Document> mDoc =
new Document();
736 AutoPtr<Element> rootElem = mDoc->createElement(
"parameter-file");
737 rootElem->setAttribute(
"date", ISOdateShort);
738 mDoc->appendChild(rootElem);
741 AutoPtr<Element> instrumentElem = mDoc->createElement(
"component-link");
742 instrumentElem->setAttribute(
"name", instrumentName);
743 rootElem->appendChild(instrumentElem);
760 std::ostringstream outFile;
761 writer.writeNode(outFile, mDoc);
762 parameterXMLString = outFile.str();
776 Element *parent,
const std::string ¶mName) {
777 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
779 parameterElem->setAttribute(
"type",
"fitting");
781 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
782 formulaElem->setAttribute(
"eq",
getXMLEqValue(column, paramName));
783 if (paramName !=
"Beta1")
784 formulaElem->setAttribute(
"result-unit",
"TOF");
785 parameterElem->appendChild(formulaElem);
787 AutoPtr<Element> fixedElem = mDoc->createElement(
"fixed");
788 parameterElem->appendChild(fixedElem);
790 parent->appendChild(parameterElem);
798 Poco::XML::Element *parent) {
799 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
800 parameterElem->setAttribute(
"name",
"IkedaCarpenterPV:SigmaSquared");
801 parameterElem->setAttribute(
"type",
"fitting");
803 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
805 formulaElem->setAttribute(
"eq", eqValue);
806 formulaElem->setAttribute(
"unit",
"dSpacing");
807 formulaElem->setAttribute(
"result-unit",
"TOF^2");
808 parameterElem->appendChild(formulaElem);
810 parent->appendChild(parameterElem);
818 Poco::XML::Element *parent) {
819 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
820 parameterElem->setAttribute(
"name",
"IkedaCarpenterPV:Gamma");
821 parameterElem->setAttribute(
"type",
"fitting");
823 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
824 std::string eqValue =
getXMLEqValue(column,
"Gam1") +
"*centre";
825 formulaElem->setAttribute(
"eq", eqValue);
826 formulaElem->setAttribute(
"unit",
"dSpacing");
827 formulaElem->setAttribute(
"result-unit",
"TOF");
828 parameterElem->appendChild(formulaElem);
830 parent->appendChild(parameterElem);
838 Poco::XML::Element *parent) {
839 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
840 parameterElem->setAttribute(
"name",
"BackToBackExponential:S");
841 parameterElem->setAttribute(
"type",
"fitting");
843 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
847 formulaElem->setAttribute(
"eq", eqValue);
848 formulaElem->setAttribute(
"unit",
"dSpacing");
849 formulaElem->setAttribute(
"result-unit",
"TOF");
850 parameterElem->appendChild(formulaElem);
852 parent->appendChild(parameterElem);
860 Poco::XML::Element *parent) {
861 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
862 parameterElem->setAttribute(
"name",
"BackToBackExponential:A");
863 parameterElem->setAttribute(
"type",
"fitting");
865 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
867 formulaElem->setAttribute(
"eq", eqValue);
868 formulaElem->setAttribute(
"unit",
"dSpacing");
869 formulaElem->setAttribute(
"result-unit",
"TOF");
870 parameterElem->appendChild(formulaElem);
872 AutoPtr<Element> fixedElem = mDoc->createElement(
"fixed");
873 parameterElem->appendChild(fixedElem);
875 parent->appendChild(parameterElem);
883 Poco::XML::Element *parent) {
884 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
885 parameterElem->setAttribute(
"name",
"BackToBackExponential:B");
886 parameterElem->setAttribute(
"type",
"fitting");
888 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
890 formulaElem->setAttribute(
"eq", eqValue);
891 formulaElem->setAttribute(
"unit",
"dSpacing");
892 formulaElem->setAttribute(
"result-unit",
"TOF");
893 parameterElem->appendChild(formulaElem);
895 AutoPtr<Element> fixedElem = mDoc->createElement(
"fixed");
896 parameterElem->appendChild(fixedElem);
898 parent->appendChild(parameterElem);
906 std::string prefix =
"IkedaCarpenterPV:";
908 return prefix +
"Alpha0";
910 return prefix +
"Beta0";
912 return prefix +
"Alpha1";
914 return prefix +
"Kappa";
926 double eqValue = column->cell<
double>(paramNumber);
927 return boost::lexical_cast<std::string>(eqValue);
936 const std::string &
name) {
939 double eqValue = column->cell<
double>(paramNumber);
940 return boost::lexical_cast<std::string>(eqValue * eqValue);
948 std::map<std::string, size_t> ¶mmap) {
951 size_t numrows = tablews->rowCount();
952 for (
size_t i = 0; i < numrows; ++i) {
954 std::string paramName;
956 parammap.emplace(paramName, i);
#define DECLARE_ALGORITHM(classname)
double value
The value of the point.
IPeaksWorkspace_sptr workspace
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
std::string getPropertyValue(const std::string &name) const override
Get the value of a property as a string.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
virtual std::shared_ptr< Algorithm > createChildAlgorithm(const std::string &name, const double startProgress=-1., const double endProgress=-1., const bool enableLogging=true, const int &version=-1)
Create a Child Algorithm.
@ Load
allowed here which will be passed to the algorithm
TableRow represents a row in a TableWorkspace.
A property class for workspaces.
LoadFullprofResolution : Load Fullprof resolution (.irf) file to TableWorkspace(s)
void loadFile(const std::string &filename, std::vector< std::string > &lines)
Load file to a vector of strings.
static std::string getXMLParameterName(const std::string &name)
static void getTableRowNumbers(const API::ITableWorkspace_sptr &tablews, std::map< std::string, size_t > ¶mmap)
Get row numbers of the parameters in the table workspace.
static void addALFBEParameter(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent, const std::string ¶mName)
Add an Ikeda-Carpenter PV ALFBE parameter.
void parseResolutionStrings(std::map< std::string, double > ¶mmap, const std::vector< std::string > &lines, const bool useFileBankIDs, int bankid, int startlineindex, int endlineindex, int profNumber)
Parse .irf file to a map.
void exec() override
Implement abstract Algorithm methods.
static std::string getXMLEqValue(const API::Column_const_sptr &, const std::string &name)
Get value for XML eq attribute for parameter.
static void addGammaParameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent)
Add set of Ikeda-Carpenter PV Gamma parameters.
static std::string getXMLSquaredEqValue(const API::Column_const_sptr &column, const std::string &name)
Get value for XML eq attribute for squared parameter.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
static void putParametersIntoWorkspace(const API::Column_const_sptr &, const API::MatrixWorkspace_sptr &ws, int nProf, std::string ¶meterXMLString)
Put parameters into a matrix workspace.
void init() override
Implement abstract Algorithm methods.
DataObjects::TableWorkspace_sptr genTableWorkspace(std::map< int, std::map< std::string, double > > bankparammap)
Generate output workspace.
void scanBanks(const std::vector< std::string > &lines, const bool useFileBankIDs, std::vector< int > &banks, std::map< int, int > &bankstartindexmap, std::map< int, int > &bankendindexmap)
Scan imported file for bank information.
void parseBankLine(std::string line, double &cwl, int &bankid)
Parse a line containing bank information.
static void addBBX_B_Parameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent)
Add set of BackToBackExponential B parameters.
static void addSigmaParameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent)
Add set of Ikeda-Carpenter PV Sigma parameters.
static void addBBX_A_Parameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent)
Add set of BackToBackExponential A parameters.
static void addBBX_S_Parameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent)
Add set of BackToBackExponential S parameters.
double parseDoubleValue(const std::string &value, const std::string &label=std::string())
Parse a value and prints warning if something is wrong.
int getProfNumber(const std::vector< std::string > &lines)
Get the NPROF number.
static void createBankToWorkspaceMap(const std::vector< int > &banks, const std::vector< int > &workspaces, std::map< int, size_t > &workspaceOfBank)
Create Bank to Workspace Correspondence.
static std::map< std::string, size_t > m_rowNumbers
Place to store the row numbers.
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 debug(const std::string &msg)
Logs at debug level.
void notice(const std::string &msg)
Logs at notice level.
void error(const std::string &msg)
Logs at error level.
void warning(const std::string &msg)
Logs at warning level.
The concrete, templated class for properties.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< const Column > Column_const_sptr
std::shared_ptr< Algorithm > Algorithm_sptr
Typedef for a shared pointer to an Algorithm.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
std::shared_ptr< Instrument > Instrument_sptr
Shared pointer to an instrument object.
Helper class which provides the Collimation Length for SANS instruments.
@ InOut
Both an input & output workspace.
@ Input
An input workspace.
@ Output
An output workspace.