27 #ifndef __GyotoSpectrometer_H_
28 #define __GyotoSpectrometer_H_
51 class FactoryMessenger;
52 namespace Spectrometer {
84 typedef char const *
kind_t;
123 (FactoryMessenger* fmp) {
125 #ifdef GYOTO_USE_XERCES
126 if (fmp) spectro -> setParameters(fmp);
323 virtual void
kind(kind_t) ;
333 virtual void
getMidpoints( double data[], std::string unit);
342 virtual double const *
getWidths() const ;
353 virtual void
getWidths( double data[], std::string unit);
383 #ifdef GYOTO_USE_XERCES
421 virtual void
fillElement(FactoryMessenger *fmp) const ;
virtual Generic * clone() const =0
Clone an instance.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
double * boundaries_
Frequency (in Hz) at the boundaries of the spectral channels.
Definition: GyotoSpectrometer.h:205
virtual size_t const * getChannelIndices() const
Get Generic::chanind_.
virtual double const * getMidpoints() const
Get Generic::midpoints_.
Gyoto::Spectrometer::Subcontractor_t * getSubcontractor(std::string name, int errmode=0)
Query the Spectrometer register.
size_t * chanind_
Indices in boundaries_.
Definition: GyotoSpectrometer.h:212
Tellers tell Listeners when they mutate.
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
Reference-counting pointers.
void Register(std::string name, Gyoto::Spectrometer::Subcontractor_t *scp)
Register a new Spectrometer kind.
#define size_t
If not defined in .
Definition: GyotoConfig.h:305
virtual void fillElement(FactoryMessenger *fmp) const
Write out parameters to XML entities.
char const * kind_t
Type for Spectrometer kind.
Definition: GyotoSpectrometer.h:70
kind_t kind_
Spectrometer kind name.
Definition: GyotoSpectrometer.h:185
virtual double const * getWidths() const
Get Generic::widths_.
Gyoto ubiquitous macros and typedefs.
size_t nboundaries_
Size of the boundaries_ array.
Definition: GyotoSpectrometer.h:188
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42
virtual size_t getNBoundaries() const
Get Generic::nboundaries_.
SmartPointer< Spectrometer::Generic > Subcontractor(FactoryMessenger *fmp)
A template for Subcontractor_t functions.
Definition: GyotoSpectrometer.h:123
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:79
virtual void setParameters(Gyoto::FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
double * widths_
Width of each channel.
Definition: GyotoSpectrometer.h:226
void initRegister()
Initialize the Spectrometer register This must be called once. It initializes Register_ and registers...
Gyoto::Register::Entry * Register_
The Spectrometer register.
SmartPointer< Gyoto::Spectrometer::Generic > Subcontractor_t(Gyoto::FactoryMessenger *)
A function to build instances of a specific Astrobj::Generic sub-class.
Definition: GyotoSpectrometer.h:95
virtual double const * getChannelBoundaries() const
Get Generic::boundaries_.
double * midpoints_
Effective frequency (in Hz) of each spectral channel.
Definition: GyotoSpectrometer.h:219
virtual size_t nSamples() const
Get Generic::nsamples_.
virtual kind_t kind() const
Get kind_.
Listen to me and I'll warn you when I change.
Definition: GyotoHooks.h:82
Base class for spectrometers.
Definition: GyotoSpectrometer.h:171
size_t nsamples_
Number of spectral elements.
Definition: GyotoSpectrometer.h:187
Entry in a register (or a full register)
Definition: GyotoRegister.h:92