-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #6131. Implemented changes to version 2 muon nexus format.
- Loading branch information
1 parent
c971b31
commit 5c58a0d
Showing
19 changed files
with
1,466 additions
and
1,232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#ifndef MANTID_DATAHANDLING_LOADMUONNEXUS1_H_ | ||
#define MANTID_DATAHANDLING_LOADMUONNEXUS1_H_ | ||
|
||
//---------------------------------------------------------------------- | ||
// Includes | ||
//---------------------------------------------------------------------- | ||
#include "MantidDataHandling/LoadMuonNexus.h" | ||
#include "MantidDataObjects/Workspace2D.h" | ||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/SpectraDetectorMap.h" | ||
|
||
#include <napi.h> | ||
//---------------------------------------------------------------------- | ||
// Forward declaration | ||
//---------------------------------------------------------------------- | ||
class MuonNexusReader; | ||
|
||
namespace Mantid | ||
{ | ||
namespace DataHandling | ||
{ | ||
/** @class LoadMuonNexus LoadMuonNexus.h DataHandling/LoadMuonNexus.h | ||
Loads an file in Nexus Muon format version 1 and stores it in a 2D workspace | ||
(Workspace2D class). LoadMuonNexus is an algorithm and as such inherits | ||
from the Algorithm class, via DataHandlingCommand, and overrides | ||
the init() & exec() methods. | ||
Required Properties: | ||
<UL> | ||
<LI> Filename - The name of and path to the input NeXus file </LI> | ||
<LI> OutputWorkspace - The name of the workspace in which to store the imported data | ||
(a multiperiod file will store higher periods in workspaces called OutputWorkspace_PeriodNo) | ||
[ not yet implemented for Nexus ]</LI> | ||
</UL> | ||
Optional Properties: (note that these options are not available if reading a multiperiod file) | ||
<UL> | ||
<LI> spectrum_min - The spectrum to start loading from</LI> | ||
<LI> spectrum_max - The spectrum to load to</LI> | ||
<LI> spectrum_list - An ArrayProperty of spectra to load</LI> | ||
<LI> auto_group - Determines whether the spectra are automatically grouped together based on the groupings in the NeXus file. </LI> | ||
</UL> | ||
Copyright © 2007-2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
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 LoadMuonNexus1 : public LoadMuonNexus | ||
{ | ||
public: | ||
/// Default constructor | ||
LoadMuonNexus1(); | ||
/// Destructor | ||
virtual ~LoadMuonNexus1() {} | ||
/// Algorithm's name for identification overriding a virtual method | ||
virtual const std::string name() const { return "LoadMuonNexus"; } | ||
/// Algorithm's version for identification overriding a virtual method | ||
virtual int version() const { return 1; } | ||
/// Algorithm's category for identification overriding a virtual method | ||
virtual const std::string category() const { return "DataHandling\\Nexus;Muon"; } | ||
|
||
/// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded | ||
virtual int fileCheck(const std::string& filePath); | ||
protected: | ||
/// Overwrites Algorithm method | ||
void exec(); | ||
/// Implement the base class method | ||
void runLoadInstrumentFromNexus(DataObjects::Workspace2D_sptr); | ||
|
||
private: | ||
/// Sets documentation strings for this algorithm | ||
virtual void initDocs(); | ||
|
||
void loadData(const MantidVecPtr::ptr_type& tcbs,size_t hist, specid_t& i, | ||
MuonNexusReader& nxload, const int64_t lengthIn, DataObjects::Workspace2D_sptr localWorkspace); | ||
void runLoadMappingTable(DataObjects::Workspace2D_sptr); | ||
void runLoadLog(DataObjects::Workspace2D_sptr); | ||
void loadRunDetails(DataObjects::Workspace2D_sptr localWorkspace); | ||
}; | ||
|
||
} // namespace DataHandling | ||
} // namespace Mantid | ||
|
||
#endif /*MANTID_DATAHANDLING_LOADMUONNEXUS1_H_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.