11 #ifndef OOPS_INTERFACE_OBSAUXCONTROL_H_
12 #define OOPS_INTERFACE_OBSAUXCONTROL_H_
19 #include "oops/util/Logger.h"
20 #include "oops/util/ObjectCounter.h"
21 #include "oops/util/Printable.h"
22 #include "oops/util/Timer.h"
34 template <
typename OBS>
36 private util::ObjectCounter<ObsAuxControl<OBS> > {
42 static const std::string
classname() {
return "oops::ObsAuxControl";}
73 void print(std::ostream &)
const;
74 std::unique_ptr<ObsAuxControl_>
aux_;
79 template<
typename OBS>
83 Log::trace() <<
"ObsAuxControl<OBS>::ObsAuxControl starting" << std::endl;
84 util::Timer timer(
classname(),
"ObsAuxControl");
86 Log::trace() <<
"ObsAuxControl<OBS>::ObsAuxControl done" << std::endl;
91 template<
typename OBS>
94 Log::trace() <<
"ObsAuxControl<OBS>::ObsAuxControl copy starting" << std::endl;
95 util::Timer timer(
classname(),
"ObsAuxControl");
97 Log::trace() <<
"ObsAuxControl<OBS>::ObsAuxControl copy done" << std::endl;
102 template<
typename OBS>
104 Log::trace() <<
"ObsAuxControl<OBS>::~ObsAuxControl starting" << std::endl;
105 util::Timer timer(classname(),
"~ObsAuxControl");
107 Log::trace() <<
"ObsAuxControl<OBS>::~ObsAuxControl done" << std::endl;
112 template<
typename OBS>
114 Log::trace() <<
"ObsAuxControl<OBS>::read starting" << std::endl;
115 util::Timer timer(classname(),
"read");
117 Log::trace() <<
"ObsAuxControl<OBS>::read done" << std::endl;
122 template<
typename OBS>
124 Log::trace() <<
"ObsAuxControl<OBS>::write starting" << std::endl;
125 util::Timer timer(classname(),
"write");
127 Log::trace() <<
"ObsAuxControl<OBS>::write done" << std::endl;
132 template<
typename OBS>
134 Log::trace() <<
"ObsAuxControl<OBS>::norm starting" << std::endl;
135 util::Timer timer(classname(),
"norm");
136 double zz = aux_->norm();
137 Log::trace() <<
"ObsAuxControl<OBS>::norm done" << std::endl;
143 template<
typename OBS>
145 Log::trace() <<
"ObsAuxControl<OBS>::requiredVars starting" << std::endl;
146 util::Timer timer(classname(),
"requiredVars");
147 Log::trace() <<
"ObsAuxControl<OBS>::requiredVars done" << std::endl;
148 return aux_->requiredVars();
153 template<
typename OBS>
155 Log::trace() <<
"ObsAuxControl<OBS>::requiredHdiagnostics starting" << std::endl;
156 util::Timer timer(classname(),
"requiredHdiagnostics");
157 Log::trace() <<
"ObsAuxControl<OBS>::requiredHdiagnostics done" << std::endl;
158 return aux_->requiredHdiagnostics();
162 template<
typename OBS>
164 Log::trace() <<
"ObsAuxControl<OBS>::operator= starting" << std::endl;
165 util::Timer timer(classname(),
"operator=");
167 Log::trace() <<
"ObsAuxControl<OBS>::operator= done" << std::endl;
173 template<
typename OBS>
175 Log::trace() <<
"ObsAuxControl<OBS>::print starting" << std::endl;
176 util::Timer timer(classname(),
"print");
178 Log::trace() <<
"ObsAuxControl<OBS>::print done" << std::endl;
Auxiliary state related to observations, templated on <OBS>
void read(const Parameters_ &)
Read this ObsAuxControl from file.
void write(const Parameters_ &) const
Write this ObsAuxControl out to file.
OBS::ObsAuxControl ObsAuxControl_
const Variables & requiredVars() const
Return required inputs variables from Model.
ObsAuxControl_ & obsauxcontrol()
Accessor.
ObsAuxControl_::Parameters_ Parameters_
~ObsAuxControl()
Destructor (defined explicitly for timing and tracing)
static const std::string classname()
const ObsAuxControl_ & obsauxcontrol() const
const Accessor
std::unique_ptr< ObsAuxControl_ > aux_
ObsAuxControl(const ObsSpace< OBS > &os, const Parameters_ ¶ms)
Constructor for specified ObsSpace os and params.
double norm() const
Norm (used in tests)
void print(std::ostream &) const
const Variables & requiredHdiagnostics() const
Return required observations diagnostics.
ObsAuxControl & operator=(const ObsAuxControl &rhs)
Assign operator from other ObsAuxControl rhs.
ObsSpace_ & obsspace() const
Interfacing.
The namespace for the main oops code.