Changeset 1321 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Nov 13, 2000, 4:32:34 PM (25 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/cxxexecwin.cc
r1319 r1321 160 160 switch (msg) { 161 161 case 600: // Bouton Execute C++ 162 dap->SetBusy();163 162 SetUnSensitive(); 164 163 dap->GetConsole()->AddStr( 165 164 "CxxExecWind::Process() - Executing C++ Code ... \n", PIVA_Magenta); 165 dap->SetBusy(); 166 166 cxxex->ExecuteCXX(mText[1]->GetText(),mText[0]->GetText()); 167 167 dap->GetConsole()->AddStr( 168 "CxxExecWind ... End of Executing C++ Code \n" , PIVA_Magenta);168 "CxxExecWind ... End of Executing C++ Code \n"); 169 169 SetSensitive(); 170 170 dap->SetReady(); -
trunk/SophyaPI/PIext/nobjmgr.cc
r1315 r1321 22 22 #ifdef SANS_EVOLPLANCK 23 23 #include "fitsimage.h" 24 #else 25 #include "fitsautoreader.h" 24 26 #endif 25 27 … … 536 538 537 539 if ( (myImgApp != NULL) && (myImgApp->ObjMgrW())->Visible() ) { 538 string oln = nobj + " (T= " + typeid(*obj).name() + ")" ;540 string oln = nobj + " (T= " + no.obja->GetDataObjType() + ")" ; 539 541 (myImgApp->ObjMgrW())->AddObjList(did, oln.c_str(), no.oid); 540 542 } … … 604 606 if ( (myImgApp != NULL) && (myImgApp->ObjMgrW())->Visible() ) { 605 607 (myImgApp->ObjMgrW())->DelObjList(dids, no.oid); 606 string oln = n2 + " (T= " + typeid(*(no.obj)).name() + ")" ;608 string oln = n2 + " (T= " + no.obja->GetDataObjType() + ")" ; 607 609 (myImgApp->ObjMgrW())->AddObjList(did, oln.c_str(), no.oid); 608 610 } … … 942 944 } 943 945 #else 944 cerr << " NamedObjMgr::ReadFits() Vide ! A faire Reza ! " << endl; 946 try { 947 FITS_AutoReader fiar(flnm); 948 char buff[512], bun[16]; 949 strncpy(buff, flnm.c_str(), 512); 950 int nhdu = FitsInFile::NbBlocks(buff); 951 if (nobj.length()<1) nobj = servnobjm->FileName2Name(flnm); 952 string name; 953 AnyDataObj* obj; 954 for(int k=1; k<=nhdu; k++) { 955 obj = fiar.ReadObject(k); 956 if (obj) 957 cout << " NamedObjMgr::ReadFits() " << (string)typeid(*obj).name() 958 << " read From HDU " << k << endl; 959 else cerr << " NamedObjMgr::ReadFits() NULL pointer from FITS_AutoReader" << endl; 960 if (k > 1) { 961 sprintf(bun, "%d", k); 962 name = nobj + bun; 963 } 964 else name = nobj; 965 AddObj(obj, name); 966 } 967 } 968 catch(PThrowable & exc) { 969 cerr << " NamedObjMgr::ReadFits() / Error - Catched Exception \n " 970 << " Type= " << (string)typeid(exc).name() 971 << " - Msg= " << exc.Msg() << endl; 972 973 } 945 974 #endif 946 975 … … 1374 1403 if ((*it).second.dirid != did) continue; 1375 1404 cn = (*it).first.substr(1); 1376 cn = cn.substr(cn.find('/')+1) + " (T= " + typeid(*((*it).second.obj)).name() + ")" ; 1405 // cn = cn.substr(cn.find('/')+1) + " (T= " + typeid(*((*it).second.obj)).name() + ")" ; 1406 cn = cn.substr(cn.find('/')+1) + " (T= " + (*it).second.obja->GetDataObjType() + ")" ; 1377 1407 (myImgApp->ObjMgrW())->AddObj(cn.c_str(), (*it).second.oid); 1378 1408 } -
trunk/SophyaPI/PIext/nomhistadapter.cc
r1315 r1321 13 13 #ifndef SANS_EVOLPLANCK 14 14 #include "objfitter.h" 15 #include "fitsntuple.h" 16 #include "fitsxntuple.h" 15 17 #endif 16 18 … … 417 419 418 420 /* --Methode-- */ 421 void NOMAdapter_NTuple::ReadFits(string const & flnm) 422 { 423 #ifdef SANS_EVOLPLANCK 424 cerr << " NOMAdapter_NTuple::ReadFits() Non disponible !! " << endl; 425 #else 426 FitsInFile fis(flnm); 427 fis >> (*mNt); 428 #endif 429 } 430 431 /* --Methode-- */ 432 void NOMAdapter_NTuple::SaveFits(string const & flnm) 433 { 434 #ifdef SANS_EVOLPLANCK 435 cerr << " NOMAdapter_NTuple::SaveFits() Non disponible !! " << endl; 436 #else 437 FitsOutFile fos(flnm); 438 fos << (*mNt); 439 440 #endif 441 } 442 443 444 /* --Methode-- */ 419 445 void NOMAdapter_NTuple::SavePPF(POutPersist& pos, string const & nom) 420 446 { … … 482 508 483 509 /* --Methode-- */ 510 void NOMAdapter_XNTuple::ReadFits(string const & flnm) 511 { 512 #ifdef SANS_EVOLPLANCK 513 cerr << " NOMAdapter_XNTuple::ReadFits() Non disponible !! " << endl; 514 #else 515 FitsInFile fis(flnm); 516 fis >> (*mNt); 517 #endif 518 } 519 520 /* --Methode-- */ 521 void NOMAdapter_XNTuple::SaveFits(string const & flnm) 522 { 523 #ifdef SANS_EVOLPLANCK 524 cerr << " NOMAdapter_XNTuple::SaveFits() Non disponible !! " << endl; 525 #else 526 FitsOutFile fos(flnm); 527 fos << (*mNt); 528 529 #endif 530 } 531 532 /* --Methode-- */ 484 533 void NOMAdapter_XNTuple::SavePPF(POutPersist& pos, string const & nom) 485 534 { -
trunk/SophyaPI/PIext/nomhistadapter.h
r1315 r1321 127 127 virtual AnyDataObj* CloneDataObj(bool share=false); 128 128 129 //virtual void ReadFits(string const & flnm);130 //virtual void SaveFits(string const & flnm);129 virtual void ReadFits(string const & flnm); 130 virtual void SaveFits(string const & flnm); 131 131 virtual void SavePPF(POutPersist& s, string const & nom); 132 132 … … 153 153 virtual AnyDataObj* CloneDataObj(bool share=false); 154 154 155 //virtual void ReadFits(string const & flnm);156 //virtual void SaveFits(string const & flnm);155 virtual void ReadFits(string const & flnm); 156 virtual void SaveFits(string const & flnm); 157 157 virtual void SavePPF(POutPersist& s, string const & nom); 158 158 -
trunk/SophyaPI/PIext/nomimagadapter.cc
r1315 r1321 14 14 #else 15 15 #include "objfitter.h" 16 #include "fitstarray.h" 16 17 #endif 17 18 … … 72 73 /* --Methode-- */ 73 74 template <class T> 75 void NOMAdapter_Image<T>::ReadFits(string const & flnm) 76 { 77 #ifdef SANS_EVOLPLANCK 78 cerr << " NOMAdapter_Image<T>::ReadFits() Non disponible !! " << endl; 79 #else 80 FitsInFile fis(flnm); 81 fis >> (*mImg); 82 #endif 83 } 84 85 /* --Methode-- */ 86 template <class T> 74 87 void NOMAdapter_Image<T>::SaveFits(string const & flnm) 75 88 { … … 78 91 fim.Save(flnm); 79 92 #else 80 string s = typeid(*mImg).name(); 81 cout << "NOMAdapter_Image<T>::SaveFits() - Error : Not supported for " << s << endl; 82 #endif 83 } 93 FitsOutFile fos(flnm); 94 fos << (*mImg); 95 #endif 96 } 97 98 #ifndef SANS_EVOLPLANCK 99 void NOMAdapter_Image< uint_2 >::SaveFits(string const & flnm) 100 { 101 cout << " NOMAdapter_Image< uint_2 >::SaveFits() - Error " 102 << " Not supported uint_2 data type ! " << endl; 103 } 104 105 void NOMAdapter_Image< uint_2 >::ReadFits(string const & flnm) 106 { 107 cout << " NOMAdapter_Image< uint_2 >::ReadFits() - Error " 108 << " Not supported uint_2 data type ! " << endl; 109 } 110 #endif 84 111 85 112 /* --Methode-- */ -
trunk/SophyaPI/PIext/nomimagadapter.h
r1315 r1321 27 27 virtual AnyDataObj* CloneDataObj(bool share=false); 28 28 29 //virtual void ReadFits(string const & flnm);29 virtual void ReadFits(string const & flnm); 30 30 virtual void SaveFits(string const & flnm); 31 31 virtual void SavePPF(POutPersist& s, string const & nom); -
trunk/SophyaPI/PIext/nomskymapadapter.cc
r1315 r1321 14 14 #include "complexios.h" 15 15 16 #include "fitsspherehealpix.h" 17 #include "fitslocalmap.h" 18 19 16 20 // Classe array adapter pour localMap 17 21 template <class T> … … 105 109 return(NULL); 106 110 } 111 112 /* --Methode-- */ 113 template <class T> 114 void NOMAdapter_PixelMap<T>::ReadFits(string const & flnm) 115 { 116 LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap); 117 if (lm != NULL) { 118 FitsInFile fis(flnm); 119 fis >> (*lm); 120 return; 121 } 122 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap); 123 if (sg != NULL) { 124 FitsInFile fis(flnm); 125 fis >> (*sg); 126 return; 127 } 128 string s = typeid(*mMap).name(); 129 cout << " NOMAdapter_PixelMap<T>::ReadFits() - Error " 130 << " Not supported for " << s << endl; 131 return; 132 } 133 134 135 /* --Methode-- */ 136 template <class T> 137 void NOMAdapter_PixelMap<T>::SaveFits(string const & flnm) 138 { 139 LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap); 140 if (lm != NULL) { 141 FitsOutFile fos(flnm); 142 fos << (*lm); 143 return; 144 } 145 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap); 146 if (sg != NULL) { 147 FitsOutFile fos(flnm); 148 fos << (*sg); 149 return; 150 } 151 string s = typeid(*mMap).name(); 152 cout << " NOMAdapter_PixelMap<T>::SaveFits() - Error " 153 << " Not supported for " << s << endl; 154 return; 155 } 156 157 // ---- Specialisation pour complexes ----- 158 void NOMAdapter_PixelMap< complex<r_4> >::ReadFits(string const & flnm) 159 { 160 cout << " void NOMAdapter_PixelMap< complex<r_4> >::ReadFits() - Error " 161 << " Not supported (complex data type)" << endl; 162 } 163 void NOMAdapter_PixelMap< complex<r_4> >::SaveFits(string const & flnm) 164 { 165 cout << " void NOMAdapter_PixelMap< complex<r_4> >::SaveFits() - Error " 166 << " Not supported (complex data type)" << endl; 167 } 168 void NOMAdapter_PixelMap< complex<r_8> >::ReadFits(string const & flnm) 169 { 170 cout << " void NOMAdapter_PixelMap< complex<r_4> >::ReadFits() - Error " 171 << " Not supported (complex data type)" << endl; 172 } 173 void NOMAdapter_PixelMap< complex<r_8> >::SaveFits(string const & flnm) 174 { 175 cout << " void NOMAdapter_PixelMap< complex<r_8> >::SaveFits() - Error " 176 << " Not supported (complex data type)" << endl; 177 } 178 107 179 108 180 /* --Methode-- */ -
trunk/SophyaPI/PIext/nomskymapadapter.h
r1315 r1321 30 30 virtual AnyDataObj* CloneDataObj(bool share=false); 31 31 32 //virtual void ReadFits(string const & flnm);33 //virtual void SaveFits(string const & flnm);32 virtual void ReadFits(string const & flnm); 33 virtual void SaveFits(string const & flnm); 34 34 virtual void SavePPF(POutPersist& s, string const & nom); 35 35 -
trunk/SophyaPI/PIext/nomtarradapter.cc
r1315 r1321 9 9 10 10 #include "nomtarradapter.h" 11 #include "tvector.h" 12 #include "pitvmaad.h" 13 #include "piscdrawwdg.h" 11 14 12 15 #include "fioarr.h" 16 #include "fitstarray.h" 13 17 14 18 … … 63 67 /* --Methode-- */ 64 68 template <class T> 69 void NOMAdapter_TArray<T>::ReadFits(string const & flnm) 70 { 71 FitsInFile fis(flnm); 72 fis >> (*mArr); 73 } 74 75 /* --Methode-- */ 76 template <class T> 77 void NOMAdapter_TArray<T>::SaveFits(string const & flnm) 78 { 79 FitsOutFile fos(flnm); 80 fos << (*mArr); 81 } 82 83 // ---- Specialisation pour complexes ----- 84 void NOMAdapter_TArray< complex<r_4> >::ReadFits(string const & flnm) 85 { 86 cout << " NOMAdapter_TArray< complex<r_4> >::ReadFits() - Error " 87 << " Not supported (complex data type)" << endl; 88 } 89 void NOMAdapter_TArray< complex<r_4> >::SaveFits(string const & flnm) 90 { 91 cout << " NOMAdapter_TArray< complex<r_4> >::SaveFits() - Error " 92 << " Not supported (complex data type)" << endl; 93 } 94 95 void NOMAdapter_TArray< complex<r_8> >::ReadFits(string const & flnm) 96 { 97 cout << " NOMAdapter_TArray< complex<r_8> >::ReadFits() - Error " 98 << " Not supported (complex data type)" << endl; 99 } 100 void NOMAdapter_TArray< complex<r_8> >::SaveFits(string const & flnm) 101 { 102 cout << " NOMAdapter_TArray< complex<r_8> >::SaveFits() - Error " 103 << " Not supported (complex data type)" << endl; 104 } 105 106 /* --Methode-- */ 107 template <class T> 65 108 void NOMAdapter_TArray<T>::SavePPF(POutPersist& pos, string const & nom) 66 109 { … … 76 119 } 77 120 121 /* --Methode-- */ 122 template <class T> 123 PIDrawer * NOMAdapter_TArray<T>::GetDrawer(string & dopt) 124 { 125 if (mArr->NbDimensions() == 1) { 126 // On peut en faire un vecteur ... 127 TVector<T>* v = new TVector<T>(*mArr, true); // on partage les donnees 128 dopt = "thinline," + dopt; 129 return( new PIYfXDrawer( new POTVectorAdapter<T>(v, true), NULL, true) ); 130 } 131 else return(NULL); 132 } 133 134 /* --Methode-- */ 135 template <class T> 136 P2DArrayAdapter* NOMAdapter_TArray<T>::Get2DArray(string &) 137 { 138 if (mArr->NbDimensions() <= 2) { 139 // On peut en faire un tableau 2-D ... 140 TMatrix<T>* m = new TMatrix<T>(*mArr, true); // on partage les donnees 141 return ( new POTMatrixAdapter<T>(m, true) ); 142 } 143 else return(NULL); 144 } 78 145 79 146 /* --Methode-- */ -
trunk/SophyaPI/PIext/nomtarradapter.h
r1315 r1321 27 27 virtual AnyDataObj* CloneDataObj(bool share=false); 28 28 29 //virtual void ReadFits(string const & flnm);30 //virtual void SaveFits(string const & flnm);29 virtual void ReadFits(string const & flnm); 30 virtual void SaveFits(string const & flnm); 31 31 virtual void SavePPF(POutPersist& s, string const & nom); 32 32 33 33 virtual void Print(ostream& os); 34 //virtual PIDrawer* GetDrawer(string& dopt);35 //virtual P2DArrayAdapter* Get2DArray(string& dopt);34 virtual PIDrawer* GetDrawer(string& dopt); 35 virtual P2DArrayAdapter* Get2DArray(string& dopt); 36 36 virtual NTupleInterface* GetNTupleInterface(bool& adel); 37 38 // virtual GeneralFitData* GetGeneralFitData(bool& adel39 // ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError40 // ,double errscale=1.,double errmin=0.41 // ,int i1=0,int i2=-1,int j1=0,int j2=-1);42 // virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);43 // virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);44 37 45 38 protected: -
trunk/SophyaPI/PIext/nomtmatvecadapter.cc
r1315 r1321 15 15 16 16 #include "fioarr.h" 17 17 #include "fitstarray.h" 18 18 19 19 … … 69 69 if (v != NULL) return( new TVector<T>(*v, share) ); 70 70 else return ( new TMatrix<T>(*mMtx, share) ); 71 } 72 73 /* --Methode-- */ 74 template <class T> 75 void NOMAdapter_TMatrix<T>::ReadFits(string const & flnm) 76 { 77 FitsInFile fis(flnm); 78 fis >> (*mMtx); 79 } 80 81 /* --Methode-- */ 82 template <class T> 83 void NOMAdapter_TMatrix<T>::SaveFits(string const & flnm) 84 { 85 FitsOutFile fos(flnm); 86 fos << (*mMtx); 87 } 88 // ---- Specialisation pour complexes ----- 89 void NOMAdapter_TMatrix< complex<r_4> >::ReadFits(string const & flnm) 90 { 91 cout << " NOMAdapter_TMatrix< complex<r_4> >::ReadFits() - Error " 92 << " Not supported (complex data type)" << endl; 93 } 94 void NOMAdapter_TMatrix< complex<r_4> >::SaveFits(string const & flnm) 95 { 96 cout << " NOMAdapter_TMatrix< complex<r_4> >::SaveFits() - Error " 97 << " Not supported (complex data type)" << endl; 98 } 99 100 void NOMAdapter_TMatrix< complex<r_8> >::ReadFits(string const & flnm) 101 { 102 cout << " NOMAdapter_TMatrix< complex<r_8> >::ReadFits() - Error " 103 << " Not supported (complex data type)" << endl; 104 } 105 void NOMAdapter_TMatrix< complex<r_8> >::SaveFits(string const & flnm) 106 { 107 cout << " NOMAdapter_TMatrix< complex<r_8> >::SaveFits() - Error " 108 << " Not supported (complex data type)" << endl; 71 109 } 72 110 -
trunk/SophyaPI/PIext/nomtmatvecadapter.h
r1315 r1321 28 28 virtual AnyDataObj* CloneDataObj(bool share=false); 29 29 30 //virtual void ReadFits(string const & flnm);31 //virtual void SaveFits(string const & flnm);30 virtual void ReadFits(string const & flnm); 31 virtual void SaveFits(string const & flnm); 32 32 virtual void SavePPF(POutPersist& s, string const & nom); 33 33 -
trunk/SophyaPI/PIext/pistdimgapp.cc
r1319 r1321 428 428 gimv->SetUnSensitive(); 429 429 PIApplication::SetBusy(); 430 // Attention : Appel XSync specifique X11 - en attendant multi-thread 431 XSync(PIXDisplay(), False); 430 432 } 431 433 … … 436 438 gimv->SetUnSensitive(); 437 439 PIApplication::SetBlocked(); 440 // Attention : Appel XSync specifique X11 - en attendant multi-thread 441 XSync(PIXDisplay(), False); 438 442 } 439 443
Note:
See TracChangeset
for help on using the changeset viewer.