hydrobricks
Loading...
Searching...
No Matches
Logger.h
1#ifndef HYDROBRICKS_LOGGER_H
2#define HYDROBRICKS_LOGGER_H
3
4#include "Includes.h"
5#include "SettingsModel.h"
6#include "SubBasin.h"
7
8class Logger : public wxObject {
9 public:
10 explicit Logger();
11
12 ~Logger() override = default;
13
14 void InitContainers(int timeSize, SubBasin* subBasin, SettingsModel& modelSettings);
15
16 void Reset();
17
18 void SetSubBasinValuePointer(int iLabel, double* valPt);
19
20 void SetHydroUnitValuePointer(int iUnit, int iLabel, double* valPt);
21
22 void SetHydroUnitFractionPointer(int iUnit, int iLabel, double* valPt);
23
24 void SetDate(double date);
25
26 void SaveInitialValues();
27
28 void Record();
29
30 void Increment();
31
32 bool DumpOutputs(const string& path);
33
34 axd GetOutletDischarge();
35
36 vecInt GetIndicesForSubBasinElements(const string& item);
37
38 vecInt GetIndicesForHydroUnitElements(const string& item);
39
40 double GetTotalSubBasin(const string& item);
41
42 double GetTotalHydroUnits(const string& item, bool needsAreaWeighting = false);
43
44 double GetTotalOutletDischarge();
45
46 double GetTotalET();
47
48 double GetSubBasinInitialStorageState(const string& tag);
49
50 double GetSubBasinFinalStorageState(const string& tag);
51
52 double GetHydroUnitsInitialStorageState(const string& tag);
53
54 double GetHydroUnitsFinalStorageState(const string& tag);
55
56 double GetTotalWaterStorageChanges();
57
58 double GetTotalSnowStorageChanges();
59
60 const vecAxd& GetSubBasinValues() {
61 return m_subBasinValues;
62 }
63
64 const vecAxxd& GetHydroUnitValues() {
65 return m_hydroUnitValues;
66 }
67
68 void RecordFractions() {
69 m_recordFractions = true;
70 }
71
72 protected:
73 int m_cursor;
74 axd m_time;
75 bool m_recordFractions;
76 vecStr m_subBasinLabels;
77 axd m_subBasinInitialValues;
78 vecAxd m_subBasinValues;
79 vecDoublePt m_subBasinValuesPt;
80 vecInt m_hydroUnitIds;
81 axd m_hydroUnitAreas;
82 vecStr m_hydroUnitLabels;
83 vecAxd m_hydroUnitInitialValues;
84 vecAxxd m_hydroUnitValues;
85 vector<vecDoublePt> m_hydroUnitValuesPt;
86 vecStr m_hydroUnitFractionLabels;
87 vecAxxd m_hydroUnitFractions;
88 vector<vecDoublePt> m_hydroUnitFractionsPt;
89
90 private:
91};
92
93#endif // HYDROBRICKS_LOGGER_H
Definition Logger.h:8
Definition SettingsModel.h:66
Definition SubBasin.h:10