Changeset 574 in Sophya
- Timestamp:
- Nov 12, 1999, 4:03:09 PM (26 years ago)
- Location:
- trunk/SophyaLib/Samba
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/localmap.cc
r568 r574 107 107 //++ 108 108 template<class T> 109 LocalMap<T>::LocalMap(const LocalMap<T>& lm) 109 LocalMap<T>::LocalMap(const LocalMap<T>& lm, bool share) 110 : pixels_(lm.pixels_, share) 111 110 112 // 111 113 // copy constructor … … 131 133 tgAngleX_= lm.tgAngleX_; 132 134 tgAngleY_= lm.tgAngleY_; 133 pixels_= lm.pixels_;134 135 } 135 136 … … 210 211 } 211 212 return *(pixels_.Data()+k); 213 } 214 215 template<class T> 216 bool LocalMap<T>::ContainsSph(double theta, double phi) const 217 { 218 // $CHECK$ Reza 11/11/99 - A modifier 219 return(true); 212 220 } 213 221 … … 281 289 // retour au plan utilisateur 282 290 ReferenceToUser(theta, phi); 291 } 292 293 template <class T> 294 T LocalMap<T>::SetPixels(T v) 295 { 296 pixels_.Reset(v); 297 return(v); 283 298 } 284 299 … … 584 599 //-- 585 600 { 586 dobj= new LocalMap<T>(obj );601 dobj= new LocalMap<T>(obj, true); 587 602 ownobj= true; 588 603 } -
trunk/SophyaLib/Samba/localmap.h
r568 r574 66 66 LocalMap(); 67 67 LocalMap(int nx, int ny); 68 LocalMap(const LocalMap<T>& lm );68 LocalMap(const LocalMap<T>& lm, bool share=false); 69 69 virtual ~LocalMap(); 70 70 … … 98 98 /*! Return (theta, phi) coordinates of pixel with index k */ 99 99 virtual void PixThetaPhi(int k,double& theta,double& phi) const; 100 101 /*! Set all pixels to value v */ 102 virtual T SetPixels(T v); 100 103 101 104 /* return the Pixel Solid angle (steradians) */ -
trunk/SophyaLib/Samba/pixelmap.h
r568 r574 84 84 // overloading of (int,int) in CartesianMap 85 85 86 /*! Setting pixel values to a constant */ 87 virtual T SetPixels(T v); 88 inline T operator = (T v) { return(SetPixels(v)); } 89 86 90 //++ 87 91 DVList& Info() … … 118 122 return(ContainsSph(v.Theta(), v.Phi())); 119 123 } 124 template <class T> 125 T PixelMap<T>::SetPixels(T v) 126 { 127 int k; 128 for(k=0; k<NbPixels(); k++) PixVal(k) = v; 129 return(v); 130 } 120 131 121 132 #endif -
trunk/SophyaLib/Samba/spheregorski.cc
r565 r574 211 211 //++ 212 212 template<class T> 213 SphereGorski<T>::SphereGorski(const SphereGorski<T>& s )214 213 SphereGorski<T>::SphereGorski(const SphereGorski<T>& s, bool share) 214 : pixels_(s.pixels_, share) 215 215 // copy constructor 216 216 //-- … … 222 222 nPix_ = s.nPix_; 223 223 omeg_ = s.omeg_; 224 225 pixels_= s.pixels_;226 227 224 } 228 225 … … 495 492 { 496 493 pix2ang_ring(nSide_,k,theta,phi); 494 } 495 496 template <class T> 497 T SphereGorski<T>::SetPixels(T v) 498 { 499 pixels_.Reset(v); 500 return(v); 497 501 } 498 502 … … 1117 1121 FIO_SphereGorski<T>::FIO_SphereGorski(const SphereGorski<T>& obj) 1118 1122 { 1119 dobj= new SphereGorski<T>(obj );1123 dobj= new SphereGorski<T>(obj, true); 1120 1124 ownobj= true; 1121 1125 } -
trunk/SophyaLib/Samba/spheregorski.h
r565 r574 65 65 */ 66 66 SphereGorski(int m); 67 SphereGorski(const SphereGorski<T>& s );67 SphereGorski(const SphereGorski<T>& s, bool share=false); 68 68 //! Destructor 69 69 virtual ~SphereGorski(); … … 104 104 /* Coordonnees spheriques du milieu du pixel d'indice "RING" k */ 105 105 virtual void PixThetaPhi(int k,double& theta,double& phi) const; 106 107 /*! Set all pixels to value v */ 108 virtual T SetPixels(T v); 106 109 107 110 /* Pixel Solid angle (steradians) */ -
trunk/SophyaLib/Samba/spherethetaphi.cc
r565 r574 61 61 62 62 template <class T> 63 SphereThetaPhi<T>::SphereThetaPhi(const SphereThetaPhi<T>& s) 63 SphereThetaPhi<T>::SphereThetaPhi(const SphereThetaPhi<T>& s, bool share) 64 : pixels_(s.pixels_ , share) 64 65 { 65 66 if(s.mInfo_) mInfo_= new DVList(*s.mInfo_); … … 193 194 { 194 195 double dphi; 195 int i, j,k;196 int i,k; 196 197 bool fgzn = false; 197 198 … … 238 239 phi= DeuxPi/(double)NPhi_[i]*(double)(k+.5); 239 240 if (fgzn) phi= DeuxPi-phi; 241 } 242 243 template <class T> 244 T SphereThetaPhi<T>::SetPixels(T v) 245 { 246 pixels_.Reset(v); 247 return(v); 240 248 } 241 249 … … 483 491 //-- 484 492 { 485 int ntotpix, i,j;493 int ntotpix,j; 486 494 487 495 // Decodage et controle des arguments d'appel : … … 685 693 FIO_SphereThetaPhi<T>::FIO_SphereThetaPhi(const SphereThetaPhi<T>& obj) 686 694 { 687 dobj= new SphereThetaPhi<T>(obj );695 dobj= new SphereThetaPhi<T>(obj, true); 688 696 ownobj= true; 689 697 } -
trunk/SophyaLib/Samba/spherethetaphi.h
r565 r574 32 32 */ 33 33 SphereThetaPhi(int m); 34 SphereThetaPhi(const SphereThetaPhi<T>& s );34 SphereThetaPhi(const SphereThetaPhi<T>& s, bool share=false); 35 35 virtual ~SphereThetaPhi(); 36 36 … … 56 56 /*! Return (theta,phi) coordinates of middle of pixel with index k */ 57 57 virtual void PixThetaPhi(int k, double& theta, double& phi) const; 58 59 /*! Setting pixel values to a constant */ 60 virtual T SetPixels(T v); 58 61 59 62 /* retourne/fixe l'angle Solide de Pixel (steradians) */
Note:
See TracChangeset
for help on using the changeset viewer.