forked from NOVACProject/MobileDOAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvaluationLogFileHandler.h
67 lines (54 loc) · 2.34 KB
/
EvaluationLogFileHandler.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
62
63
64
65
66
67
#pragma once
#include "Evaluation/TraverseResult.h"
#include "Common.h"
#include "Evaluation/FitWindow.h"
class CEvaluationLogFileHandler
{
public:
/** Default constructor */
CEvaluationLogFileHandler(void);
/** Default destructor */
~CEvaluationLogFileHandler(void);
/** Reads an evaluation log-file the result is stored in the
array, m_traverses.
Returns SUCCESS or FAIL. */
bool ReadEvaluationLogFile(const CString &logFileName);
/** The traverses found in the last read evaluation-log file.
There is one traverse defined for each channel that was read in
the last read evaluation log file. */
CTraverseResult m_traverses[MAX_N_CHANNELS];
/** The number of traverses read, i.e. the number of channels in
the last evaluation log file. */
long m_numTraverses;
protected:
/** Reads and parses the header line of the log-file.
This line tells us which column corresponds to which value in
the log-file. This function parses the line and stores the
result in the 'm_columns' object. This only works for log-files
with version >= 4.0 since the earlier versions does not have
a header-line */
bool ParseHeaderLine(const CString &headerLine);
/** Sets the correct columns for log-file of version 3.2 */
bool SetColumns_32();
/** The LogColumns enables us to find out what kind of data
there is to be found in each of the columns in the log-file.
E.g the item 'expTime' tells us in which column the
exposure time of the spectra can be found.
Columns are indexed starting on zero. */
typedef struct LogColumns{
int nSpecies; // <-- the number of species this traverse has been evaluated for
int nChannels; // <-- the number of spectrometer channels that was used during this traverse
int gpsTime;
int latitude;
int longitude;
int altitude;
int expTime;
int numSpec;
int intensity[MAX_N_CHANNELS]; // there's one intensity value for each spectrometer-channel
int column[MAX_N_CHANNELS][MAX_N_REFERENCES]; // for each channel there can be at most MAX_N_REFERENCES referece-files
int columnError[MAX_N_CHANNELS][MAX_N_REFERENCES]; // for each channel there can be at most MAX_N_REFERENCES referece-files
int specFile[MAX_N_CHANNELS]; // the spectrum file
}LogColumns;
/** Our own LogColumns-object */
LogColumns m_columns;
};