Commit fa2e1d9e authored by Doucet, Mathieu's avatar Doucet, Mathieu
Browse files

Re #5051 Adding documentation

parent 9d6b29ea
......@@ -12,7 +12,9 @@ namespace Mantid
{
namespace API
{
/** DataProcessorAlgorithm : TODO: DESCRIPTION
/** DataProcessorAlgorithm :
Data processor algorithm to be used as a parent to workflow algorithms.
This algorithm provides utility methods to load and process data.
@date 2012-04-04
......
......@@ -65,6 +65,11 @@ namespace API
throw std::runtime_error("DataProcessorAlgorithm::loadChunk is not implemented");
}
/**
* Assemble the partial workspaces from all MPI processes
* @param partialWSName :: Name of the workspace to assemble
* @param outputWSName :: Name of the assembled workspace (available in main thread only)
*/
Workspace_sptr DataProcessorAlgorithm::assemble(const std::string &partialWSName, const std::string &outputWSName)
{
std::string threadOutput = partialWSName;
......@@ -86,6 +91,12 @@ namespace API
return outputWS;
}
/**
* Save a workspace as a nexus file, with check for which thread
* we are executing in.
* @param outputWSName :: Name of the workspace to save
* @param outputFile :: Path to the Nexus file to save
*/
void DataProcessorAlgorithm::saveNexus(const std::string &outputWSName,
const std::string &outputFile)
{
......@@ -103,6 +114,7 @@ namespace API
}
}
/// Return true if we are running on the main thread
bool DataProcessorAlgorithm::isMainThread()
{
bool mainThread = true;
......@@ -112,6 +124,7 @@ namespace API
return mainThread;
}
/// Return the number of MPI processes running
int DataProcessorAlgorithm::getNThreads()
{
#ifdef MPI_BUILD
......@@ -120,7 +133,11 @@ namespace API
return 1;
#endif
}
/// Determine what kind of input data we have and load it
/**
* Determine what kind of input data we have and load it
* @param inputData :: File path or workspace name
*/
Workspace_sptr DataProcessorAlgorithm::load(const std::string &inputData)
{
Workspace_sptr inputWS;
......@@ -177,8 +194,11 @@ namespace API
return inputWS;
}
/// Get the property manager object of a given name from the property manager
/// data service, or create a new one.
/**
* Get the property manager object of a given name from the property manager
* data service, or create a new one.
* @param propertyManager :: Name of the property manager to retrieve
*/
boost::shared_ptr<PropertyManager>
DataProcessorAlgorithm::getProcessProperties(const std::string &propertyManager)
{
......
......@@ -56,6 +56,9 @@ void EQSANSReduce::init()
"File path for the output nexus file");
}
/**
* Determine whether the input data is a file or a workspace and load it.
*/
Workspace_sptr EQSANSReduce::loadInputData()
{
setLoadAlg("LoadEventNexus");
......@@ -75,6 +78,10 @@ Workspace_sptr EQSANSReduce::loadInputData()
return inputWS;
}
/**
* Perform the reduction process on the given workspace.
* @param workspace :: name of the workspace to reduce
*/
void EQSANSReduce::performReduction(Workspace_sptr workspace)
{
if (!workspace)
......@@ -105,6 +112,11 @@ void EQSANSReduce::performReduction(Workspace_sptr workspace)
alg->execute();
}
/**
* Perform post-processing (I(q) calculation) on the reduced workspace.
* In the case of MPI jobs, the post-processing is done on the assemble workspace.
* @param workspace :: name of the workspace to process
*/
Workspace_sptr EQSANSReduce::postProcess(Workspace_sptr workspace)
{
// Construct the script's output workspace name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment