Changeset 701 in Sophya for trunk/SophyaLib/Samba/spherethetaphi.cc
- Timestamp:
- Jan 4, 2000, 3:27:29 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spherethetaphi.cc
r699 r701 322 322 //-- 323 323 { 324 int nbslices; 325 nbslices= 2*NTheta_; 326 return(nbslices); 324 return( 2*NTheta_); 327 325 } 328 326 … … 566 564 { 567 565 568 if(index < 0 || index > NbThetaSlices())566 if(index < 0 || index >= NbThetaSlices()) 569 567 { 570 568 // 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; 572 570 THROW(rangeCheckErr); 573 571 } 574 572 575 573 int iring= Index(index,0); 576 int bid = this->NPhi(index); 577 int lring = bid; 574 int lring = NPhi(index); 578 575 579 576 phi.ReSize(lring); … … 617 614 } 618 615 619 template <class T>620 void SphereThetaPhi<T>::setDataBlock(T* data, int_4 m)621 // remplit le vecteur des contenus des pixels622 {623 pixels_.FillFrom(m,data);624 }625 616 626 617 template <class T> … … 684 675 { 685 676 dobj= new SphereThetaPhi<T>; 686 dobj->DataBlock().SetTemp(true); 677 // dobj->DataBlock().SetTemp(true); 678 dobj->pixels_.SetTemp(true); 687 679 ownobj= true; 688 680 Read(filename); … … 693 685 { 694 686 dobj= new SphereThetaPhi<T>(obj, true); 695 dobj->DataBlock().SetTemp(true); 687 // dobj->DataBlock().SetTemp(true); 688 dobj->pixels_.SetTemp(true); 696 689 ownobj= true; 697 690 } … … 723 716 { 724 717 dobj= new SphereThetaPhi<T>; 725 dobj->DataBlock().SetTemp(true); 718 // dobj->DataBlock().SetTemp(true); 719 dobj->pixels_.SetTemp(true); 726 720 ownobj= true; 727 721 } 728 722 729 723 // 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); 732 726 733 727 // Pour savoir s'il y avait un DVList Info associe … … 743 737 int_4 mNTheta; 744 738 is.GetI4(mNTheta); 745 dobj->setSizeIndex(mNTheta);746 747 739 int_4 mNPix; 748 740 is.GetI4(mNPix); 749 dobj->setNbPixels(mNPix);750 751 741 double mOmeg; 752 742 is.GetR8(mOmeg); 753 dobj->setP ixSolAngle(mOmeg);743 dobj->setParameters(mNPix, mOmeg, mNTheta); 754 744 755 745 int_4* mNphi= new int_4[mNTheta]; … … 769 759 770 760 // On lit le DataBlock; 771 is >> dobj->DataBlock(); 761 //FIO_NDataBlock<T> fio_nd(&dobj->DataBlock()); 762 FIO_NDataBlock<T> fio_nd(&dobj->pixels_); 763 fio_nd.Read(is); 764 // is >> dobj->DataBlock(); 772 765 } 773 766 … … 783 776 784 777 // Let's write the SphereCoordSys object 785 dobj->GetCoordSys()->Write(os); 778 FIO_SphereCoordSys fio_scs( dobj->GetCoordSys()); 779 fio_scs.Write(os); 786 780 787 781 char strg[256]; … … 803 797 os.PutI4(mNTheta); 804 798 os.PutI4(mNPix); 805 os.PutR8(dobj->PixSolAngle( 0));799 os.PutR8(dobj->PixSolAngle()); 806 800 os.PutI4s(dobj->getmNPhi() , mNTheta); 807 801 os.PutI4s(dobj->getmTNphi(), mNTheta+1); 808 802 os.PutR8s(dobj->getmTheta(), mNTheta+1); 809 803 // On ecrit le datablock 810 os << dobj->DataBlock(); 804 //FIO_NDataBlock<T> fio_nd(&dobj->DataBlock()); 805 FIO_NDataBlock<T> fio_nd(&dobj->pixels_); 806 fio_nd.Write(os); 807 // os << dobj->DataBlock(); 811 808 } 812 809
Note:
See TracChangeset
for help on using the changeset viewer.