Changeset 3572 in Sophya for trunk/SophyaPI/PIext/pawexecut.cc
- Timestamp:
- Feb 7, 2009, 10:50:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pawexecut.cc
r3551 r3572 23 23 #include "pihisto.h" 24 24 25 #ifdef SANS_EVOLPLANCK26 #include "cvector.h"27 #include "matrix.h"28 #else29 25 #include "tmatrix.h" 30 26 #include "tvector.h" 31 #endif32 27 33 28 /* Reza + cmv 13/10/99 */ … … 421 416 string ctyp = typeid(*mobj).name(); 422 417 423 #ifdef SANS_EVOLPLANCK424 if(typeid(*mobj)==typeid(Vector)) {Vector* ob=(Vector*) mobj; ob->Zero();}425 else if(typeid(*mobj)==typeid(Matrix)) {Matrix* ob=(Matrix*) mobj; ob->Zero();}426 #else427 418 if(typeid(*mobj)==typeid(Vector)) {Vector* ob=(Vector*) mobj; (*ob) = 0.; } 428 419 // ob->DataBlock().Reset(0.);} 429 420 else if(typeid(*mobj)==typeid(Matrix)) {Matrix* ob=(Matrix*) mobj; (*ob) = 0.; } 430 421 //ob->DataBlock().Reset(0.);} 431 #endif432 422 else if(typeid(*mobj)==typeid(Histo)) {Histo* ob=(Histo*) mobj; ob->Zero();} 433 423 else if(typeid(*mobj)==typeid(HProf)) {HProf* ob=(HProf*) mobj; ob->Zero();} … … 701 691 } 702 692 } // fin du try 703 #ifdef SANS_EVOLPLANCK704 CATCH(merr) {705 fflush(stdout); cout<<endl; cerr<<endl;706 string es = PeidaExc(merr);707 cerr<<"Services2NObjMgr::ComputeExpressions() Exception :"<<merr<<es;708 } ENDTRY;709 #else710 693 catch ( PException exc ) { 711 694 fflush(stdout); cout<<endl; cerr<<endl; 712 695 cerr<<"Services2NObjMgr::ComputeExpressions() Exception :"<<exc.Msg()<<endl; 713 696 } 714 #endif715 697 716 698 if(adel) delete objnt; … … 1380 1362 r_8 norm=-1.; 1381 1363 if(tokens.size()>=2) norm = atof(tokens[1].c_str()); 1382 #ifdef SANS_EVOLPLANCK 1383 Vector* v = dynamic_cast<Vector*>(mobj); 1384 #else 1364 1385 1365 TVector<r_8>* v = dynamic_cast<TVector<r_8>*>(mobj); 1386 #endif1387 1366 1388 1367 if(!v) … … 1390 1369 return;} 1391 1370 1392 #ifdef SANS_EVOLPLANCK1393 uint_4 n = v->NElts();1394 #else1395 1371 uint_4 n = v->Size(); 1396 #endif1397 1372 1398 1373 if(n==0) … … 1507 1482 if(tokens.size()>=2) deriv_option = atoi(tokens[1].c_str()); 1508 1483 1509 #ifdef SANS_EVOLPLANCK1510 Vector* v = dynamic_cast<Vector*>(mobj);1511 #else1512 1484 TVector<r_8>* v = dynamic_cast<TVector<r_8>*>(mobj); 1513 #endif1514 1485 1515 1486 if(!v) … … 1517 1488 return;} 1518 1489 1519 1520 #ifdef SANS_EVOLPLANCK1521 uint_4 n = v->NElts();1522 #else1523 1490 uint_4 n = v->Size(); 1524 #endif1525 1491 1526 1492 if(n==0) … … 1529 1495 if(n<=1) return; 1530 1496 1531 #ifdef SANS_EVOLPLANCK1532 Vector vsave(*v);1533 #else1534 1497 TVector<r_8> vsave(*v,false); 1535 #endif1536 1498 1537 1499 if(deriv_option<0) { … … 1742 1704 Vector* h3 = NULL; 1743 1705 if( mobjh3 == NULL ) { // l'objet n'existe pas, on le cree 1744 #ifdef SANS_EVOLPLANCK1745 h3 = new Vector(*h1);1746 #else1747 1706 h3 = new Vector(*h1,false); 1748 #endif1749 1707 *h3 = 0.; omg.AddObj(h3,h3name); mobjh3 = omg.GetObj(h3name); 1750 1708 } … … 1758 1716 if( oper[0]=='+') *h3 = *h1 + *h2; 1759 1717 else if( oper[0]=='-') *h3 = *h1 - *h2; 1760 #ifdef SANS_EVOLPLANCK1761 else if(oper[0]=='*' || oper[0]=='/')1762 cout<<"PAWExecutor::h_oper Error: operation "<<oper[0]1763 <<" not implemented for Vector in Peida"<<endl;1764 #else1765 1718 else if( oper[0]=='*') {h3->Clone(*h1); h3->MulElt(*h2,*h3);} 1766 1719 else if( oper[0]=='/') {h3->Clone(*h1); h3->DivElt(*h2,*h3,false,true);} 1767 #endif1768 1720 1769 1721 // Operations on Matrix … … 1781 1733 Matrix* h3 = NULL; 1782 1734 if( mobjh3 == NULL ) { // l'objet n'existe pas, on le cree 1783 #ifdef SANS_EVOLPLANCK1784 h3 = new Matrix(*h1);1785 #else1786 1735 h3 = new Matrix(*h1,false); 1787 #endif1788 1736 *h3 = 0.; omg.AddObj(h3,h3name); mobjh3 = omg.GetObj(h3name); 1789 1737 } … … 1798 1746 if( oper[0]=='+') *h3 = *h1 + *h2; 1799 1747 else if( oper[0]=='-') *h3 = *h1 - *h2; 1800 #ifdef SANS_EVOLPLANCK1801 else if(oper[0]=='*' || oper[0]=='/')1802 cout<<"PAWExecutor::h_oper Error: operation "<<oper[0]1803 <<" not implemented for Vector in Peida"<<endl;1804 #else1805 1748 else if( oper[0]=='*') {h3->Clone(*h1); h3->MulElt(*h2,*h3);} 1806 1749 else if( oper[0]=='/') {h3->Clone(*h1); h3->DivElt(*h2,*h3,false,true);} 1807 #endif1808 1750 1809 1751 // Doesn't work for other objects
Note:
See TracChangeset
for help on using the changeset viewer.