| 1 |
rtomiyasu |
3 |
/* |
| 2 |
|
|
* The MIT License |
| 3 |
|
|
|
| 4 |
|
|
Conograph (powder auto-indexing program) |
| 5 |
|
|
|
| 6 |
|
|
Copyright (c) <2012> <Ryoko Oishi-Tomiyasu, KEK> |
| 7 |
|
|
|
| 8 |
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
| 9 |
|
|
of this software and associated documentation files (the "Software"), to deal |
| 10 |
|
|
in the Software without restriction, including without limitation the rights |
| 11 |
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 12 |
|
|
copies of the Software, and to permit persons to whom the Software is |
| 13 |
|
|
furnished to do so, subject to the following conditions: |
| 14 |
|
|
|
| 15 |
|
|
The above copyright notice and this permission notice shall be included in |
| 16 |
|
|
all copies or substantial portions of the Software. |
| 17 |
|
|
|
| 18 |
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 |
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 |
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 21 |
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 22 |
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 23 |
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 24 |
|
|
THE SOFTWARE. |
| 25 |
|
|
* |
| 26 |
|
|
*/ |
| 27 |
|
|
#ifndef _PeakPosData_h_ |
| 28 |
|
|
#define _PeakPosData_h_ |
| 29 |
|
|
|
| 30 |
|
|
// PeakPosData.hh |
| 31 |
|
|
#include "RietveldAnalysisTypes.hh" |
| 32 |
|
|
#include "zerror_type/error_out.hh" |
| 33 |
|
|
|
| 34 |
|
|
|
| 35 |
|
|
using namespace std; |
| 36 |
|
|
|
| 37 |
|
|
class PeakPosData |
| 38 |
|
|
{ |
| 39 |
|
|
private: |
| 40 |
|
|
enum{ NumContents = 3 }; // x-phase, y-phase(, error). |
| 41 |
|
|
|
| 42 |
|
|
Vec_DP m_XWave; |
| 43 |
|
|
Vec_DP m_YInt; |
| 44 |
|
|
Vec_DP m_YErr; |
| 45 |
|
|
string m_XWave_title; |
| 46 |
|
|
string m_YInt_title; |
| 47 |
|
|
string m_YErr_title; |
| 48 |
|
|
|
| 49 |
|
|
Vec_DP PeakPosX; |
| 50 |
|
|
Vec_DP PeakPosY; |
| 51 |
|
|
Vec_DP PeakWidth; |
| 52 |
|
|
Vec_BOOL toUseFlag; |
| 53 |
|
|
|
| 54 |
|
|
public: |
| 55 |
|
|
PeakPosData(); |
| 56 |
|
|
~PeakPosData(); |
| 57 |
|
|
|
| 58 |
rtomiyasu |
33 |
// For GUI developers. |
| 59 |
|
|
inline void setPeakPosXData(const Vec_DP& arg){ PeakPosX=arg; }; |
| 60 |
rtomiyasu |
3 |
inline void setPeakPosYData(const Vec_DP& arg){ PeakPosY=arg; }; |
| 61 |
|
|
inline void setPeakWidthData(const Vec_DP& arg){ PeakWidth=arg; }; |
| 62 |
|
|
inline void setToUseFlag(const Vec_BOOL& arg){ toUseFlag=arg; }; |
| 63 |
|
|
|
| 64 |
|
|
inline void setXColumn(const Vec_DP& arg){ m_XWave=arg; }; |
| 65 |
|
|
inline void setYIntColumn(const Vec_DP& arg){ m_YInt=arg; }; |
| 66 |
|
|
inline void setYErrorColumn(const Vec_DP& arg){ m_YErr=arg; }; |
| 67 |
|
|
|
| 68 |
|
|
inline void setXColumnTitle(const string& arg){ m_XWave_title = arg; }; |
| 69 |
|
|
inline void setYIntColumnTitle(const string& arg){ m_YInt_title = arg; }; |
| 70 |
|
|
inline void setYErrorColumnTitle(const string& arg){ m_YErr_title = arg; }; |
| 71 |
|
|
|
| 72 |
|
|
inline const Vec_DP& putPeakPosXData() const { return PeakPosX; }; |
| 73 |
|
|
inline const Vec_DP& putPeakPosYData() const { return PeakPosY; }; |
| 74 |
|
|
inline const Vec_DP& putPeakWidthData() const { return PeakWidth; }; |
| 75 |
|
|
inline const Vec_BOOL& putToUseFlag() const { return toUseFlag; }; |
| 76 |
|
|
|
| 77 |
|
|
inline const Vec_DP& putXColumn() const { return m_XWave; }; |
| 78 |
|
|
inline const Vec_DP& putYIntColumn() const { return m_YInt; }; |
| 79 |
|
|
inline const Vec_DP& putYErrorColumn() const { return m_YErr;}; |
| 80 |
|
|
|
| 81 |
|
|
inline const string& putXColumnTitle() const { return m_XWave_title; }; |
| 82 |
|
|
inline const string& putYIntColumnTitle() const { return m_YInt_title; }; |
| 83 |
|
|
inline const string& putYErrorColumnTitle() const { return m_YErr_title;}; |
| 84 |
|
|
|
| 85 |
|
|
ZErrorMessageReadingFile readFile(const string& fname); |
| 86 |
|
|
void printData(ostream *os) const; |
| 87 |
rtomiyasu |
25 |
Double putMaxPeakHeightOfFirst20() const; |
| 88 |
rtomiyasu |
3 |
}; |
| 89 |
|
|
|
| 90 |
|
|
#endif |