Changeset 1806 in Sophya
- Timestamp:
- Dec 1, 2001, 2:34:08 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/ProcWSophya/toi2map.cc
r1805 r1806 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toi2map.cc,v 1.2 1 2001-11-30 21:08:36aubourg Exp $5 // $Id: toi2map.cc,v 1.22 2001-12-01 13:34:08 aubourg Exp $ 6 6 7 7 #include "machdefs.h" … … 12 12 13 13 //////////////////////////////////////////////////////////////////////// 14 TOI2 GMap::TOI2GMap(PixelMap<r_8>* map,PixelMap<r_8>* wmap)14 TOI2Map::TOI2Map(PixelMap<r_8>* map,PixelMap<r_8>* wmap) 15 15 : mMap(map), mWMap(map), mWMapInternal(false) 16 16 { … … 25 25 26 26 if(mMap->NbPixels()<1) { 27 cout<<"TOI2 GMap::TOI2GMap() Bad number of pixels in sphere mMap "27 cout<<"TOI2Map::TOI2Map() Bad number of pixels in sphere mMap " 28 28 <<mMap->NbPixels()<<endl; 29 throw ParmError("TOI2 GMap::TOI2GMap() - Bad number of pixels in sphere");29 throw ParmError("TOI2Map::TOI2Map() - Bad number of pixels in sphere"); 30 30 } 31 31 mMap->SetPixels(0.); … … 40 40 mWMap = new SphereHEALPix<r_8>(nlat); 41 41 } else { 42 cout << "TOI2 GMap::TOI2GMap() cannot handle map of type " << typmap << endl;43 throw ParmError("TOI2 GMap::TOI2GMap() - bad type of map");42 cout << "TOI2Map::TOI2Map() cannot handle map of type " << typmap << endl; 43 throw ParmError("TOI2Map::TOI2Map() - bad type of map"); 44 44 } 45 45 mWMapInternal = true; … … 47 47 mWMapInternal = false; 48 48 if(nlat != mWMap->SizeIndex()) { 49 cout << "TOI2 GMap::TOI2GMap() Bad size for sphere mWMap, does not "49 cout << "TOI2Map::TOI2Map() Bad size for sphere mWMap, does not " 50 50 << "correspond to mMap : " << mMap->SizeIndex() << ", " << mWMap->SizeIndex() << endl; 51 throw ParmError("TOI2 GMap::TOI2GMap() - Different sizes for map and wmap");51 throw ParmError("TOI2Map::TOI2Map() - Different sizes for map and wmap"); 52 52 } 53 53 } 54 54 if(mWMap->NbPixels()<1) { 55 cout<<"TOI2 GMap::TOI2GMap() Bad number of pixels in sphere mWMap "55 cout<<"TOI2Map::TOI2Map() Bad number of pixels in sphere mWMap " 56 56 <<mWMap->NbPixels()<<endl; 57 throw ParmError("TOI2 GMap::TOI2GMap() - Bad number of pixels in sphere");57 throw ParmError("TOI2Map::TOI2Map() - Bad number of pixels in sphere"); 58 58 } 59 59 mWMap->SetPixels(0); 60 60 } 61 61 62 TOI2 GMap::~TOI2GMap()62 TOI2Map::~TOI2Map() 63 63 { 64 64 if(mWMap && mWMapInternal) delete mWMap; … … 66 66 67 67 //////////////////////////////////////////////////////////////////////// 68 void TOI2 GMap::Print(::ostream & os)69 { 70 os<<"TOI2 GMap::Print -- Map type " << mMap->TypeOfMap() << " SizeIndex = "<<mMap->SizeIndex()<<endl68 void TOI2Map::Print(::ostream & os) 69 { 70 os<<"TOI2Map::Print -- Map type " << mMap->TypeOfMap() << " SizeIndex = "<<mMap->SizeIndex()<<endl 71 71 72 72 <<" - Equinoxe="<<mActualYear<<endl … … 90 90 91 91 //////////////////////////////////////////////////////////////////////// 92 void TOI2 GMap::init() {93 cout << "TOI2 GMap::init" << endl;92 void TOI2Map::init() { 93 cout << "TOI2Map::init" << endl; 94 94 declareInput("Coord1In"); // input index 0 95 95 declareInput("Coord2In"); // input index 1 … … 99 99 //////////////////////////////////////////////////////////////////////// 100 100 // define SANS_BUFFER 101 void TOI2 GMap::run()101 void TOI2Map::run() 102 102 { 103 103 long snb = getMinIn(); … … 105 105 106 106 if(snb>sne) { 107 cout<<"TOI2 GMap::run() - Bad sample interval"<<snb<<" , "<<sne<<endl;108 throw ParmError("TOI2 GMap::run() - Bad sample interval");107 cout<<"TOI2Map::run() - Bad sample interval"<<snb<<" , "<<sne<<endl; 108 throw ParmError("TOI2Map::run() - Bad sample interval"); 109 109 } 110 110 if(!checkInputTOIIndex(0) || !checkInputTOIIndex(1) || !checkInputTOIIndex(2)) { 111 cout<<"TOI2 GMap::run() - Input TOI (Coord1In or Coord2In or BoloIn) not connected! "<<endl;112 throw ParmError("TOI2 GMap::run() Output TOI (Coord1In or Coord2In or BoloIn) not connected!");111 cout<<"TOI2Map::run() - Input TOI (Coord1In or Coord2In or BoloIn) not connected! "<<endl; 112 throw ParmError("TOI2Map::run() Output TOI (Coord1In or Coord2In or BoloIn) not connected!"); 113 113 } 114 114 if( !(mTypCoorIn&TypCoordEq || mTypCoorIn&TypCoordGal) ) { 115 cout<<"TOI2 GMap::run() - Input Coordinates not Eq or Gal! "<<endl;116 throw ParmError("TOI2 GMap::run() - Input Coordinates not Eq or Gal!");115 cout<<"TOI2Map::run() - Input Coordinates not Eq or Gal! "<<endl; 116 throw ParmError("TOI2Map::run() - Input Coordinates not Eq or Gal!"); 117 117 } 118 118 if( !(mTypCoorOut&TypCoordEq || mTypCoorOut&TypCoordGal) ) { 119 cout<<"TOI2 GMap::run() - Output Coordinates not Eq or Gal! "<<endl;120 throw ParmError("TOI2 GMap::run() - Output Coordinates not Eq or Gal!");119 cout<<"TOI2Map::run() - Output Coordinates not Eq or Gal! "<<endl; 120 throw ParmError("TOI2Map::run() - Output Coordinates not Eq or Gal!"); 121 121 } 122 122 … … 130 130 double mjd = MJDfrYear(mActualYear); 131 131 132 cout<<"TOI2 GMap::run() from "<<snb<<" to "<<sne;132 cout<<"TOI2Map::run() from "<<snb<<" to "<<sne; 133 133 #ifndef SANS_BUFFER 134 134 int bufsz = 100; … … 207 207 } 208 208 209 cout<<"TOI2 GMap::run(): Fin de boucle sur les sampleNum"<<endl;209 cout<<"TOI2Map::run(): Fin de boucle sur les sampleNum"<<endl; 210 210 211 211 // Remplissage des spheres … … 220 220 } 221 221 222 cout<<"TOI2 GMap::run(): mNpixTot="<<mMap->NbPixels()222 cout<<"TOI2Map::run(): mNpixTot="<<mMap->NbPixels() 223 223 <<" mNpixFill="<<mNpixFill 224 224 <<" mNSnFill="<<mNSnFill<<endl … … 235 235 //--------------------------------------------------------- 236 236 } catch (PException & exc) { 237 cout<<"TOI2 GMap: Catched Exception "<<(string)typeid(exc).name()237 cout<<"TOI2Map: Catched Exception "<<(string)typeid(exc).name() 238 238 <<"\n .... Msg= "<<exc.Msg()<<endl; 239 239 }
Note:
See TracChangeset
for help on using the changeset viewer.