Changeset 2885 in Sophya for trunk/SophyaLib/SkyMap
- Timestamp:
- Jan 4, 2006, 2:36:47 PM (20 years ago)
- Location:
- trunk/SophyaLib/SkyMap
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/localmap.cc
r2869 r2885 181 181 { 182 182 183 if(lm.mInfo_) mInfo_= new DVList(*lm.mInfo_);183 if(lm.mInfo_) this->mInfo_= new DVList(*lm.mInfo_); 184 184 recopierVariablesSimples(lm); 185 185 } … … 196 196 { 197 197 198 if(lm.mInfo_) mInfo_= new DVList(*lm.mInfo_);198 if(lm.mInfo_) this->mInfo_= new DVList(*lm.mInfo_); 199 199 recopierVariablesSimples(lm); 200 200 } … … 236 236 recopierVariablesSimples(a); 237 237 pixels_.CloneOrShare(a.pixels_); 238 if ( mInfo_) {delete mInfo_;mInfo_ = NULL;}239 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));238 if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;} 239 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 240 240 } 241 241 template<class T> … … 244 244 recopierVariablesSimples(a); 245 245 pixels_.Share(a.pixels_); 246 if ( mInfo_) {delete mInfo_;mInfo_ = NULL;}247 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));246 if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;} 247 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 248 248 } 249 249 … … 271 271 if (NbPixels() < 1) CloneOrShare(a); 272 272 else CopyElt(a); 273 if ( mInfo_) deletemInfo_;274 mInfo_ = NULL;275 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));273 if (this->mInfo_) delete this->mInfo_; 274 this->mInfo_ = NULL; 275 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 276 276 } 277 277 return(*this); -
trunk/SophyaLib/SkyMap/localmap.h
r2433 r2885 54 54 // ---------- Overloading of () to access pixel number k ---- 55 55 56 inline T& operator()(int_4 k) {return( PixVal(k));}57 inline T const& operator()(int_4 k) const {return( PixVal(k));}58 inline T& operator()(int_4 ix, int_4 iy) {return PixVal(iy*nSzX_+ix);};59 inline T const& operator()(int_4 ix, int_4 iy) const {return PixVal(iy*nSzX_+ix);};56 inline T& operator()(int_4 k) {return(this->PixVal(k));} 57 inline T const& operator()(int_4 k) const {return(this->PixVal(k));} 58 inline T& operator()(int_4 ix, int_4 iy) {return this->PixVal(iy*nSzX_+ix);}; 59 inline T const& operator()(int_4 ix, int_4 iy) const {return this->PixVal(iy*nSzX_+ix);}; 60 60 61 61 // Acces a un pixel 62 inline T& operator()(double theta,double phi) {return( PixValSph(theta,phi));};63 inline T const& operator()(double theta,double phi) const {return( PixValSph(theta,phi));};62 inline T& operator()(double theta,double phi) {return(this->PixValSph(theta,phi));}; 63 inline T const& operator()(double theta,double phi) const {return(this->PixValSph(theta,phi));}; 64 64 65 65 // ---------- Definition of PixelMap abstract methods ------- -
trunk/SophyaLib/SkyMap/spherehealpix.cc
r2869 r2885 113 113 nPix_ = s.nPix_; 114 114 omeg_ = s.omeg_; 115 if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);115 if(s.mInfo_) this->mInfo_= new DVList(*s.mInfo_); 116 116 } 117 117 //++ … … 126 126 nPix_ = s.nPix_; 127 127 omeg_ = s.omeg_; 128 if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);128 if(s.mInfo_) this->mInfo_= new DVList(*s.mInfo_); 129 129 // CloneOrShare(s); 130 130 } … … 141 141 sliceBeginIndex_.CloneOrShare(a.sliceBeginIndex_); 142 142 sliceLenght_.CloneOrShare(a.sliceLenght_); 143 if ( mInfo_) {delete mInfo_;mInfo_ = NULL;}144 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));143 if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;} 144 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 145 145 } 146 146 … … 155 155 sliceBeginIndex_.Share(a.sliceBeginIndex_); 156 156 sliceLenght_.Share(a.sliceLenght_); 157 if ( mInfo_) {delete mInfo_;mInfo_ = NULL;}158 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));157 if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;} 158 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 159 159 } 160 160 … … 172 172 173 173 174 if ( mInfo_) deletemInfo_;175 mInfo_ = NULL;176 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));174 if (this->mInfo_) delete this->mInfo_; 175 this->mInfo_ = NULL; 176 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 177 177 } 178 178 return(*this); … … 674 674 void SphereHEALPix<T>::print(ostream& os) const 675 675 { 676 if( mInfo_) os << " DVList Info= " << *mInfo_<< endl;676 if(this->mInfo_) os << " DVList Info= " << *(this->mInfo_) << endl; 677 677 // 678 678 os << " nSide_ = " << nSide_ << endl; -
trunk/SophyaLib/SkyMap/spherethetaphi.cc
r2869 r2885 81 81 NPix_ = s.NPix_; 82 82 Omega_ = s.Omega_; 83 if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);83 if(s.mInfo_) this->mInfo_= new DVList(*s.mInfo_); 84 84 } 85 85 … … 92 92 NPix_ = s.NPix_; 93 93 Omega_ = s.Omega_; 94 if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);94 if(s.mInfo_) this->mInfo_= new DVList(*s.mInfo_); 95 95 } 96 96 … … 139 139 Theta_.CloneOrShare(a.Theta_); 140 140 pixels_.CloneOrShare(a.pixels_); 141 if ( mInfo_) {delete mInfo_;mInfo_ = NULL;}142 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));141 if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;} 142 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 143 143 } 144 144 template<class T> … … 153 153 Theta_.Share(a.Theta_); 154 154 pixels_.Share(a.pixels_); 155 if ( mInfo_) {delete mInfo_;mInfo_ = NULL;}156 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));155 if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;} 156 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 157 157 } 158 158 … … 169 169 if (NbPixels() < 1) CloneOrShare(a); 170 170 else CopyElt(a); 171 if ( mInfo_) deletemInfo_;172 mInfo_ = NULL;173 if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));171 if (this->mInfo_) delete this->mInfo_; 172 this->mInfo_ = NULL; 173 if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_)); 174 174 } 175 175 return(*this); … … 697 697 void SphereThetaPhi<T>::print(ostream& os) const 698 698 { 699 if( mInfo_) os << " DVList Info= " << *mInfo_<< endl;699 if(this->mInfo_) os << " DVList Info= " << *(this->mInfo_) << endl; 700 700 // 701 701 os << " NTheta_= " << NTheta_ << endl; -
trunk/SophyaLib/SkyMap/sphericalmap.h
r1375 r2885 38 38 39 39 // Overloading of () to access pixel number k. 40 inline T& operator()(int k) {return( PixVal(k));}41 inline T const& operator()(int k) const {return( PixVal(k));}42 inline T& operator()(double theta,double phi) {return( PixValSph(theta,phi));};43 inline T const& operator()(double theta,double phi) const {return( PixValSph(theta,phi));};40 inline T& operator()(int k) {return(this->PixVal(k));} 41 inline T const& operator()(int k) const {return(this->PixVal(k));} 42 inline T& operator()(double theta,double phi) {return(this->PixValSph(theta,phi));}; 43 inline T const& operator()(double theta,double phi) const {return(this->PixValSph(theta,phi));}; 44 44 45 45 // index characterizing the size pixelization : m for SphereThetaPhi
Note:
See TracChangeset
for help on using the changeset viewer.