ReFRACtor
high_res_spectrum_output.h
Go to the documentation of this file.
1 #ifndef HIGH_RES_SPECTRUM_OUTPUT_H
2 #define HIGH_RES_SPECTRUM_OUTPUT_H
3 #include "register_output_base.h"
4 #include "named_spectrum.h"
5 #include "observer.h"
6 
7 namespace FullPhysics {
8 /****************************************************************/
20  public Observer<boost::shared_ptr<NamedSpectrum> >,
21  public Observer<std::vector<boost::shared_ptr<NamedSpectrum> > > {
22 public:
25 
29  virtual void register_output(const boost::shared_ptr<Output>& out) const {
30  output_files.push_back(out);
31  }
32  virtual void register_output_apriori(const boost::shared_ptr<Output>& out) const { }
33 
34  const blitz::Array<double, 1> saved_spectral_domain(const std::string& spectra_name);
35  const blitz::Array<double, 1> saved_spectral_range(const std::string& spectra_name);
36 
37  virtual void notify_update(const boost::shared_ptr<NamedSpectrum>& Obs);
38  virtual void notify_update(const std::vector<boost::shared_ptr<NamedSpectrum> >& Obs);
39 
40  virtual std::string desc() const { return "HighResSpectrumOutput"; }
41 private:
42  void register_named_spectrum(const boost::shared_ptr<FullPhysics::NamedSpectrum>& named_spec,
43  const std::string& domain_prefix, const std::string& range_prefix);
44 
45  std::map<std::string, std::vector<boost::shared_ptr<Spectrum> > > saved_spectra;
46  mutable std::vector<boost::shared_ptr<Output> > output_files;
47 };
48 }
49 #endif
const blitz::Array< double, 1 > saved_spectral_domain(const std::string &spectra_name)
virtual void register_output(const boost::shared_ptr< Output > &out) const
Saves a pointer to all interested output files The datasets will be actually registered as they are s...
virtual void notify_update(const boost::shared_ptr< NamedSpectrum > &Obs)
On notification this class registers a dataset based on the name in the NamedSpectrum.
This class will recieve observer notifications from any class that pushes out NamedSpectrum and write...
virtual std::string desc() const
Description of object, to be printed to stream.
const blitz::Array< double, 1 > saved_spectral_range(const std::string &spectra_name)
As described in the Output class, we have a decentralized model of producing output for L2 Full Physi...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
Simple Mixin to be and Observer of another object of class T.
Definition: observer.h:29
virtual void register_output_apriori(const boost::shared_ptr< Output > &out) const
Register apriori portions of class.

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