UFO
FinalCheck.h
Go to the documentation of this file.
1 /*
2  * (C) Crown copyright 2021, Met Office
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #ifndef UFO_FILTERS_FINALCHECK_H_
9 #define UFO_FILTERS_FINALCHECK_H_
10 
11 #include <memory>
12 #include <ostream>
13 #include <string>
14 
15 #include "oops/generic/ObsFilterParametersBase.h"
16 #include "oops/util/ObjectCounter.h"
18 
19 namespace ufo {
20 
21 class FinalCheckParameters : public oops::ObsFilterParametersBase {
22  OOPS_CONCRETE_PARAMETERS(FinalCheckParameters, ObsFilterParametersBase)
23  // No extra parameters needed
24 };
25 
26 /// \brief A filter run automatically at the end of the whole sequence of filters.
27 ///
28 /// It does two things:
29 /// - verifies that all derived simulated variables have been created and if not, throws an
30 /// exception
31 /// - sets the QC flag of all observations with missing error estimates to `missing`.
33  private util::ObjectCounter<FinalCheck> {
34  public:
35  /// The type of parameters accepted by the constructor of this filter.
36  /// This typedef is used by the FilterFactory.
38 
39  static const std::string classname() {return "ufo::FinalCheck";}
40 
41  FinalCheck(ioda::ObsSpace & obsdb, const Parameters_ & params,
42  std::shared_ptr<ioda::ObsDataVector<int>> qcflags,
43  std::shared_ptr<ioda::ObsDataVector<float>> obserr);
44  ~FinalCheck() override;
45 
46  void doFilter() const override;
47 
48  private:
49  void print(std::ostream &) const override;
50 };
51 
52 } // namespace ufo
53 
54 #endif // UFO_FILTERS_FINALCHECK_H_
A filter run automatically at the end of the whole sequence of filters.
Definition: FinalCheck.h:33
void print(std::ostream &) const override
Definition: FinalCheck.cc:67
~FinalCheck() override
Definition: FinalCheck.cc:34
static const std::string classname()
Definition: FinalCheck.h:39
FinalCheck(ioda::ObsSpace &obsdb, const Parameters_ &params, std::shared_ptr< ioda::ObsDataVector< int >> qcflags, std::shared_ptr< ioda::ObsDataVector< float >> obserr)
Definition: FinalCheck.cc:24
void doFilter() const override
Definition: FinalCheck.cc:40
FinalCheckParameters Parameters_
Definition: FinalCheck.h:37
Base class for UFO observation processors (including QC filters).
Definition: RunCRTM.h:27