27 #ifndef __GyotoSpectrometer_H_
28 #define __GyotoSpectrometer_H_
50 namespace Spectrometer {
82 typedef char const *
kind_t;
84 #if defined GYOTO_USE_XERCES
124 if (fmp) spectro -> setParameters(fmp);
331 virtual void
getMidpoints( double data[], std::string unit);
340 virtual double const *
getWidths() const ;
351 virtual void
getWidths( double data[], std::string unit);
381 #ifdef GYOTO_USE_XERCES
419 virtual void
fillElement(FactoryMessenger *fmp) const ;
virtual Generic * clone() const =0
Clone an instance.
double * boundaries_
Frequency (in Hz) at the boundaries of the spectral channels.
Definition: GyotoSpectrometer.h:203
virtual size_t const * getChannelIndices() const
Get Generic::chanind_.
virtual double const * getMidpoints() const
Get Generic::midpoints_.
size_t * chanind_
Indices in boundaries_.
Definition: GyotoSpectrometer.h:210
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 <sys/types.h>.
Definition: GyotoConfig.h:293
virtual void fillElement(FactoryMessenger *fmp) const
Write out parameters to XML entities.
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:91
char const * kind_t
Type for Spectrometer kind.
Definition: GyotoSpectrometer.h:68
virtual size_t getNSamples() const
Get Generic::nsamples_.
kind_t kind_
Spectrometer kind name.
Definition: GyotoSpectrometer.h:183
virtual double const * getWidths() const
Get Generic::widths_.
Gyoto ubiquitous macros and typedefs.
size_t nboundaries_
Size of the boundaries_ array.
Definition: GyotoSpectrometer.h:186
Gyoto::Spectrometer::Subcontractor_t * getSubcontractor(std::string name, int errmode=1)
Query the Spectrometer register.
virtual kind_t getKind() const
Get kind_.
virtual void setKind(kind_t)
Set Generic::kind_.
virtual size_t getNBoundaries() const
Get Generic::nboundaries_.
SmartPointer< Spectrometer::Generic > Subcontractor(FactoryMessenger *fmp)
A template for Subcontractor_t functions.
Definition: GyotoSpectrometer.h:122
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
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:224
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:94
virtual double const * getChannelBoundaries() const
Get Generic::boundaries_.
double * midpoints_
Effective frequency (in Hz) of each spectral channel.
Definition: GyotoSpectrometer.h:217
Listen to me and I'll warn you when I change.
Definition: GyotoHooks.h:82
Base class for spectrometers.
Definition: GyotoSpectrometer.h:169
size_t nsamples_
Number of spectral elements.
Definition: GyotoSpectrometer.h:185
Entry in a register (or a full register)
Definition: GyotoRegister.h:95