Skip to content
Snippets Groups Projects
Commit e6768d64 authored by Jay Rainey's avatar Jay Rainey
Browse files

Add usage to CatalogGetDataSets. Refs #9585.

parent 1d5a1b25
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ namespace Mantid ...@@ -52,7 +52,7 @@ namespace Mantid
/// Algorithm's name for identification overriding a virtual method /// Algorithm's name for identification overriding a virtual method
virtual const std::string name() const { return "CatalogGetDataFiles"; } virtual const std::string name() const { return "CatalogGetDataFiles"; }
///Summary of algorithms purpose ///Summary of algorithms purpose
virtual const std::string summary() const { return "Obtains inforamtion of the files associated to a specific investigation."; } virtual const std::string summary() const { return "Obtains information of the datafiles associated to a specific investigation."; }
/// Algorithm's version for identification overriding a virtual method /// Algorithm's version for identification overriding a virtual method
virtual int version() const { return 1; } virtual int version() const { return 1; }
/// Algorithm's category for identification overriding a virtual method /// Algorithm's category for identification overriding a virtual method
......
...@@ -48,19 +48,16 @@ namespace Mantid ...@@ -48,19 +48,16 @@ namespace Mantid
CatalogGetDataSets():API::Algorithm(){} CatalogGetDataSets():API::Algorithm(){}
/// destructor for CatalogGetDataSets /// destructor for CatalogGetDataSets
~CatalogGetDataSets(){} ~CatalogGetDataSets(){}
/// Algorithm's name for identification overriding a virtual method /// Algorithm's name for identification overriding a virtual method
virtual const std::string name() const { return "CatalogGetDataSets"; } virtual const std::string name() const { return "CatalogGetDataSets"; }
///Summary of algorithms purpose ///Summary of algorithms purpose
virtual const std::string summary() const {return "Gets the datasets associated to the selected investigation.";} virtual const std::string summary() const { return "Obtains information of the datasets associated to a specific investigation."; }
/// Algorithm's version for identification overriding a virtual method /// Algorithm's version for identification overriding a virtual method
virtual int version() const { return 1; } virtual int version() const { return 1; }
/// Algorithm's category for identification overriding a virtual method /// Algorithm's category for identification overriding a virtual method
virtual const std::string category() const { return "DataHandling\\Catalog"; } virtual const std::string category() const { return "DataHandling\\Catalog"; }
private: private:
/// Overwrites Algorithm init method. /// Overwrites Algorithm init method.
void init(); void init();
/// Overwrites Algorithm exec method /// Overwrites Algorithm exec method
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
Description Description
----------- -----------
This algorithm retrieves the information of the files associated to an investigation, and saves the results to a workspace. This algorithm retrieves the information of the datafiles associated to an investigation, and saves the results to a workspace.
Usage Usage
----- -----
......
...@@ -9,8 +9,26 @@ ...@@ -9,8 +9,26 @@
Description Description
----------- -----------
This algorithm retrieves the datasets associated to the selected This algorithm retrieves the information of the datasets associated to an investigation, and saves the results to a workspace.
investigation from the information catalog and saves the search results
to mantid workspace. Usage
-----
**Example - obtain the datasets for a given catalog investigation.**
.. code:: python
# Assumes you have logged in and stored the session information that is
# returned from CatalogLogin() inside the session variable.
datasets = CatalogGetDataSets(InvestigationId = '1193002', Session = session.getPropertyValue("Session"))
# Verify that we have any datafiles in the returned workspace.
print "The number of datasets for this investigation is: " + str(len(datasets))
Output:
.. code:: python
The number of datafiles in this investigation is: 2
.. categories:: .. categories::
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment