Ignore:
Timestamp:
Dec 10, 1999, 5:56:03 PM (26 years ago)
Author:
ansari
Message:

Compilation Mac pour CodeWarrior PRO 5

File:
1 edited

Legend:

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

    r604 r682  
    5050//++
    5151template <class T>
    52 SphereThetaPhi<T>::SphereThetaPhi(int m)
     52SphereThetaPhi<T>::SphereThetaPhi(int_4 m)
    5353
    5454//    m is the number of slices in theta on an hemisphere (the polar cap
     
    6868  NTheta_= s.NTheta_;
    6969  NPix_  = s.NPix_;
    70   NPhi_  = new int[NTheta_];
     70  NPhi_  = new int_4[NTheta_];
    7171  Theta_ = new double[NTheta_+1];
    72   TNphi_ = new int[NTheta_+1];
     72  TNphi_ = new int_4[NTheta_+1];
    7373  for(int k = 0; k < NTheta_; k++)
    7474    {
     
    123123//++
    124124template <class T>
    125 void SphereThetaPhi<T>::Resize(int m)
     125void SphereThetaPhi<T>::Resize(int_4 m)
    126126//   re-pixelize the sphere
    127127//--
     
    134134//++
    135135template <class T>
    136 int SphereThetaPhi<T>::NbPixels() const
     136int_4 SphereThetaPhi<T>::NbPixels() const
    137137
    138138//    Return total number of pixels
     
    145145//++
    146146template <class T>
    147 T& SphereThetaPhi<T>::PixVal(int k)
     147T& SphereThetaPhi<T>::PixVal(int_4 k)
    148148
    149149//    Return value of pixel with index k
     
    161161//++
    162162template <class T>
    163 T const& SphereThetaPhi<T>::PixVal(int k) const
     163T const& SphereThetaPhi<T>::PixVal(int_4 k) const
    164164
    165165//    Return value of pixel with index k
     
    178178//++
    179179template <class T>
    180 bool SphereThetaPhi<T>::ContainsSph(double theta, double phi) const
     180bool SphereThetaPhi<T>::ContainsSph(double /*theta*/, double /*phi*/) const
    181181//--
    182182{
     
    187187//++
    188188template <class T>
    189 int SphereThetaPhi<T>::PixIndexSph(double theta, double phi) const
     189int_4 SphereThetaPhi<T>::PixIndexSph(double theta, double phi) const
    190190
    191191//    Return index of the pixel corresponding to
     
    208208  dphi= DeuxPi/(double)NPhi_[i-1];
    209209 
    210   if (fgzn)  k= NPix_-TNphi_[i]+(int)(phi/dphi);
    211   else k= TNphi_[i-1]+(int)(phi/dphi);
     210  if (fgzn)  k= NPix_-TNphi_[i]+(int_4)(phi/dphi);
     211  else k= TNphi_[i-1]+(int_4)(phi/dphi);
    212212  return(k);
    213213}
     
    216216//++
    217217template <class T>
    218 void SphereThetaPhi<T>::PixThetaPhi(int k,double& theta,double& phi) const
     218void SphereThetaPhi<T>::PixThetaPhi(int_4 k,double& theta,double& phi) const
    219219
    220220//   Return (theta,phi) coordinates of middle of  pixel with  index k
     
    250250//++
    251251template <class T>
    252 double SphereThetaPhi<T>::PixSolAngle(int dummy) const
     252double SphereThetaPhi<T>::PixSolAngle(int_4 /*dummy*/) const
    253253
    254254//    Pixel Solid angle  (steradians)
     
    264264//++
    265265template <class T>
    266 void SphereThetaPhi<T>::Limits(int k,double& tetMin,double& tetMax,double& phiMin,double& phiMax)
     266void SphereThetaPhi<T>::Limits(int_4 k,double& tetMin,double& tetMax,double& phiMin,double& phiMax)
    267267
    268268//   Return values of theta,phi which limit the pixel with  index k
     
    317317//++
    318318template <class T>
    319 int SphereThetaPhi<T>::NbThetaSlices() const
     319int_4 SphereThetaPhi<T>::NbThetaSlices() const
    320320
    321321//    Return number of theta-slices on the sphere
     
    330330//++
    331331template <class T>
    332 int SphereThetaPhi<T>::NPhi(int kt) const
     332int_4 SphereThetaPhi<T>::NPhi(int_4 kt) const
    333333
    334334//    Return number of pixels in phi-direction of the kt-th slice
     
    353353//++
    354354template <class T>
    355 void SphereThetaPhi<T>::Theta(int kt,double& tetMin,double& tetMax)
     355void SphereThetaPhi<T>::Theta(int_4 kt,double& tetMin,double& tetMax)
    356356
    357357//    Return  theta values which limit the slice kt
     
    385385//++
    386386template <class T>
    387 void SphereThetaPhi<T>::Phi(int kt,int jp,double& phiMin,double& phiMax)
     387void SphereThetaPhi<T>::Phi(int_4 kt,int_4 jp,double& phiMin,double& phiMax)
    388388
    389389//   Return values of phi which limit the jp-th pixel of the kt-th slice
     
    416416//++
    417417template <class T>
    418 int SphereThetaPhi<T>::Index(int kt,int jp) const
     418int_4 SphereThetaPhi<T>::Index(int_4 kt,int_4 jp) const
    419419
    420420//    Return pixel index  with sequence index jp in the slice kt
     
    449449//++
    450450template <class T>
    451 void SphereThetaPhi<T>::ThetaPhiIndex(int k,int& kt,int& jp)
     451void SphereThetaPhi<T>::ThetaPhiIndex(int_4 k,int_4& kt,int_4& jp)
    452452
    453453//    Return indices kt (theta) and jp (phi) of  pixel with index k
     
    477477//++
    478478template <class T>
    479 void  SphereThetaPhi<T>::Pixelize(int m)
     479void  SphereThetaPhi<T>::Pixelize(int_4 m)
    480480
    481481//    achieve the splitting into pixels (m has the same signification
     
    507507 
    508508  // Le nombre de pixels en phi de chacune des bandes en theta
    509   NPhi_ = new int[m];
     509  NPhi_ = new int_4[m];
    510510 
    511511  // Le nombre/Deuxpi total des pixels contenus dans les bandes de z superieur a une
    512512  // bande donnee (mTPphi[m] contient le nombre de pixels total de l'hemisphere)
    513   TNphi_= new int[m+1];
     513  TNphi_= new int_4[m+1];
    514514 
    515515  // Calcul du nombre total de pixels dans chaque bande pour optimiser
     
    524524    {
    525525      TNphi_[j]= TNphi_[j-1]+NPhi_[j-1];
    526       NPhi_[j] = (int)(.5+4.*(double)(m-.5)*sin(Pi*(double)j/(double)(2.*m-1.))) ;
     526      NPhi_[j] = (int_4)(.5+4.*(double)(m-.5)*sin(Pi*(double)j/(double)(2.*m-1.))) ;
    527527    }
    528528 
     
    556556//++
    557557template <class T>
    558 void SphereThetaPhi<T>::GetThetaSlice(int index,double& theta, TVector<double>& phi, TVector<T>& value) const
     558void SphereThetaPhi<T>::GetThetaSlice(int_4 index,double& theta, TVector<double>& phi, TVector<T>& value) const
    559559
    560560//    For a theta-slice with index 'index', return :
     
    593593
    594594template <class T>
    595 void SphereThetaPhi<T>::setmNPhi(int* array, int m)
     595void SphereThetaPhi<T>::setmNPhi(int_4* array, int_4 m)
    596596  //remplit le tableau contenant le nombre de pixels en phi de chacune des bandes en theta
    597597  //
    598598{
    599   NPhi_= new int[m];
     599  NPhi_= new int_4[m];
    600600  for(int k = 0; k < m; k++) NPhi_[k]= array[k];
    601601}
    602602
    603603template <class T>
    604 void SphereThetaPhi<T>::setmTNphi(int* array, int m)
     604void SphereThetaPhi<T>::setmTNphi(int_4* array, int_4 m)
    605605  //remplit  le tableau contenant le nombre/Deuxpi total des pixels contenus dans les bandes
    606606  //
    607607{
    608   TNphi_= new int[m];
     608  TNphi_= new int_4[m];
    609609  for(int k = 0; k < m; k++) TNphi_[k]= array[k];
    610610}
    611611
    612612template <class T>
    613 void SphereThetaPhi<T>::setmTheta(double* array, int m)
     613void SphereThetaPhi<T>::setmTheta(double* array, int_4 m)
    614614  //remplit  le tableau contenant les valeurs limites de theta
    615615  //
     
    620620
    621621template <class T>
    622 void SphereThetaPhi<T>::setDataBlock(T* data, int m)
     622void SphereThetaPhi<T>::setDataBlock(T* data, int_4 m)
    623623  // remplit  le vecteur des contenus des pixels
    624624{
     
    743743    }
    744744
    745   int mNTheta;
     745  int_4 mNTheta;
    746746  is.GetI4(mNTheta); 
    747747  dobj->setSizeIndex(mNTheta);
    748748
    749   int mNPix;
     749  int_4 mNPix;
    750750  is.GetI4(mNPix);
    751751  dobj->setNbPixels(mNPix);
     
    755755  dobj->setPixSolAngle(mOmeg);
    756756
    757   int* mNphi= new int[mNTheta];
     757  int_4* mNphi= new int_4[mNTheta];
    758758  is.GetI4s(mNphi, mNTheta);
    759759  dobj->setmNPhi(mNphi, mNTheta);
    760760  delete [] mNphi;
    761761
    762   int* mTNphi= new int[mNTheta+1];
     762  int_4* mTNphi= new int_4[mNTheta+1];
    763763  is.GetI4s(mTNphi, mNTheta+1);
    764764  dobj->setmTNphi(mTNphi, mNTheta+1);
     
    788788 
    789789  char strg[256];
    790   int mNTheta= dobj->SizeIndex();
    791   int mNPix  = dobj->NbPixels();
     790  int_4 mNTheta= dobj->SizeIndex();
     791  int_4 mNPix  = dobj->NbPixels();
    792792 
    793793  if(dobj->ptrInfo())
Note: See TracChangeset for help on using the changeset viewer.