-
Notifications
You must be signed in to change notification settings - Fork 122
/
LoadIsawPeaks.h
61 lines (48 loc) · 2.05 KB
/
LoadIsawPeaks.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef MANTID_CRYSTAL_LOADISAWPEAKS_H_
#define MANTID_CRYSTAL_LOADISAWPEAKS_H_
#include "MantidKernel/System.h"
#include "MantidAPI/IFileLoader.h"
#include "MantidDataObjects/PeaksWorkspace.h"
namespace Mantid
{
namespace Crystal
{
/** LoadIsawPeaks : Load an ISAW-style .peaks file
* into a PeaksWorkspace
*
* @author Janik Zikovsky, SNS
* @date 2011-03-07 15:22:11.897153
*/
class DLLExport LoadIsawPeaks : public API::IFileLoader<Kernel::FileDescriptor>
{
public:
LoadIsawPeaks();
virtual ~LoadIsawPeaks();
/// Algorithm's name for identification
virtual const std::string name() const { return "LoadIsawPeaks";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
virtual const std::string category() const { return "Crystal;DataHandling\\Isaw";}
/// Returns a confidence value that this algorithm can load a file
virtual int confidence(Kernel::FileDescriptor & descriptor) const;
int findPixelID(Geometry::Instrument_const_sptr inst, std::string bankName, int col, int row);
private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialise the properties
void init();
/// Run the algorithm
void exec();
std::string ApplyCalibInfo(std::ifstream & in,
std::string startChar,
Geometry::Instrument_const_sptr instr_old,
Geometry::Instrument_const_sptr instr,
double &T0);
std::string readHeader( Mantid::DataObjects::PeaksWorkspace_sptr outWS, std::ifstream& in,double &T0 );
void appendFile( Mantid::DataObjects::PeaksWorkspace_sptr outWS, std::string filename);
void checkNumberPeaks( Mantid::DataObjects::PeaksWorkspace_sptr outWS, std::string filename );
};
} // namespace Mantid
} // namespace Crystal
#endif /* MANTID_CRYSTAL_LOADISAWPEAKS_H_ */