Skip to content

Commit

Permalink
clang-format, copyright line, etc, re #10591
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Jan 13, 2015
1 parent 6876e7c commit 08daa72
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
Expand Up @@ -7,23 +7,25 @@ namespace Mantid {
namespace RemoteAlgorithms {
/***
Algorithm to initiate a tomographic reconstruction on SCARF at RAL.
The algorithm can also be used to to retrieve information about a reconstruction job or to cancel it.
The algorithm can also be used to to retrieve information about a
reconstruction job or to cancel it.
Input Properties:
<UL>
<LI> ComputeResource - The name of the compute resource that will execute the job </LI>
<LI> ComputeResource - The name of the compute resource that will execute
the job </LI>
<LI> UserName - User name on the compute resource </LI>
<LI> Password - Password for the compute resource </LI>
</UL>
Output Properties: None.
If the authentication is successfull, a cookie is received that is stored internally and
If the authentication is successfull, a cookie is received that is stored
internally and
re-used for all subsequent interactions with the compute resource.
@author John R Hill, RAL
@date 19/11/2014
Copyright &copy; 2013 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
Expand All @@ -44,26 +46,26 @@ namespace RemoteAlgorithms {
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/


class SCARFTomoReconstruction : public Mantid::API::Algorithm
{
class SCARFTomoReconstruction : public Mantid::API::Algorithm {
public:
/// (Empty) Constructor
SCARFTomoReconstruction() : Mantid::API::Algorithm() {}
/// Virtual destructor
virtual ~SCARFTomoReconstruction() {}
/// Algorithm's name
virtual const std::string name() const { return "SCARFTomoReconstruction"; }
///Summary of algorithms purpose
virtual const std::string summary() const {return "Perform a tomographic reconstruction action on SCARF at RAL";}
/// Summary of algorithms purpose
virtual const std::string summary() const {
return "Perform a tomographic reconstruction action on SCARF at RAL";
}
/// Algorithm's version
virtual int version() const { return (1); }
/// Algorithm's category for identification
virtual const std::string category() const { return "Remote"; }

private:
void init();
///Execution code
/// Execution code
void exec();

// ***********
Expand Down
Expand Up @@ -7,73 +7,71 @@
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>

namespace Mantid
{
namespace RemoteAlgorithms
{

namespace Mantid {
namespace RemoteAlgorithms {

// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(SCARFTomoReconstruction)

using namespace boost::assign;
using namespace Mantid::Kernel;

void SCARFTomoReconstruction::init()
{
auto requireValue = boost::make_shared<MandatoryValidator<std::string> >();

void SCARFTomoReconstruction::init() {
auto requireValue = boost::make_shared<MandatoryValidator<std::string>>();

std::vector<std::string> reconstructionOps;
reconstructionOps += "CreateJob","JobStatus","JobDelete";
auto listValue = boost::make_shared<StringListValidator>(reconstructionOps);
reconstructionOps += "CreateJob", "JobStatus", "JobDelete";
auto listValue = boost::make_shared<StringListValidator>(reconstructionOps);

std::vector<std::string> exts;
exts.push_back(".nxs");
exts.push_back(".*");

// User
declareProperty( "UserName", "", requireValue, "Name of the user to authenticate as", Direction::Input);
declareProperty("UserName", "", requireValue,
"Name of the user to authenticate as", Direction::Input);

// Password
declareProperty( new MaskedProperty<std::string>( "Password", "", requireValue, Direction::Input), "The password for the user");
declareProperty(new MaskedProperty<std::string>("Password", "", requireValue,
Direction::Input),
"The password for the user");

// Operation to perform : Update description as enum changes
declareProperty( "Operation", "", listValue, "Choose the operation to perform on SCARF; [CreateJob,JobStatus,JobDelete]", Direction::Input),

// NXTomo File path on SCARF
declareProperty( new PropertyWithValue<std::string>( "RemoteNXTomoPath", "", Direction::Input),
"The path on SCARF to the NXTomo file to reconstruct");

// Job ID on SCARF
declareProperty( new PropertyWithValue<std::string>( "JobID", "", Direction::Input) ,
"The ID for a currently running job on SCARF");
declareProperty("Operation", "", listValue, "Choose the operation to perform "
"on SCARF; "
"[CreateJob,JobStatus,JobDelete]",
Direction::Input),

// Path to parameter file for reconstruction
declareProperty(new API::FileProperty("ParameterFilePath", "", API::FileProperty::OptionalLoad, exts, Direction::Input),
"Parameter file for the reconstruction job");
// NXTomo File path on SCARF
declareProperty(new PropertyWithValue<std::string>("RemoteNXTomoPath", "",
Direction::Input),
"The path on SCARF to the NXTomo file to reconstruct");

// Job ID on SCARF
declareProperty(
new PropertyWithValue<std::string>("JobID", "", Direction::Input),
"The ID for a currently running job on SCARF");

// Path to parameter file for reconstruction
declareProperty(new API::FileProperty("ParameterFilePath", "",
API::FileProperty::OptionalLoad, exts,
Direction::Input),
"Parameter file for the reconstruction job");
}

void SCARFTomoReconstruction::exec()
{
void SCARFTomoReconstruction::exec() {
m_userName = getProperty("UserName");
m_password = getProperty("Password");
m_operation = getProperty("Operation");
m_nxTomoPath = getProperty("RemoteNXTomoPath");
m_jobID = getProperty("JobID");
m_parameterPath = getProperty("ParameterFilePath");

if(m_operation == "CreateJob")
{

}
else if(m_operation == "JobStatus")
{
if (m_operation == "CreateJob") {

}
else if(m_operation == "JobDelete")
{
} else if (m_operation == "JobStatus") {

} else if (m_operation == "JobDelete") {
}

g_log.information("Run SCARFTomoReconstruction");
Expand Down

0 comments on commit 08daa72

Please sign in to comment.