Changeset 1525 in Sophya
- Timestamp:
- Jun 13, 2001, 5:05:38 PM (24 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r1504 r1525 410 410 tokens[6], tokens[7], tokens[8], tokens[9], true); 411 411 } 412 else if (kw == "vecplot") { 413 if (tokens.size() < 2) { 414 cout << "Usage: vecplot nameVecX nameVecY [opt]" << endl; 415 } 416 while (tokens.size() < 3) tokens.push_back(""); 417 mObjMgr->DisplayVector(tokens[0], tokens[1], tokens[2]); 418 } 412 419 413 420 // Obsolete : ne pas virer SVP, cmv 26/7/99 … … 915 922 kw = "disp"; 916 923 usage = "Displays an object \n Usage: disp nameobj [graphic_attributes]"; 917 usage += "\n Related commands: surf nt2d nt3d ";924 usage += "\n Related commands: surf nt2d nt3d vecplot"; 918 925 mpiac->RegisterCommand(kw, usage, this, "Obj. Display"); 919 926 kw = "imag"; 920 927 usage = "Displays an object as an image \n Usage: imag nameobj [graphic_attributes]"; 921 usage += "\n Related commands: disp surf nt2d nt3d ";928 usage += "\n Related commands: disp surf nt2d nt3d vecplot"; 922 929 mpiac->RegisterCommand(kw, usage, this, "Obj. Display"); 923 930 kw = "surf"; 924 931 usage = "Displays an object as a 3D surface \n Usage: surf nameobj [graphic_attributes]"; 925 usage += "\n Related commands: disp nt2d nt3d ";932 usage += "\n Related commands: disp nt2d nt3d vecplot"; 926 933 mpiac->RegisterCommand(kw, usage, this, "Obj. Display"); 927 934 kw = "nt2d"; 928 935 usage = "Displays Points (X-Y) [with error-bar / Weight / Label ] from an NTuple "; 929 936 usage += "\n Usage : nt2d nameobj varx vary [errx erry wt label graphic_attributes]"; 930 usage += "\n Related commands: disp surf nt3d gfd2d ";937 usage += "\n Related commands: disp surf nt3d gfd2d vecplot"; 931 938 mpiac->RegisterCommand(kw, usage, this, "Obj. Display"); 932 939 kw = "nt3d"; … … 934 941 usage += "\n Usage : nt3d nameobj varx vary varz [errx erry errz wt label graphic_attributes]"; 935 942 usage += "\n Related commands: disp surf nt2d gfd3d "; 943 mpiac->RegisterCommand(kw, usage, this, "Obj. Display"); 944 kw = "vecplot"; 945 usage = "Displays Points (X-Y) with coordinates defined by two vectors "; 946 usage += "\n Usage : vecplot nameVecX nameVecY [graphic_attributes]"; 947 usage += "\n Related commands: disp nt2d "; 936 948 mpiac->RegisterCommand(kw, usage, this, "Obj. Display"); 937 949 -
trunk/SophyaPI/PIext/nobjmgr.cc
r1513 r1525 24 24 #else 25 25 #include "fitsautoreader.h" 26 #include "tvector.h" 27 #include "pitvmaad.h" 28 #include "piscdrawwdg.h" 26 29 #endif 27 30 … … 1361 1364 } 1362 1365 1366 /* --Methode-- */ 1367 void NamedObjMgr::DisplayVector(string & nomvx, string& nomvy, string dopt) 1368 // Pour l'affichage 2-D de points avec coordonnees definies par deux vecteurs 1369 // nomvx et nomvy 1370 { 1371 #ifdef SANS_EVOLPLANCK 1372 cerr << " NamedObjMgr::DisplayVector() Error: Not implemented with PEIDA " << endl; 1373 #else 1374 1375 if(!myImgApp) return; 1376 1377 AnyDataObj* obj; 1378 obj = GetObj(nomvx); 1379 if(obj == NULL) { 1380 cout << "NamedObjMgr::DisplayVector() Error , No such object " << nomvx << endl; 1381 return; 1382 } 1383 Vector * vx = dynamic_cast<Vector *>(obj); 1384 if (vx == NULL) { 1385 cout << "NamedObjMgr::DisplayVector() Error " << nomvx << " not a Vector ! " << endl; 1386 return; 1387 } 1388 1389 obj = GetObj(nomvy); 1390 if(obj == NULL) { 1391 cout << "NamedObjMgr::DisplayVector() Error , No such object " << nomvy << endl; 1392 return; 1393 } 1394 Vector * vy = dynamic_cast<Vector *>(obj); 1395 if (vy == NULL) { 1396 cout << "NamedObjMgr::DisplayVector() Error " << nomvy << " not a Vector ! " << endl; 1397 return; 1398 } 1399 1400 1401 Vector * cvx, * cvy; 1402 1403 if (vx->Size() != vy->Size()) { 1404 cout << "NamedObjMgr::DisplayVector() Warning / Vx.Size() != Vy.Size() " << endl; 1405 if (vx->Size() < vy->Size()) { 1406 cvx = new Vector(*vx); 1407 cvy = new Vector(vy->SubVector(Range(0, 0, vx->Size()-1))); 1408 } 1409 else { 1410 cvx = new Vector(vx->SubVector(Range(0, 0, vy->Size()-1))); 1411 cvy = new Vector(*vy); 1412 } 1413 } 1414 else { 1415 cvx = new Vector(*vx); 1416 cvy = new Vector(*vy); 1417 } 1418 1419 POVectorAdapter * avx = new POVectorAdapter(cvx, true); 1420 POVectorAdapter * avy = new POVectorAdapter(cvy, true); 1421 PIYfXDrawer * vxydrw = new PIYfXDrawer(avx, avy, true); 1422 1423 // Decodage des options classiques 1424 bool fgsr = true; 1425 int opt = servnobjm->DecodeDispOption(dopt, fgsr); 1426 string nx,rx; 1427 ParseObjectName(nomvx, rx, nx); 1428 string ny,ry; 1429 ParseObjectName(nomvy, ry, ny); 1430 1431 string title = ny + " (Y) vs. " + nx + " (X)"; 1432 // display 2D 1433 int wrsid = myImgApp->DispScDrawer(vxydrw, title, opt); 1434 1435 if (fgsr) myImgApp->RestoreGraphicAtt(); 1436 return; 1437 1438 #endif 1439 } 1440 1363 1441 /* --Methode-- 1364 1442 void NamedObjMgr::DisplayImage(string& nom, string dopt) -
trunk/SophyaPI/PIext/nobjmgr.h
r1265 r1525 90 90 string& err, string dopt=""); 91 91 92 virtual void DisplayVector(string & nomvx, string& nomvy, string dopt=""); 93 92 94 virtual void SetGraphicAttributes(string gratt=""); 93 95 virtual void SetGraphicWinZone(int nzx, int nzy, bool fcr=false);
Note:
See TracChangeset
for help on using the changeset viewer.