Go to the documentation of this file.
8 #ifndef UFO_PROFILE_PROFILECHECKBASE_H_
9 #define UFO_PROFILE_PROFILECHECKBASE_H_
20 #include "eckit/exception/Exceptions.h"
21 #include "eckit/types/FloatCompare.h"
23 #include "oops/util/CompareNVectors.h"
24 #include "oops/util/Logger.h"
25 #include "oops/util/missingValues.h"
26 #include "oops/util/PropertiesOfNVectors.h"
31 class ProfileConsistencyCheckParameters;
32 class ProfileCheckValidator;
33 class ProfileDataHandler;
61 const std::vector <T> &v2,
62 std::vector <T> &vout)
64 ASSERT(v1.size() == v2.size());
65 vout.assign(v1.size(), 0);
66 std::transform(v1.begin(), v1.end(), v2.begin(), vout.begin(), std::plus<T>());
90 static std::unique_ptr<ProfileCheckBase>
create(
const std::string&,
104 static std::map <std::string, ProfileCheckFactory*> &
getMakers()
106 static std::map <std::string, ProfileCheckFactory*> makers_;
114 virtual std::unique_ptr<ProfileCheckBase>
120 return std::unique_ptr<ProfileCheckBase>(
new T(options,
123 profileCheckValidator));
131 #endif // UFO_PROFILE_PROFILECHECKBASE_H_
virtual ~ProfileCheckFactory()=default
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
ProfileCheckFactory(const std::string &)
ProfileCheckMaker(const std::string &name)
const ProfileIndices & profileIndices_
Indices of profile's observations in the entire sample.
ProfileCheckValidator & profileCheckValidator_
Profile check validator.
Determine indices of observations making up individual profiles. The indices are computed with respec...
ProfileDataHandler & profileDataHandler_
Profile data handler.
ProfileCheckBase(const ProfileConsistencyCheckParameters &options, const ProfileIndices &profileIndices, ProfileDataHandler &profileDataHandler, ProfileCheckValidator &profileCheckValidator)
virtual std::unique_ptr< ProfileCheckBase > make(const ProfileConsistencyCheckParameters &options, const ProfileIndices &profileIndices, ProfileDataHandler &profileDataHandler, ProfileCheckValidator &profileCheckValidator)
virtual ~ProfileCheckBase()
Profile QC check validator.
static std::map< std::string, ProfileCheckFactory * > & getMakers()
virtual bool getResult()
Get result of check (default fail)
virtual void fillValidator()=0
Fill variables in validator.
Profile QC checker base class.
virtual std::unique_ptr< ProfileCheckBase > make(const ProfileConsistencyCheckParameters &, const ProfileIndices &, ProfileDataHandler &, ProfileCheckValidator &)=0
const ProfileConsistencyCheckParameters & options_
Configurable parameters.
const float missingValueFloat
Missing value (float)
virtual void runCheck()=0
Run check.
Options controlling the operation of the ProfileConsistencyChecks filter.
void correctVector(const std::vector< T > &v1, const std::vector< T > &v2, std::vector< T > &vout)
Apply correction to vector of values.
static std::unique_ptr< ProfileCheckBase > create(const std::string &, const ProfileConsistencyCheckParameters &, const ProfileIndices &, ProfileDataHandler &, ProfileCheckValidator &)