Changeset 701 in Sophya for trunk/SophyaLib/Samba


Ignore:
Timestamp:
Jan 4, 2000, 3:27:29 PM (26 years ago)
Author:
ansari
Message:

mise a jour de persistances par objets delegues

Location:
trunk/SophyaLib/Samba
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/localmap.cc

    r682 r701  
    636636  int_4 nSzX;
    637637  is.GetI4(nSzX);
    638   dobj->setSize_x(nSzX);
     638  //  dobj->setSize_x(nSzX);
    639639
    640640  int_4 nSzY;
    641641  is.GetI4(nSzY);
    642   dobj->setSize_y(nSzY);
     642  //  dobj->setSize_y(nSzY);
    643643
    644644  int_4 nPix;
    645645  is.GetI4(nPix);
    646   dobj->setNbPixels(nPix);
    647 
     646  //  dobj->setNbPixels(nPix);
     647  dobj->ReSize(nSzX, nSzY);
    648648  string ss("local mapping is done");
    649649  string sso;
     
    668668
    669669// On lit le DataBlock;
    670   is >> dobj->DataBlock();
     670  FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     671  fio_nd.Read(is);
    671672}
    672673
     
    729730
    730731// On ecrit le dataBlock
    731   os << dobj->DataBlock();
     732  FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     733  fio_nd.Write(os);
    732734}
    733735
  • trunk/SophyaLib/Samba/localmap.h

    r682 r701  
    8080/* return/set the number of pixels */
    8181/*!    Return number of pixels */
    82 virtual int_4 NbPixels() const;
    83 inline void setNbPixels(int_4 n) {nPix_= n;}
     82virtual int NbPixels() const;
    8483 
    8584/* return the value of pixel number k */
     
    143142inline int_4 Size_x() const {return nSzX_;}
    144143inline int_4 XSize() const {return nSzX_;}
    145 inline void setSize_x(int_4 n) {nSzX_= n;}
    146144inline int_4 Size_y() const {return nSzY_;}
    147145inline int_4 YSize() const {return nSzY_;}
    148 inline void setSize_y(int_4 n) {nSzY_= n;}
    149146
    150147inline void Origin(double& theta,double& phi,int_4& x0,int_4& y0,double& angle) const {theta= theta0_; phi= phi0_; x0= x0_; y0= y0_;angle= angle_;}
     
    152149inline void Aperture(double& anglex,double& angley) const {anglex= angleX_; angley= angleY_;}
    153150
    154 /* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */
    155 inline const NDataBlock<T>* getDataBlock() const {return (&pixels_);}
    156 inline void setDataBlock(T* data, int_4 n) {pixels_.FillFrom(n,data);}
    157151
    158152/*  Acces to the DataBlock  */
  • trunk/SophyaLib/Samba/sambainit.cc

    r518 r701  
    1919//   Enregistrement des classes PPersist du modules Outils++
    2020 
    21   PPRegister(SphereCoordSys);
     21  PPRegister(FIO_SphereCoordSys);
    2222
    2323  PPRegister(FIO_SphereThetaPhi<float>);
  • trunk/SophyaLib/Samba/scan.cc

    r682 r701  
    9292
    9393//++
    94 Scan::Scan(const Scan& s)
     94Scan::Scan(const Scan& s,  bool share) :  sPix_(s.sPix_ , share)
    9595
    9696//    copy  constructor
     
    106106  TempsInitial_ = s.TempsInitial_;
    107107  PhiZero_      = s.PhiZero_;
    108   sPix_=s.sPix_;
    109108  for (int k=0; k<9; k++) Rota_[k]=s. Rota_[k];
    110109}
     
    257256void Scan::InitNull() {
    258257  //  sPix_=NULL;
    259   sPix_.Reset();
     258  //  sPix_.Reset(); pas de reset (pour le cas de share)
    260259  mInfo_=NULL;
    261260}         
     
    389388  dobj->SetFloatParams(Ouverture,OmegaTeta,OmegaPhi,OmegaRad,
    390389                       FrequenceEch,TempsFinal,TempsInitial,PhiZero,Rota);
    391   r_8* sPix=new r_8[NmaxPts];
    392   PIOSReadArray(is, sPix, NmaxPts);
    393   dobj->setDataBlock(sPix, NmaxPts);
    394   delete [] sPix;
     390// On lit le DataBlock;
     391  FIO_NDataBlock<r_8> fio_nd(&dobj->DataBlock());
     392  fio_nd.Read(is);
    395393}
    396394//++
     
    438436  os.PutR8s(Rota, 9);
    439437
    440   PIOSWriteArray(os,(dobj->getDataBlock())->Data(), dobj->NbPoints());
    441 
    442 }
     438// On ecrit le dataBlock
     439  FIO_NDataBlock<r_8> fio_nd(&dobj->DataBlock());
     440  fio_nd.Write(os);
     441
     442}
  • trunk/SophyaLib/Samba/scan.h

    r565 r701  
    88#include "dvlist.h"
    99#include "ndatablock.h"
     10
     11class FIO_Scan;
     12
    1013//!   Storage and treatment of data for a scanning of a part of the sky with a set of given values for parameters (see constructor)
    1114
    1215class Scan :  public AnyDataObj  {
    13   //  friend FIO_Scan;
     16    friend class FIO_Scan;
    1417  public  :
    1518    /*
     
    3841    */
    3942Scan(float,float*,float,float,float,float);
    40 Scan(const Scan& );
     43Scan(const Scan&,  bool share=false );
    4144Scan() {
    4245  InitNull();
     
    9497
    9598
     99
     100
     101  private :
     102   
     103    //void          Clear();
     104void          InitNull();
     105
     106/*  Acces to the DataBlock  */
     107inline       NDataBlock<r_8>& DataBlock()       {return sPix_;}
     108inline const NDataBlock<r_8>& DataBlock() const {return sPix_;}
     109
    96110inline  void  SetIntParams(int_4 NmaxPts, int_4 NmaxTrs, int_4 NPts1Tr)
    97111  {
     
    129143     for (int k=0; k<9;k++) Rota[k]=Rota_[k];
    130144   }
    131 
    132 /* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */
    133 inline const NDataBlock<r_8>* getDataBlock() const {return (&sPix_);}
    134 inline void setDataBlock(r_8* data, int n) {sPix_.FillFrom(n,data);}
    135 
    136   private :
    137    
    138     //void          Clear();
    139 void          InitNull();
    140145
    141146
  • trunk/SophyaLib/Samba/spheregorski.cc

    r697 r701  
    219219//--
    220220{
    221   cout << " constructeur de recopie " << endl;
    222221  if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);
    223222
     
    11161115{
    11171116  dobj= new SphereGorski<T>;
    1118   dobj->DataBlock().SetTemp(true);
     1117  dobj->pixels_.SetTemp(true);
    11191118  ownobj= true;
    11201119  Read(filename);
     
    11251124{
    11261125  dobj= new SphereGorski<T>(obj, true);
    1127   dobj->DataBlock().SetTemp(true);
     1126  dobj->pixels_.SetTemp(true);
    11281127  ownobj= true;
    11291128}
     
    11551154    {
    11561155      dobj= new SphereGorski<T>;
    1157       dobj->DataBlock().SetTemp(true);
     1156      dobj->pixels_.SetTemp(true);
    11581157      ownobj= true;     
    11591158    }
    11601159
    11611160// Let's Read the SphereCoordSys object  -- ATTENTIOn - $CHECK$
    1162   SphereCoordSys* cs = dynamic_cast<SphereCoordSys*>(is.ReadObject());
    1163   dobj->SetCoordSys(cs);
    1164 
     1161  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
     1162  fio_scs.Read(is);
    11651163  // Pour savoir s'il y avait un DVList Info associe
    11661164  char strg[256];
     
    11751173  int_4 nSide;
    11761174  is.GetI4(nSide);
    1177   dobj->setSizeIndex(nSide);
    1178 
    11791175  int_4 nPix;
    11801176  is.GetI4(nPix);
    1181   dobj->setNbPixels(nPix);
    1182 
    11831177  double Omega;
    11841178  is.GetR8(Omega);
    1185   dobj->setPixSolAngle(Omega);
     1179  dobj->setParameters(nSide,nPix, Omega);
    11861180
    11871181// On lit le DataBlock;
    1188   is >> dobj->DataBlock();
     1182  FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
     1183  fio_nd.Read(is);
    11891184}
    11901185
     
    11921187void FIO_SphereGorski<T>::WriteSelf(POutPersist& os) const
    11931188{
    1194 
    11951189  if(dobj == NULL)
    11961190    {
     
    12001194
    12011195// Let's write the SphereCoordSys object
    1202   dobj->GetCoordSys()->Write(os);
     1196  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
     1197  fio_scs.Write(os);
    12031198
    12041199  char strg[256];
     
    12201215  os.PutI4(nSide);
    12211216  os.PutI4(nPix);
    1222   os.PutR8(dobj->PixSolAngle(0));
     1217  os.PutR8(dobj->PixSolAngle());
    12231218// On ecrit le dataBlock
    1224   os << dobj->DataBlock();
     1219  FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
     1220  fio_nd.Write(os);
    12251221}
    12261222
  • trunk/SophyaLib/Samba/spheregorski.h

    r698 r701  
    5151
    5252template<class T>
     53class FIO_SphereGorski;
     54
     55template<class T>
    5356class SphereGorski : public SphericalMap<T>
    5457{
     58
     59  friend class FIO_SphereGorski<T>;
    5560
    5661public :
     
    7479/*!    Return number of  pixels of the  splitting */
    7580virtual int_4 NbPixels() const;
    76 inline void setNbPixels(int_4 n) {nPix_= n;}
    7781
    7882/* Valeur du contenu du pixel d'indice "RING" k  */
     
    115119   fulfil this requirement.
    116120*/
    117 virtual double PixSolAngle(int_4 dummy) const;
    118 inline void setPixSolAngle(double x) {omeg_= x;}
     121virtual double PixSolAngle(int_4 dummy=0) const;
    119122
    120123// --------------- Specific methods
     
    160163
    161164
    162 /* retourne/fixe la valeur du parametre Gorski */
     165/* retourne la valeur du parametre Gorski */
    163166inline virtual int_4 SizeIndex() const {return(nSide_);}
    164 inline void setSizeIndex(int_4 n) {nSide_= n;}
    165167
    166168/* retourne les pointeurs /remplit les tableaux */
    167 inline const NDataBlock<T>* getDataBlock() const { return (&pixels_); }
    168 inline void setDataBlock(T* data,int_4 m) { pixels_.FillFrom(m,data); }
    169 
    170 /*  Acces to the DataBlock  */
    171 inline       NDataBlock<T>& DataBlock()       {return pixels_;}
    172 inline const NDataBlock<T>& DataBlock() const {return pixels_;}
     169
    173170
    174171
     
    189186void pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) const;
    190187void pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) const;
     188inline void setParameters(int_4 nside, int_4 nbpixels, double solangle)
     189  {
     190    nSide_= nside;
     191    nPix_= nbpixels;
     192    omeg_= solangle;
     193  }
    191194
    192195// ------------- variables internes -----------------------
  • trunk/SophyaLib/Samba/spherepos.cc

    r682 r701  
     1// 04/01/00 : implantation de la persistance par classe deleguee - Guy Le Meur
     2
    13#include "spherepos.h"
    24
    3 static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.cc,v 1.3 1999-12-10 16:55:59 ansari Exp $";
     5static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.cc,v 1.4 2000-01-04 14:27:15 ansari Exp $";
    46
    57
     
    911  id_ = SphereCoordSys_NEUTRAL;
    1012  description_ = "NEUTRAL SphereCoordSystem";
     13}
     14SphereCoordSys::SphereCoordSys(const SphereCoordSys& a )
     15{
     16  id_ = a.id_;
     17  description_ = a.description_;
    1118}
    1219
     
    1926{
    2027}
    21 
    22 // Temporary implementation of PPersist::
    23 // To be changed later ($CHECK$  Reza 26/10/99)
    24 void SphereCoordSys::ReadSelf(PInPersist& is)
     28SphereCoordSys& SphereCoordSys::operator = (const SphereCoordSys& a)
    2529{
    26 uint_8 itab[3];
    27 is.Get(itab, 3);
    28 id_ = itab[1];
    29 is.GetStr(description_);
     30  id_ = a.id_;
     31  description_ = a.description_;
     32  return *this;
    3033}
    3134
    32 void SphereCoordSys::WriteSelf(POutPersist& os) const
     35
     36////////////////////////////////////////////////////////////////
     37// -------------------------------------------------------------------------
     38//   Les objets delegues pour la gestion de persistance
     39// -------------------------------------------------------------------------
     40
     41FIO_SphereCoordSys::FIO_SphereCoordSys()
     42  {
     43    dobj=new SphereCoordSys;
     44    ownobj=true;
     45  }
     46FIO_SphereCoordSys::FIO_SphereCoordSys(string const & filename)
     47  {
     48    dobj=new SphereCoordSys;
     49    ownobj=true;
     50    Read(filename);
     51  }
     52FIO_SphereCoordSys::FIO_SphereCoordSys(const SphereCoordSys & obj)
     53  {
     54    dobj = new SphereCoordSys(obj);
     55    ownobj=true;
     56  }
     57FIO_SphereCoordSys::FIO_SphereCoordSys(SphereCoordSys * obj)
     58  {
     59    dobj = obj;
     60    ownobj=false;
     61  }
     62FIO_SphereCoordSys::~FIO_SphereCoordSys()
     63  {
     64    if (ownobj && dobj) delete dobj;
     65  }
     66AnyDataObj* FIO_SphereCoordSys::DataObj()
     67  {
     68    return(dobj);
     69  }
     70
     71
     72void  FIO_SphereCoordSys::ReadSelf(PInPersist& is)
     73  {
     74uint_8 itab[3];
     75 string description;
     76is.Get(itab, 3);
     77is.GetStr(description);
     78if (dobj == NULL) dobj = new SphereCoordSys(itab[1], description);
     79 else *dobj= SphereCoordSys(itab[1], description);
     80  }           
     81void       FIO_SphereCoordSys::WriteSelf(POutPersist& os) const
    3382{
     83if (dobj == NULL)   return;  // Attention - $CHECK$ Guy 04/01/00
    3484//  On ecrit 3 uint_8
    3585//  0 : Numero de version,  1 : Id,  2  reserve a l
    3686uint_8 itab[3];
    3787itab[0] = 1;
    38 itab[1] = id_;
     88itab[1] = dobj->Id();
    3989itab[2] = 0;
    4090os.Put(itab, 3);
    41 os.PutStr(description_);
    42 }
     91os.PutStr(dobj->description());
     92}
     93
     94
    4395
    4496//................. SpherePosition class .................
  • trunk/SophyaLib/Samba/spherepos.h

    r552 r701  
    77#include <string>
    88#include "unitvector.h"
     9#include "anydataobj.h"
    910
    10 static char *head_spherepos_h_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.h,v 1.3 1999-11-05 13:10:10 ansari Exp $";
     11static char *head_spherepos_h_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.h,v 1.4 2000-01-04 14:27:11 ansari Exp $";
    1112
    1213namespace SOPHYA {
     
    1718};
    1819
    19 // We make this class a PPersist class, in order
    20 // to be able to implement easily the persistence
    21 // for pixelmaps
    22 // To be changed later ($CHECK$  Reza 26/10/99)
    2320 
    24 class SphereCoordSys : public PPersist {
     21class SphereCoordSys : public  AnyDataObj {
    2522public:
    2623 
    27                  SphereCoordSys();
     24  SphereCoordSys();
     25  SphereCoordSys(const SphereCoordSys& a);
    2826                 SphereCoordSys(int id, const string& description);
    2927  virtual        ~SphereCoordSys();
     
    3129  virtual int    Id() const {return id_; }
    3230  virtual string description() const {return description_; }
     31  SphereCoordSys& operator = (const SphereCoordSys& a);
    3332
    34     // METHODS FOR PERSISTENCE TO FOLLOW:
    35 protected:
    36   virtual void       ReadSelf(PInPersist&);
    37   virtual void       WriteSelf(POutPersist&) const;
    3833
    3934private:
    4035  int id_;
    4136  string description_;
     37};
     38
     39// Classe pour la gestion de persistance
     40
     41class FIO_SphereCoordSys : public  PPersist  {
     42public:
     43  FIO_SphereCoordSys();
     44  FIO_SphereCoordSys(string const & filename);
     45  FIO_SphereCoordSys(const SphereCoordSys & obj);
     46  FIO_SphereCoordSys(SphereCoordSys * obj);
     47  virtual ~FIO_SphereCoordSys();
     48  virtual AnyDataObj* DataObj();
     49  inline operator SphereCoordSys() { return(*dobj); }
     50protected :
     51  virtual void       ReadSelf(PInPersist&);
     52  virtual void       WriteSelf(POutPersist&) const; 
     53  SphereCoordSys * dobj;
     54  bool ownobj;
    4255};
    4356
  • trunk/SophyaLib/Samba/spherethetaphi.cc

    r699 r701  
    322322//--
    323323{
    324   int nbslices;
    325   nbslices= 2*NTheta_;
    326   return(nbslices);
     324  return( 2*NTheta_);
    327325}
    328326
     
    566564{
    567565
    568   if(index < 0 || index > NbThetaSlices())
     566  if(index < 0 || index >= NbThetaSlices())
    569567    {
    570568      // THROW(out_of_range("SphereThetaPhi::PIxVal Pixel index out of range"));
    571       cout << " SphereThetaPhi::GetThetaSlice : exceptions  a mettre en place" <<endl;
     569      cout << " SphereThetaPhi::GetThetaSlice : Pixel index out of range" <<endl;
    572570      THROW(rangeCheckErr);
    573571    }
    574572
    575573  int iring= Index(index,0);
    576   int bid  = this->NPhi(index);
    577   int lring  = bid;
     574  int lring  = NPhi(index);
    578575
    579576  phi.ReSize(lring);
     
    617614}
    618615
    619 template <class T>
    620 void SphereThetaPhi<T>::setDataBlock(T* data, int_4 m)
    621   // remplit  le vecteur des contenus des pixels
    622 {
    623   pixels_.FillFrom(m,data);
    624 }
    625616
    626617template <class T>
     
    684675{
    685676  dobj= new SphereThetaPhi<T>;
    686   dobj->DataBlock().SetTemp(true);
     677  //  dobj->DataBlock().SetTemp(true);
     678  dobj->pixels_.SetTemp(true);
    687679  ownobj= true;
    688680  Read(filename);
     
    693685{
    694686  dobj= new SphereThetaPhi<T>(obj, true);
    695   dobj->DataBlock().SetTemp(true);
     687  //  dobj->DataBlock().SetTemp(true);
     688  dobj->pixels_.SetTemp(true);
    696689  ownobj= true;
    697690}
     
    723716    {
    724717      dobj= new SphereThetaPhi<T>;
    725       dobj->DataBlock().SetTemp(true);
     718      //      dobj->DataBlock().SetTemp(true);
     719      dobj->pixels_.SetTemp(true);
    726720      ownobj= true;     
    727721    }
    728722
    729723// Let's Read the SphereCoordSys object  -- ATTENTIOn - $CHECK$
    730   SphereCoordSys* cs = dynamic_cast<SphereCoordSys*>(is.ReadObject());
    731   dobj->SetCoordSys(cs);
     724  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
     725  fio_scs.Read(is);
    732726
    733727  // Pour savoir s'il y avait un DVList Info associe
     
    743737  int_4 mNTheta;
    744738  is.GetI4(mNTheta); 
    745   dobj->setSizeIndex(mNTheta);
    746 
    747739  int_4 mNPix;
    748740  is.GetI4(mNPix);
    749   dobj->setNbPixels(mNPix);
    750 
    751741  double mOmeg;
    752742  is.GetR8(mOmeg);
    753   dobj->setPixSolAngle(mOmeg);
     743  dobj->setParameters(mNPix, mOmeg, mNTheta);
    754744
    755745  int_4* mNphi= new int_4[mNTheta];
     
    769759
    770760// On lit le DataBlock;
    771   is >> dobj->DataBlock();
     761  //FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     762FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
     763fio_nd.Read(is);
     764//  is >> dobj->DataBlock();
    772765}
    773766
     
    783776
    784777// Let's write the SphereCoordSys object
    785   dobj->GetCoordSys()->Write(os);
     778  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
     779  fio_scs.Write(os);
    786780 
    787781  char strg[256];
     
    803797  os.PutI4(mNTheta); 
    804798  os.PutI4(mNPix);
    805   os.PutR8(dobj->PixSolAngle(0));
     799  os.PutR8(dobj->PixSolAngle());
    806800  os.PutI4s(dobj->getmNPhi() , mNTheta);
    807801  os.PutI4s(dobj->getmTNphi(), mNTheta+1);
    808802  os.PutR8s(dobj->getmTheta(), mNTheta+1);
    809803// On ecrit le datablock
    810   os << dobj->DataBlock();
     804  //FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     805FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
     806fio_nd.Write(os);
     807//  os << dobj->DataBlock();
    811808}
    812809
  • trunk/SophyaLib/Samba/spherethetaphi.h

    r682 r701  
    88#include "anydataobj.h"
    99#include "ppersist.h"
     10
     11template <class T>
     12class FIO_SphereThetaPhi; 
     13
    1014
    1115// ***************** Class SphereThetaPhi *****************************
     
    2428{
    2529
     30  friend class FIO_SphereThetaPhi<T>;
     31
    2632public :
    2733
     
    3743// ------------ Definition of PixelMap abstract methods -
    3844
    39 /* retourne/fixe le nombre de pixels */
     45/* retourne le nombre de pixels */
    4046/*!    Return total number of pixels  */
    4147virtual int_4 NbPixels() const;
    42 inline void setNbPixels(int_4 nbpix) { NPix_= nbpix; }
    4348
    4449/* retourne la valeur du pixel d'indice k */
     
    6772    fulfil this requirement.
    6873*/
    69 virtual double PixSolAngle(int_4 dummy) const;
    70 inline void setPixSolAngle(double omega) { Omega_= omega; }
     74virtual double PixSolAngle(int_4 dummy=0) const;
    7175 
    7276/* retourne/fixe la valeur du parametre de decoupage m */
    7377inline virtual int_4 SizeIndex() const { return( NTheta_); }
    74 inline void setSizeIndex(int_4 nbindex) { NTheta_= nbindex; }
    7578
    7679// ------------- Specific methods  ----------------------
     
    133136void GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const;
    134137
    135 /*retourne le tableau contenant le nombre de pixels en phi de chacune des bandes en theta */
    136 inline const int_4* getmNPhi() const { return(NPhi_); }
    137 void setmNPhi(int_4* array, int_4 m);
    138 
    139 /* retourne/remplit le tableau contenant le nombre/Deuxpi total des pixels contenus dans les bandes */
    140 inline const int_4* getmTNphi() const { return(TNphi_); }
    141 void setmTNphi(int_4* array, int_4 m);
    142 
    143 /* retourne/remplit le tableau contenant les valeurs limites de theta */
    144 inline const double* getmTheta() const { return(Theta_); }
    145 void setmTheta(double* array, int_4 m);
    146 
    147 /* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */
    148 inline const NDataBlock<T>* getDataBlock() const { return (&pixels_); }
    149 void setDataBlock(T* data, int_4 m);
    150 
    151 /*  Acces to the DataBlock  */
    152 inline       NDataBlock<T>& DataBlock()       {return pixels_;}
    153 inline const NDataBlock<T>& DataBlock() const {return pixels_;}
     138
     139
    154140
    155141/* impression */
     
    161147void InitNul();
    162148void Clear();
     149inline void setParameters(int nbpix, double omega, int nbThetaIndex)
     150  {
     151    NPix_= nbpix;
     152    Omega_= omega;
     153    NTheta_= nbThetaIndex;
     154  }
     155void setmNPhi(int* array, int m);
     156void setmTNphi(int* array, int m);
     157void setmTheta(double* array, int m);
     158 /*retourne l'adresse du tableau contenant le nombre de pixels en phi de chacune des bandes en theta */
     159inline const int* getmNPhi() const { return(NPhi_); }
     160
     161/* retourne le tableau contenant le nombre/Deuxpi total des pixels contenus dans les bandes */
     162inline const int* getmTNphi() const { return(TNphi_); }
     163
     164/* retourne le tableau contenant les valeurs limites de theta */
     165inline const double* getmTheta() const { return(Theta_); }
     166
     167/*  Acces to the DataBlock  */
     168//inline       NDataBlock<T>& DataBlock()       {return pixels_;}
     169//inline const NDataBlock<T>& DataBlock() const {return pixels_;}
    163170
    164171// ------------- variables internes ---------------------
    165 int_4 NTheta_;
    166 int_4 NPix_;
    167 double Omega_;
    168 int_4* NPhi_;
     172 int_4 NTheta_;   // nombre de tranches en theta, pour une demi-sphere
     173 int_4 NPix_;     // nombre total de pixels
     174 double Omega_; // angle solide constant pour chaque pixel
     175 int_4* NPhi_;    // tableau donnant, pour chaque bande en theta, le nombre de
     176                // pixels selon phi
    169177int_4* TNphi_;
    170178double* Theta_;
     
    185193virtual AnyDataObj* DataObj();
    186194inline operator SphereThetaPhi<T>() { return(*dobj); }
    187 //inline SphereThetaPhi<T> getObj() { return(*dobj); }
    188195
    189196protected :
Note: See TracChangeset for help on using the changeset viewer.