Gyoto
GyotoSpectrometer.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011 Thibaut Paumard
10 
11  This file is part of Gyoto.
12 
13  Gyoto is free software: you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  Gyoto is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 #ifndef __GyotoSpectrometer_H_
28 #define __GyotoSpectrometer_H_
29 
30 #include <GyotoDefs.h>
31 #include <GyotoSmartPointer.h>
32 #include <GyotoRegister.h>
33 #include <string>
34 
35 namespace Gyoto{
36  class Spectrometer;
37 }
38 
40  friend class Gyoto::SmartPointer<Gyoto::Spectrometer>;
41  protected:
43  size_t nsamples_;
44  double band_[2];
45  double* boundaries_;
46  double* midpoints_;
47  double* widths_;
48 
49  void reset_();
50 
51  public:
52  Spectrometer() ;
53  Spectrometer(size_t nsamples, double band_min, double band_max,
54  SpectroKind_t kind);
55  Spectrometer(const Spectrometer& ) ;
56  Spectrometer * clone() const;
57  virtual ~Spectrometer() ;
58 
59  void setKind(SpectroKind_t);
60  void setKind(std::string);
61  void setNSamples(size_t n);
62  void setBand(double nu[2]);
63 
64  SpectroKind_t getKind() const ;
65  std::string getKindStr() const;
66  size_t getNSamples() const ;
67  double const * getBand() const ;
68 
69  double const * getMidpoints() const ;
70  double const * getChannels() const ;
71  double const * getWidths() const ;
72 
73 #ifdef GYOTO_USE_XERCES
74  public:
75  void fillElement(FactoryMessenger *fmp);
76 #endif
77 
78 };
79 
80 
81 #ifdef GYOTO_USE_XERCES
82 namespace Gyoto {
83  SmartPointer<Spectrometer> SpectrometerSubcontractor(FactoryMessenger* fmp);
84 }
85 #endif
86 
87 
88 #endif