ReFRACtor
FullPhysics::RegisterOutputBase Class Referenceabstract

As described in the Output class, we have a decentralized model of producing output for L2 Full Physics. More...

#include <register_output_base.h>

+ Inheritance diagram for FullPhysics::RegisterOutputBase:
+ Collaboration diagram for FullPhysics::RegisterOutputBase:

Public Member Functions

virtual ~RegisterOutputBase ()
 
virtual std::string desc () const
 Description of object, to be printed to stream. More...
 
virtual void print (std::ostream &Os) const
 Print to stream. More...
 
std::string print_to_string () const
 Print to string. More...
 
virtual void register_output (const boost::shared_ptr< Output > &out) const =0
 Register portions of class that will be written to output. More...
 
virtual void register_output_apriori (const boost::shared_ptr< Output > &out) const
 Register apriori portions of class. More...
 

Detailed Description

As described in the Output class, we have a decentralized model of producing output for L2 Full Physics.

Rather than directly writing a value to a file, we register functions that can supply the values when requested. This has the advantage of keeping everything in sync

  • we don't have values written out from earlier iterations of the algorithm.

There isn't anything particularly special to register a function, just a call to Output::register_data_source. However as a matter of convention we collect all the functions that register data into classes found in the RegisterOutput directory, and derived from this RegisterOutputBase class. This class doesn't really give any special functionality, rather deriving from this class is a statement of intent that derived classes what to register output.

A reasonable implementation would be to have classes that supply output data register there intent themselves, so for example Atmosphere could have register_output function. However this would then couple these classes with our particular output model. You could imagine reusing Atmosphere class in other contexts which do not want to use this particular output model. So again as a matter of convention we use a separate class to register output, in this case AtmosphereOutput. We may decide at some point that these extra classes are unnecessarily complicated design, but for now we'll keep this division.

For many classes, we output different information for apriori state vector value vs. the final state vector value. So the registration is separated as two functions. Alternatively, we could have just had two different registration classes, but this is the way we've chosen.

Note that by convention that we "freeze" the state of the class when we register the apriori_output. This allows for things like the StateVector to be changed after wards without changing the apriori state.

Definition at line 45 of file register_output_base.h.

Constructor & Destructor Documentation

◆ ~RegisterOutputBase()

virtual FullPhysics::RegisterOutputBase::~RegisterOutputBase ( )
inlinevirtual

Definition at line 47 of file register_output_base.h.

Member Function Documentation

◆ desc()

virtual std::string FullPhysics::RegisterOutputBase::desc ( ) const
inlinevirtual

Description of object, to be printed to stream.

This gives a cleaner interface for deriving from python.

Reimplemented in FullPhysics::HighResSpectrumOutput.

Definition at line 83 of file register_output_base.h.

◆ print()

virtual void FullPhysics::RegisterOutputBase::print ( std::ostream &  Os) const
inlinevirtual

Print to stream.

The default calls the function "desc" that returns a string. This gives cleaner interface for deriving from this class in python, but most C++ classes will want to override this function rather than using desc.

Definition at line 76 of file register_output_base.h.

◆ print_to_string()

std::string FullPhysics::Printable< RegisterOutputBase >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.

◆ register_output()

virtual void FullPhysics::RegisterOutputBase::register_output ( const boost::shared_ptr< Output > &  out) const
pure virtual

Register portions of class that will be written to output.

This is for the final statevector, for classes where apriori and final are written out different.

Implemented in FullPhysics::AerosolConsolidatedOutput, FullPhysics::HighResSpectrumOutput, FullPhysics::ConnorSolverOutput, FullPhysics::MaxAPosterioriOutput, FullPhysics::StateVectorOutput, FullPhysics::AerosolAodOutput, FullPhysics::ErrorAnalysisOutput, FullPhysics::GroundBrdfOutput, FullPhysics::AltitudeOutput, FullPhysics::EmpiricalOrthogonalFunctionOutput, FullPhysics::AbsorberVmrFixedLevelOutput, FullPhysics::PressureFixedLevelOutput, FullPhysics::AbsorberAbscoOutput, FullPhysics::AerosolParamOutput, FullPhysics::DispersionPolynomialOutput, FullPhysics::GroundCoxmunkPlusLambertianOutput, FullPhysics::PressureOutput, FullPhysics::SpectralParametersOutput, FullPhysics::AbsorberVmrFixedLevelScaledOutput, FullPhysics::AbsorberVmrLevelOutput, FullPhysics::AbsorberVmrLevelScaledOutput, FullPhysics::AbsorberVmrMetOutput, FullPhysics::StandardForwardModelOutput, FullPhysics::TemperatureFixedLevelOutput, FullPhysics::ConnorConvergenceOutput, FullPhysics::DispersionFitOutput, FullPhysics::GroundCoxmunkOutput, FullPhysics::GroundLambertianOutput, FullPhysics::StokesCoefficientFractionOutput, FullPhysics::TemperatureLevelOffsetOutput, FullPhysics::TemperatureMetOutput, FullPhysics::RadianceScalingOutput, FullPhysics::GasVmrAprioriOutput, FullPhysics::SourceFilesOutput, FullPhysics::FluorescenceEffectOutput, and FullPhysics::MetPassThroughOutput.

◆ register_output_apriori()

virtual void FullPhysics::RegisterOutputBase::register_output_apriori ( const boost::shared_ptr< Output > &  out) const
inlinevirtual

The documentation for this class was generated from the following file:

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:13