Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_CBMFLATAGGREGATORLANDUNITDATA_H_
2 #define MOJA_MODULES_CBM_CBMFLATAGGREGATORLANDUNITDATA_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
8 #include "moja/flint/spatiallocationinfo.h"
10 #include <Poco/Mutex.h>
17 template<
class TPersistable,
class TRecord>
18 class RecordAccumulatorWithMutex2;
32 std::shared_ptr<std::vector<std::string>> classifierNames,
33 std::shared_ptr<Poco::Mutex> classifierNamesLock)
35 _fluxDimension(fluxDimension),
36 _poolDimension(poolDimension),
37 _errorDimension(errorDimension),
38 _ageDimension(ageDimension),
39 _disturbanceDimension(disturbanceDimension),
40 _classifierNames(classifierNames),
41 _classifierNamesLock(classifierNamesLock),
43 _previousAttributes() {}
47 void configure(
const DynamicObject& config)
override;
48 void subscribe(NotificationCenter& notificationCenter)
override;
50 flint::ModuleTypes
moduleType()
override {
return flint::ModuleTypes::System; };
52 void doLocalDomainInit()
override;
53 void doTimingInit()
override;
54 void doOutputStep()
override;
55 void doError(std::string msg)
override;
58 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatFluxRecord>>
_fluxDimension;
59 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatPoolRecord>>
_poolDimension;
60 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatErrorRecord>>
_errorDimension;
61 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatAgeAreaRecord>>
_ageDimension;
77 void recordLandUnitData(
bool isSpinup);
80 void recordClassifierNames(
const DynamicObject& classifierSet);
81 bool hasDisturbanceInfo(std::shared_ptr<flint::IOperationResult> flux);
86 #endif // MOJA_MODULES_CBM_CBMFLATAGGREGATORLANDUNITDATA_H_
Definition: flatrecord.h:119
Definition: ageclasshelper.cpp:12
bool _isPrimaryAggregator
Definition: cbmflataggregatorlandunitdata.h:72
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatFluxRecord > > _fluxDimension
Definition: cbmflataggregatorlandunitdata.h:58
Definition: cbmaggregatorcsvwriter.h:21
Definition: cbmflataggregatorlandunitdata.h:24
Definition: cbmmodulebase.h:22
AgeClassHelper _ageClassHelper
Definition: cbmflataggregatorlandunitdata.h:74
flint::IVariable * _landClass
Definition: cbmflataggregatorlandunitdata.h:67
std::shared_ptr< const flint::SpatialLocationInfo > _spatialLocationInfo
Definition: cbmflataggregatorlandunitdata.h:69
std::string _classifierSetVar
Definition: cbmflataggregatorlandunitdata.h:73
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatAgeAreaRecord > > _ageDimension
Definition: cbmflataggregatorlandunitdata.h:61
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatErrorRecord > > _errorDimension
Definition: cbmflataggregatorlandunitdata.h:60
Definition: cbmaggregatorcsvwriter.h:19
std::optional< FlatAgeAreaRecord > _previousAttributes
Definition: cbmflataggregatorlandunitdata.h:71
flint::ModuleTypes moduleType() override
Definition: cbmflataggregatorlandunitdata.h:50
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatPoolRecord > > _poolDimension
Definition: cbmflataggregatorlandunitdata.h:59
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatDisturbanceRecord > > _disturbanceDimension
Definition: cbmflataggregatorlandunitdata.h:62
Definition: ageclasshelper.h:11
std::shared_ptr< std::vector< std::string > > _classifierNames
Definition: cbmflataggregatorlandunitdata.h:63
std::shared_ptr< Poco::Mutex > _classifierNamesLock
Definition: cbmflataggregatorlandunitdata.h:64
flint::IVariable * _classifierSet
Definition: cbmflataggregatorlandunitdata.h:66
Definition: ageclasshelper.cpp:10
double _landUnitArea
Definition: cbmflataggregatorlandunitdata.h:70
CBMFlatAggregatorLandUnitData(std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatFluxRecord >> fluxDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatPoolRecord >> poolDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatErrorRecord >> errorDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatAgeAreaRecord >> ageDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatDisturbanceRecord >> disturbanceDimension, std::shared_ptr< std::vector< std::string >> classifierNames, std::shared_ptr< Poco::Mutex > classifierNamesLock)
Definition: cbmflataggregatorlandunitdata.h:26