Skip to content

Commit

Permalink
Refs #10194 create files
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRHill committed Sep 11, 2014
1 parent 6ef9ef9 commit a3d05d0
Show file tree
Hide file tree
Showing 4 changed files with 2,460 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/DataHandling/CMakeLists.txt
Expand Up @@ -127,6 +127,7 @@ set ( SRC_FILES
src/SaveNXSPE.cpp
src/SaveNexus.cpp
src/SaveNexusProcessed.cpp
src/SaveNXTomo.cpp
src/SaveParameterFile.cpp
src/SavePAR.cpp
src/SavePHX.cpp
Expand Down Expand Up @@ -264,6 +265,7 @@ set ( INC_FILES
inc/MantidDataHandling/SaveNXSPE.h
inc/MantidDataHandling/SaveNexus.h
inc/MantidDataHandling/SaveNexusProcessed.h
inc/MantidDataHandling/SaveNXTomo.h
inc/MantidDataHandling/SaveParameterFile.h
inc/MantidDataHandling/SavePAR.h
inc/MantidDataHandling/SavePHX.h
Expand Down
104 changes: 104 additions & 0 deletions Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveNXTomo.h
@@ -0,0 +1,104 @@
#ifndef MANTID_DATAHANDLING_SAVENXTOMO_H_
#define MANTID_DATAHANDLING_SAVENXTOMO_H_

//---------------------------------------------------
// Includes
//---------------------------------------------------
//#include "MantidAPI/Algorithm.h"
//#include "MantidNexus/NexusClasses.h"
//#include "MantidAPI/MatrixWorkspace.h"
//#include "MantidAPI/Sample.h"
//#include "MantidDataObjects/Workspace2D.h"
//#include "MantidDataObjects/EventWorkspace.h"
//#include <nexus/NeXusFile.hpp>
//#include <nexus/NeXusException.hpp>

namespace Mantid
{
namespace DataHandling
{

/**
* Saves a workspace into a NeXus/HDF5 NXTomo file.
*
* Required properties:
* <ul>
* <li> InputWorkspace - The workspace to save. </li>
* <li> Filename - The filename for output </li>
* </ul>
*
* @author John R Hill, RAL
* @date 10/09/2014
*
* This file is part of Mantid.
*
* Mantid is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Mantid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* File change history is stored at: <https://github.com/mantidproject/mantid>
* Code Documentation is available at: <http://doxygen.mantidproject.org>
*
*/

class DLLExport SaveNXTomo: public API::Algorithm
{
public:
/// Constructor
SaveNXTomo();
/// Virtual dtor
virtual ~SaveNXTomo()
{
}
virtual const std::string name() const
{
return "SaveNXTomo";
}
///Summary of algorithms purpose
virtual const std::string summary() const {return "Writes a MatrixWorkspace to a file in the NXTomo format.";}

/// Algorithm's version
virtual int version() const
{
return (1);
}
/// Algorithm's category for identification
virtual const std::string category() const
{
return "DataHandling\\Nexus;DataHandling\\Tomo;Diffraction";
}

private:

/// Initialisation code
void init();
///Execution code
void exec();

///the number of bins in each histogram, as the histogram must have common bins this shouldn't change
//size_t nBins;
/// The filename of the output file
//std::string filename;

// Some constants to be written for masked values.
/// Value for data if pixel is masked
//static const double MASK_FLAG;
/// Value for error if pixel is masked
//static const double MASK_ERROR;
/// file format version
//static const std::string NXSPE_VER;
};

} // namespace DataHandling
} // namespace Mantid

#endif // MANTID_DATAHANDLING_SAVENXTOMO_H_

0 comments on commit a3d05d0

Please sign in to comment.