Changeset 668 in Sophya for trunk/SophyaLib/SkyT/radspecvector.cc


Ignore:
Timestamp:
Nov 29, 1999, 3:16:10 PM (26 years ago)
Author:
ansari
Message:

Ajout de classes deleguees PPersist et correction integration - Sophie 29/11/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyT/radspecvector.cc

    r610 r668  
    11//--------------------------------------------------------------------------
    22// File and Version Information:
    3 //      $Id: radspecvector.cc,v 1.3 1999-11-21 23:25:46 ansari Exp $
     3//      $Id: radspecvector.cc,v 1.4 1999-11-29 14:16:06 ansari Exp $
    44//
    55// Description:
     
    2626// Constructor --
    2727//----------------
     28RadSpectraVec::RadSpectraVec()
     29{
     30}
     31
    2832RadSpectraVec::RadSpectraVec(Vector const & nu, Vector const & fdenu, double numin, double numax)
    2933        : RadSpectra(numin, numax)
     
    3539  _numin = nu(0);
    3640  _numax = nu(nu.NElts()-1);
     41  _size = nu.NElts();
    3742  if(_vecOfNu.NElts() != _vecOfFDeNu.NElts()) cout << "vectors are not compatible" << exit;
    3843}
     
    7883}
    7984
     85void
     86RadSpectraVec::WriteSelf(POutPersist& s)
     87{
     88  s.PutI4(this->NbElts());
     89  for (int i=0; i< this->NbElts(); i++)
     90    {
     91      s.PutR8(this->getNuVec(i));
     92      s.PutR8(this->getFNuVec(i));
     93    }
     94  s.PutR8(this->minFreq());
     95  s.PutR8(this->maxFreq());
     96 
     97}
     98
     99void
     100RadSpectraVec::ReadSelf(PInPersist& s)
     101{
     102  s.GetI4(_size);
     103
     104  _vecOfNu.ReSize(_size);
     105  _vecOfFDeNu.ReSize(_size);
     106  for (int i=0; i< _size; i++)
     107    {
     108      s.GetR8(_vecOfNu(i));
     109      s.GetR8(_vecOfFDeNu(i));
     110    }
     111  s.GetR8(_numin);
     112  s.GetR8(_numax);
     113  cout << "minFreq - maxFreq"<< endl;
     114  cout <<    _numin<< "-" <<  _numax << endl;
     115}
     116
     117
    80118
    81119void
Note: See TracChangeset for help on using the changeset viewer.