source: Sophya/trunk/SophyaLib/SkyT/specrespvector.h@ 4045

Last change on this file since 4045 was 2479, checked in by ansari, 22 years ago

Ajout SkipToNextObjet() ds PInPersist operator >> - Reza 7 Dec 2003

File size: 2.1 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2//--------------------------------------------------------------------------
3// File and Version Information:
4// $Id: specrespvector.h,v 1.7 2003-12-06 23:59:21 ansari Exp $
5//
6// Description:
7//
8// History (add to end):
9// Sophie Oct, 1999 - creation
10//
11//------------------------------------------------------------------------
12#ifndef SPECRESPVEC_H_SEEN
13#define SPECRESPVEC_H_SEEN
14
15#include "machdefs.h"
16#include <iostream>
17
18#include "specresp.h"
19#include "tvector.h"
20#include "objfio.h"
21
22//------------------------------------
23// Collaborating Class Declarations --
24//------------------------------------
25
26// ---------------------
27// -- Class Interface --
28// ---------------------
29
30// ***IMPORTANT*** All frequencies are expressed in GHz (10^9 Hz)
31
32namespace SOPHYA {
33
34 class SpecRespVec : public SpectralResponse
35 {
36
37public:
38 //Constructor
39 SpecRespVec();
40 SpecRespVec(Vector const & nu, Vector const & fdenu, double numin, double numax);
41 SpecRespVec(Vector const & nu, Vector const & fdenu);
42
43 // destructor
44 virtual ~SpecRespVec();
45
46 //
47 // Member Functions
48 //
49
50 // The transmission() function is virtual:
51 virtual double transmission(double nu) const;
52
53 // Acces to Nu and T(nu) vectors
54 inline Vector& getNuVec() { return _vecOfNu; } ;
55 inline Vector& getTNuVec() { return _vecOfFDeNu; }
56 inline double getNuVec(int i) const { return _vecOfNu(i); }
57 inline double getTNuVec(int i) const { return _vecOfFDeNu(i); }
58 inline int NbElts() const { return _size;}
59
60 virtual void Print(ostream& os) const;
61
62protected:
63 Vector _vecOfNu;
64 Vector _vecOfFDeNu;
65 int _size;
66};
67
68 // ObjFileIO<SpecRespVec> pour les PPersist
69 inline POutPersist& operator << (POutPersist& os, SpecRespVec & obj)
70 { ObjFileIO<SpecRespVec> fio(&obj); fio.Write(os); return(os);}
71
72 inline PInPersist& operator >> (PInPersist& is, SpecRespVec & obj)
73 { ObjFileIO<SpecRespVec> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is);}
74
75} // End of namespace
76#endif
Note: See TracBrowser for help on using the repository browser.