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/predicate.hpp>
22#include <boost/algorithm/string/trim.hpp>
24#include <Poco/DOM/AutoPtr.h>
25#include <Poco/DOM/DOMWriter.h>
26#include <Poco/DOM/Element.h>
27#include <Poco/XML/XMLWriter.h>
53 "Path to an Fullprof .irf file to load.");
56 auto wsprop = std::make_unique<WorkspaceProperty<API::ITableWorkspace>>(
"OutputTableWorkspace",
"",
Direction::Output,
58 declareProperty(std::move(wsprop),
"Name of the output TableWorkspace containing "
59 "profile parameters or bank information. ");
63 "Use bank IDs as given in file rather than ordinal number of bank."
64 "If the bank IDs in the file are not unique, it is advised to set this "
69 "The IDs are as specified by UseBankIDsInFile."
70 "Default is all banks contained in input .irf file.");
76 "A workspace group with the instrument to which we add the "
77 "parameters from the Fullprof .irf file with one workspace "
78 "for each bank of the .irf file");
82 "For each Fullprof bank,"
83 " the ID of the corresponding workspace in same order as the "
84 "Fullprof banks are specified. "
85 "ID=1 refers to the first workspace in the workspace group, "
86 "ID=2 refers to the second workspace and so on. "
87 "Default is all workspaces in numerical order."
88 "If default banks are specified, they too are taken to be in "
98 const bool useBankIDsInFile =
getProperty(
"UseBankIDsInFile");
101 vector<int> outputwsids =
getProperty(
"WorkspacesForBanks");
104 vector<string> lines;
111 vector<int> vec_bankinirf;
112 map<int, int> bankstartindexmap, bankendindexmap;
113 scanBanks(lines, useBankIDsInFile, vec_bankinirf, bankstartindexmap, bankendindexmap);
114 if (useBankIDsInFile)
115 sort(vec_bankinirf.begin(), vec_bankinirf.end());
117 for (
auto bank : vec_bankinirf)
118 g_log.
debug() <<
"Irf containing bank " << bank <<
".\n";
121 map<int, size_t> workspaceOfBank;
123 vector<int> vec_bankids;
125 if (vec_bankinirf.empty()) {
126 throw runtime_error(
"No Bank is found in input file.");
127 }
else if (outputbankids.empty()) {
128 vec_bankids = vec_bankinirf;
139 sort(outputbankids.begin(), outputbankids.end());
140 for (
auto outputbankid : outputbankids) {
141 if (outputbankid < 0) {
142 g_log.
warning() <<
"Input bank ID (" << outputbankid <<
") is negative. It is not allowed and is ignored. "
145 auto fiter = lower_bound(vec_bankinirf.begin(), vec_bankinirf.end(), outputbankid);
146 if (fiter == vec_bankinirf.end() || *fiter != outputbankid) {
149 errmsg <<
"Specified output bank (ID = " << outputbankid <<
") cannot be found in input " << datafile
150 <<
", which includes bank : ";
151 for (
size_t i = 0; i < vec_bankinirf.size(); ++i) {
152 errmsg << vec_bankinirf[i];
153 if (i != vec_bankinirf.size() - 1)
157 throw runtime_error(errmsg.str());
159 vec_bankids.emplace_back(outputbankid);
163 if (vec_bankids.empty()) {
164 g_log.
error(
"There is no valid specified bank IDs for output.");
165 throw runtime_error(
"There is no valid specified bank IDs for output.");
170 map<int, map<string, double>> bankparammap;
171 for (
int bankid : vec_bankids) {
172 g_log.
debug() <<
"Parse bank " << bankid <<
" of total " << vec_bankids.size() <<
".\n";
173 map<string, double> parammap;
175 bankendindexmap[bankid], nProf);
176 bankparammap.emplace(bankid, parammap);
191 if ((outputwsids.empty()) && (wsg->size() != vec_bankids.size())) {
192 std::ostringstream mess;
193 mess <<
"Number of banks (" << vec_bankids.size() <<
") does not match number of workspaces (" << wsg->size()
194 <<
") in group. Parameters not put into workspaces.";
199 for (
size_t i = 0; i < vec_bankids.size(); ++i) {
200 int bankId = vec_bankids[i];
201 size_t wsId = workspaceOfBank[bankId];
203 auto workspace = std::dynamic_pointer_cast<MatrixWorkspace>(wsi);
206 std::string parameterXMLString;
211 loadParamAlg->setProperty(
"ParameterXML", parameterXMLString);
212 loadParamAlg->setProperty(
"Workspace",
workspace);
213 loadParamAlg->execute();
218 throw std::runtime_error(
"Either the OutputTableWorkspace or Workspace property must be set.");
231 ifstream myfile(filename.c_str());
234 if (myfile.is_open()) {
237 while (!myfile.eof()) {
240 getline(myfile, line);
243 boost::algorithm::trim(line);
245 lines.emplace_back(line);
252 errmsg <<
"Input .irf file " << filename <<
" cannot be open. ";
254 throw runtime_error(errmsg.str());
264 if (lines[1].find(
"NPROF") != string::npos) {
266 size_t nStart = lines[1].find(
"NPROF");
267 size_t nEq = lines[1].find(
'=', nStart);
268 size_t nEnd = lines[1].find(
' ', nStart);
269 if (nEq == string::npos || nEnd == string::npos)
271 size_t nNumber = nEq + 1;
272 return (boost::lexical_cast<int>(lines[1].substr(nNumber, nEnd - nNumber)));
290 map<int, int> &bankstartindexmap, map<int, int> &bankendindexmap) {
294 for (
size_t i = 0; i < lines.size(); ++i) {
295 string line = lines[i];
296 if (line.find(
"Bank") != string::npos) {
298 if (startindex >= 0) {
301 endindex =
static_cast<int>(i) - 1;
302 bankstartindexmap.emplace(banks.back(), startindex);
303 bankendindexmap.emplace(banks.back(), endindex);
307 startindex =
static_cast<int>(i);
311 if (useFileBankIDs) {
312 vector<string> level1s;
313 boost::split(level1s, line, boost::is_any_of(
"Bank"));
314 vector<string> level2s;
315 string bankterm = level1s.back();
316 boost::algorithm::trim(bankterm);
317 boost::split(level2s, bankterm, boost::is_any_of(
" "));
318 bankid = std::stoi(level2s[0]);
322 banks.emplace_back(bankid);
325 if (startindex >= 0) {
326 endindex =
static_cast<int>(lines.size()) - 1;
327 bankstartindexmap.emplace(banks.back(), startindex);
328 bankendindexmap.emplace(banks.back(), endindex);
331 g_log.
debug() <<
"[DB1112] Number of bank IDs = " << banks.size() <<
", "
332 <<
"Number of ranges = " << bankstartindexmap.size() <<
'\n';
333 for (
auto &bank : banks) {
334 g_log.
debug() <<
"Bank " << bank <<
" From line " << bankstartindexmap[bank] <<
" to " << bankendindexmap[bank]
353 const bool useFileBankIDs,
int bankid,
int startlineindex,
354 int endlineindex,
int profNumber) {
355 string bankline = lines[startlineindex];
359 if (tmpbankid != -1) {
360 g_log.
debug() <<
"Found CWL = " << cwl <<
", Bank ID = " << tmpbankid <<
"\n";
365 if (useFileBankIDs && (bankid != tmpbankid)) {
367 errss <<
"Input bank ID (" << bankid <<
") is not same as the bank ID (" << tmpbankid
368 <<
") found in the specified region from input. ";
369 throw runtime_error(errss.str());
372 parammap[
"NPROF"] = profNumber;
373 parammap[
"CWL"] = cwl;
375 for (
int i = startlineindex + 1; i <= endlineindex; ++i) {
376 string line = lines[i];
383 if (line.find(
"NPROF") != string::npos)
387 g_log.
debug() <<
"Parse Line " << i <<
"\t\t" << line <<
"\n";
389 if (boost::starts_with(line,
"TOFRG")) {
391 vector<string> terms;
392 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
393 if (terms.size() != 4) {
395 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
397 throw runtime_error(errmsg.str());
403 }
else if (boost::starts_with(line,
"D2TOF")) {
405 vector<string> terms;
406 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
407 if (terms.size() != 2 && terms.size() != 4) {
409 errmsg <<
"Line D2TOF has " << terms.size() <<
" terms. Different from 2/4 terms in definition.";
411 throw runtime_error(errmsg.str());
414 if (terms.size() == 4) {
418 parammap[
"Dtt2"] = 0.0;
419 parammap[
"Zero"] = 0.0;
423 else if (boost::starts_with(line,
"ZD2TOF")) {
424 vector<string> terms;
425 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
426 if (terms.size() != 3) {
428 errmsg <<
"Line ZD2TOF has " << terms.size() <<
" terms. Different from 4 terms in definition.";
430 throw runtime_error(errmsg.str());
434 parammap[
"Dtt2"] = 0.;
437 else if (boost::starts_with(line,
"D2TOT")) {
438 vector<string> terms;
439 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
440 if (terms.size() != 6) {
442 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
444 throw runtime_error(errmsg.str());
453 else if (boost::starts_with(line,
"ZD2TOT")) {
454 vector<string> terms;
455 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
456 if (terms.size() != 6) {
458 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
460 throw runtime_error(errmsg.str());
469 else if (boost::starts_with(line,
"TWOTH")) {
470 vector<string> terms;
471 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
472 if (terms.size() != 2) {
474 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
476 throw runtime_error(errmsg.str());
481 else if (boost::starts_with(line,
"SIGMA")) {
482 vector<string> terms;
483 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
484 if (terms.size() != 4) {
486 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
488 throw runtime_error(errmsg.str());
495 else if (boost::starts_with(line,
"GAMMA")) {
496 vector<string> terms;
497 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
498 if (terms.size() != 4) {
500 errmsg <<
"Line TOFRG has " << terms.size() <<
" terms. Different from 4 terms in definition.";
502 throw runtime_error(errmsg.str());
509 else if (boost::starts_with(line,
"ALFBE")) {
511 vector<string> terms;
512 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
513 if (terms.size() != 5) {
515 errmsg <<
"Line ALFBE has " << terms.size() <<
" terms. Different from 4 terms in definition.";
517 throw runtime_error(errmsg.str());
525 else if (boost::starts_with(line,
"ALFBT")) {
526 vector<string> terms;
527 boost::split(terms, line, boost::is_any_of(
" "), boost::token_compress_on);
528 if (terms.size() != 5) {
530 errmsg <<
"Line ALFBT has " << terms.size() <<
" terms. Different from 4 terms in definition.";
532 throw runtime_error(errmsg.str());
540 else if (boost::starts_with(line,
"END")) {
544 g_log.
warning() <<
"Line '" << line <<
"' is not processed.\n";
555 std::vector<std::string> v;
556 iter_split(v, line, boost::algorithm::first_finder(
"Bank"));
559 string infostr = v[1];
560 boost::algorithm::trim(infostr);
565 if (infostr.find(
"CWL") != string::npos) {
568 iter_split(v, infostr, boost::algorithm::first_finder(
"CWL"));
571 bankid = std::stoi(v[0]);
576 boost::split(v, infostr, boost::is_any_of(
"=A"));
577 for (
size_t i = 0; i < v.size(); ++i) {
578 g_log.
debug() <<
"Last CWL splitted. Term " << i <<
": \t\t"
579 <<
"'" << v[i] <<
"'\n";
580 string candidate = v[i];
581 boost::algorithm::trim(candidate);
582 if (!candidate.empty()) {
591 if (!
value.empty()) {
593 return std::stod(
value);
595 std::stringstream msg;
596 msg <<
"Failed to convert \"" <<
value <<
"\" to a double";
597 if (!label.empty()) {
598 msg <<
" for \"" << label <<
"\"";
600 msg <<
" using 0. instead";
611 g_log.
notice() <<
"Start to generate table workspace ...."
615 size_t numbanks = bankparammap.size();
617 throw runtime_error(
"Unable to generate a table from an empty map!");
619 auto bankmapiter = bankparammap.begin();
620 size_t numparams = bankmapiter->second.size();
623 vector<string> vec_parname;
624 vector<int> vec_bankids;
626 map<string, double>::iterator parmapiter;
627 for (parmapiter = bankmapiter->second.begin(); parmapiter != bankmapiter->second.end(); ++parmapiter) {
628 string parname = parmapiter->first;
629 vec_parname.emplace_back(parname);
632 for (bankmapiter = bankparammap.begin(); bankmapiter != bankparammap.end(); ++bankmapiter) {
633 int bankid = bankmapiter->first;
634 vec_bankids.emplace_back(bankid);
637 g_log.
debug() <<
"[DBx240] Number of imported parameters is " << numparams
638 <<
", Number of banks = " << vec_bankids.size() <<
"."
642 auto tablews = std::make_shared<TableWorkspace>();
646 tablews->addColumn(
"str",
"Name");
647 for (
size_t i = 0; i < numbanks; ++i) {
648 stringstream colnamess;
649 int bankid = vec_bankids[i];
650 colnamess <<
"Value_" << bankid;
651 tablews->addColumn(
"double", colnamess.str());
654 g_log.
debug() <<
"Number of column = " << tablews->columnCount() <<
".\n";
657 TableRow newrow = tablews->appendRow();
659 for (
size_t i = 0; i < numbanks; ++i)
660 newrow <<
static_cast<double>(vec_bankids[i]);
662 g_log.
debug() <<
"Number of row now = " << tablews->rowCount() <<
".\n";
665 for (
size_t i = 0; i < numparams; ++i) {
666 newrow = tablews->appendRow();
668 string parname = vec_parname[i];
671 for (
size_t j = 0; j < numbanks; ++j) {
672 int bankid = vec_bankids[j];
675 map<int, map<string, double>>::iterator bpmapiter;
676 bpmapiter = bankparammap.find(bankid);
677 if (bpmapiter == bankparammap.end()) {
678 throw runtime_error(
"Bank cannot be found in map.");
682 parmapiter = bpmapiter->second.find(parname);
683 if (parmapiter == bpmapiter->second.end()) {
684 throw runtime_error(
"Parameter cannot be found in a bank's map.");
686 double pvalue = parmapiter->second;
706 std::map<int, size_t> &workspaceOfBank) {
707 if (workspaces.empty()) {
708 for (
size_t i = 0; i < banks.size(); i++) {
709 workspaceOfBank.emplace(banks[i], i + 1);
712 for (
size_t i = 0; i < banks.size(); i++) {
713 workspaceOfBank.emplace(banks[i], workspaces[i]);
729 std::string ¶meterXMLString) {
732 std::string instrumentName = ws->getInstrument()->getName();
737 writer.setNewLine(
"\n");
738 writer.setOptions(XMLWriter::PRETTY_PRINT);
741 Types::Core::DateAndTime date = Types::Core::DateAndTime::getCurrentTime();
742 std::string ISOdate = date.toISO8601String();
743 std::string ISOdateShort = ISOdate.substr(0, 19);
746 AutoPtr<Document> mDoc =
new Document();
747 AutoPtr<Element> rootElem = mDoc->createElement(
"parameter-file");
748 rootElem->setAttribute(
"date", ISOdateShort);
749 mDoc->appendChild(rootElem);
752 AutoPtr<Element> instrumentElem = mDoc->createElement(
"component-link");
753 instrumentElem->setAttribute(
"name", instrumentName);
754 rootElem->appendChild(instrumentElem);
771 std::ostringstream outFile;
772 writer.writeNode(outFile, mDoc);
773 parameterXMLString = outFile.str();
787 Element *parent,
const std::string ¶mName) {
788 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
790 parameterElem->setAttribute(
"type",
"fitting");
792 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
793 formulaElem->setAttribute(
"eq",
getXMLEqValue(column, paramName));
794 if (paramName !=
"Beta1")
795 formulaElem->setAttribute(
"result-unit",
"TOF");
796 parameterElem->appendChild(formulaElem);
798 AutoPtr<Element> fixedElem = mDoc->createElement(
"fixed");
799 parameterElem->appendChild(fixedElem);
801 parent->appendChild(parameterElem);
809 Poco::XML::Element *parent) {
810 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
811 parameterElem->setAttribute(
"name",
"IkedaCarpenterPV:SigmaSquared");
812 parameterElem->setAttribute(
"type",
"fitting");
814 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
816 formulaElem->setAttribute(
"eq", eqValue);
817 formulaElem->setAttribute(
"unit",
"dSpacing");
818 formulaElem->setAttribute(
"result-unit",
"TOF^2");
819 parameterElem->appendChild(formulaElem);
821 parent->appendChild(parameterElem);
829 Poco::XML::Element *parent) {
830 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
831 parameterElem->setAttribute(
"name",
"IkedaCarpenterPV:Gamma");
832 parameterElem->setAttribute(
"type",
"fitting");
834 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
835 std::string eqValue =
getXMLEqValue(column,
"Gam1") +
"*centre";
836 formulaElem->setAttribute(
"eq", eqValue);
837 formulaElem->setAttribute(
"unit",
"dSpacing");
838 formulaElem->setAttribute(
"result-unit",
"TOF");
839 parameterElem->appendChild(formulaElem);
841 parent->appendChild(parameterElem);
849 Poco::XML::Element *parent) {
850 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
851 parameterElem->setAttribute(
"name",
"BackToBackExponential:S");
852 parameterElem->setAttribute(
"type",
"fitting");
854 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
858 formulaElem->setAttribute(
"eq", eqValue);
859 formulaElem->setAttribute(
"unit",
"dSpacing");
860 formulaElem->setAttribute(
"result-unit",
"TOF");
861 parameterElem->appendChild(formulaElem);
863 parent->appendChild(parameterElem);
871 Poco::XML::Element *parent) {
872 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
873 parameterElem->setAttribute(
"name",
"BackToBackExponential:A");
874 parameterElem->setAttribute(
"type",
"fitting");
876 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
878 formulaElem->setAttribute(
"eq", eqValue);
879 formulaElem->setAttribute(
"unit",
"dSpacing");
880 formulaElem->setAttribute(
"result-unit",
"TOF");
881 parameterElem->appendChild(formulaElem);
883 AutoPtr<Element> fixedElem = mDoc->createElement(
"fixed");
884 parameterElem->appendChild(fixedElem);
886 parent->appendChild(parameterElem);
894 Poco::XML::Element *parent) {
895 AutoPtr<Element> parameterElem = mDoc->createElement(
"parameter");
896 parameterElem->setAttribute(
"name",
"BackToBackExponential:B");
897 parameterElem->setAttribute(
"type",
"fitting");
899 AutoPtr<Element> formulaElem = mDoc->createElement(
"formula");
901 formulaElem->setAttribute(
"eq", eqValue);
902 formulaElem->setAttribute(
"unit",
"dSpacing");
903 formulaElem->setAttribute(
"result-unit",
"TOF");
904 parameterElem->appendChild(formulaElem);
906 AutoPtr<Element> fixedElem = mDoc->createElement(
"fixed");
907 parameterElem->appendChild(fixedElem);
909 parent->appendChild(parameterElem);
917 std::string prefix =
"IkedaCarpenterPV:";
919 return prefix +
"Alpha0";
921 return prefix +
"Beta0";
923 return prefix +
"Alpha1";
925 return prefix +
"Kappa";
937 double eqValue = column->cell<
double>(paramNumber);
938 return boost::lexical_cast<std::string>(eqValue);
947 const std::string &name) {
950 double eqValue = column->cell<
double>(paramNumber);
951 return boost::lexical_cast<std::string>(eqValue * eqValue);
959 std::map<std::string, size_t> ¶mmap) {
962 size_t numrows = tablews->rowCount();
963 for (
size_t i = 0; i < numrows; ++i) {
967 parammap.emplace(
name, 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 containig 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.