Changeset 3572 in Sophya for trunk/SophyaPI/PIext/servnobjm.cc
- Timestamp:
- Feb 7, 2009, 10:50:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/servnobjm.cc
r3435 r3572 20 20 #include "fct2dfit.h" 21 21 22 #ifdef SANS_EVOLPLANCK23 #include "matrix.h"24 #include "cvector.h"25 #else26 22 #include "tmatrix.h" 27 23 #include "tvector.h" 28 24 #include "matharr.h" 29 25 #include "pitvmaad.h" 30 #endif31 26 32 27 #include "ntuple.h" … … 70 65 ObjAdaptList::iterator it; 71 66 for(it = objadaplist.begin(); it != objadaplist.end(); it++) 72 #ifdef SANS_EVOLPLANCK 73 if (typeid(*o) == typeid(*((*it).obj))) THROW(dupIdErr); 74 #else 75 if (typeid(*o) == typeid(*((*it).obj))) 67 if (typeid(*o) == typeid(*((*it).obj))) 76 68 throw(DuplicateIdExc("Services2NObjMgr::RegisterClass() - Duplicate class")); 77 #endif 69 78 70 dataobj_adapter oba; 79 71 oba.obj = o; … … 215 207 for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); } 216 208 } 217 #ifdef SANS_EVOLPLANCK218 CATCH(merr) {219 fflush(stdout);220 cout << endl;221 cerr << endl;222 string es = PeidaExc(merr);223 cerr << "Services2NObjMgr::PlotFunc() Exception :" << merr << es;224 delete vpy;225 vpy = NULL;226 } ENDTRY;227 #else228 209 catch ( PException exc ) { 229 210 fflush(stdout); … … 234 215 vpy = NULL; 235 216 } 236 #endif237 217 238 218 if (vpy) { … … 286 266 } 287 267 } 288 #ifdef SANS_EVOLPLANCK289 CATCH(merr) {290 fflush(stdout);291 cout << endl;292 cerr << endl;293 string es = PeidaExc(merr);294 cerr << "Services2NObjMgr::PlotFunc2D() Exception :" << merr << es;295 delete mtx; mtx = NULL;296 } ENDTRY;297 #else298 268 catch ( PException exc ) { 299 269 fflush(stdout); … … 303 273 delete mtx; mtx = NULL; 304 274 } 305 #endif306 275 307 276 if (mtx) { … … 348 317 DVList::ValList::const_iterator it; 349 318 for(it = varlist.Begin(); it != varlist.End(); it++) { 350 #ifdef SANS_EVOLPLANCK351 MuTyV mtv = (*it).second;352 double value = (double)(mtv);353 #else354 319 double value = (double)((*it).second.elval); 355 #endif356 320 string name_var = (*it).first; 357 321 fprintf(fip,"double %s = %.17f;\n",name_var.c_str(),value); … … 408 372 409 373 // Creation NTuple 410 c har* ntn[4] = {"expx","expy","expex","expey",};374 const char* ntn[4] = {"expx","expy","expex","expey",}; 411 375 NTuple* nt = NULL; 412 376 bool haserr = false; … … 447 411 if (!mImgapp) return; 448 412 449 c har* ntn[3] = {"expx","expy","expz"};413 const char* ntn[3] = {"expx","expy","expz"}; 450 414 NTuple* nt = new NTuple(3,ntn); // Creation NTuple 451 415 … … 486 450 if (!mImgapp) return; 487 451 488 c har* ntn[3] = {"expx","expy","expw"};452 const char* ntn[3] = {"expx","expy","expw"}; 489 453 NTuple* nt = new NTuple(3,ntn); // Creation NTuple 490 454 … … 520 484 if (!mImgapp) return; 521 485 522 c har* ntn[4] = {"expx","expy","expz","expw"};486 const char* ntn[4] = {"expx","expy","expz","expw"}; 523 487 NTuple* nt = new NTuple(4,ntn); // Creation NTuple 524 488 … … 571 535 // Pas de remise a zero ! h1->Zero(); 572 536 } else { 573 c har* ntn[2]= {"hxval", "hwt"};537 const char* ntn[2]= {"hxval", "hwt"}; 574 538 nt = new NTuple(2,ntn); // Creation NTuple 575 539 } … … 624 588 // Pas de remise a zero ! h2->Zero(); 625 589 } else { 626 c har* ntn[3]= {"hxval", "hyval", "hwt"};590 const char* ntn[3]= {"hxval", "hyval", "hwt"}; 627 591 nt = new NTuple(3,ntn); // Creation NTuple 628 592 } … … 688 652 hp_already_exist = true; 689 653 } else { 690 c har* ntn[3]= {"hxval", "hyval", "hwt"};654 const char* ntn[3]= {"hxval", "hyval", "hwt"}; 691 655 nt = new NTuple(3,ntn); // Creation NTuple 692 656 } … … 741 705 } 742 706 743 c har* ntn[2]= {"vi", "vv"};707 const char* ntn[2]= {"vi", "vv"}; 744 708 NTuple* nt = new NTuple(2,ntn); // Creation NTuple 745 709 … … 790 754 } 791 755 792 c har* ntn[3]= {"mi", "mj", "mv"};756 const char* ntn[3]= {"mi", "mj", "mv"}; 793 757 NTuple* nt = new NTuple(3,ntn); // Creation NTuple 794 758 … … 836 800 // if (nomvec.length() < 1) nomvec = "/tmp/expvec"; 837 801 838 c har* ntn[2]= {"vecval", "vecwt"};802 const char* ntn[2]= {"vecval", "vecwt"}; 839 803 nt = new NTuple(1,ntn); // Creation NTuple 840 804 … … 933 897 } 934 898 if (nt == NULL) { 935 c har* ntn[4]= {"x", "y","z","t"};899 const char* ntn[4]= {"x", "y","z","t"}; 936 900 nt = new NTuple(4,ntn); // Creation NTuple 937 901 fgnnt = true; … … 987 951 } 988 952 if (nt == NULL) { 989 c har* ntn[4]= {"x", "y","z","t"};953 const char* ntn[4]= {"x", "y","z","t"}; 990 954 nt = new NTuple(4,ntn); // Creation NTuple 991 955 fgnnt = true; … … 1016 980 } 1017 981 } 1018 #ifdef SANS_EVOLPLANCK1019 CATCH(merr) {1020 fflush(stdout);1021 cout << endl;1022 cerr << endl;1023 string es = PeidaExc(merr);1024 cerr << "Services2NObjMgr::FillNTFrCFile() Exception :" << merr << es;1025 } ENDTRY;1026 #else1027 982 catch ( PException exc ) { 1028 983 fflush(stdout); … … 1031 986 cerr << "Services2NObjMgr::FillNTFrCFile() Exception :" << exc.Msg() << endl; 1032 987 } 1033 #endif1034 988 1035 989 if (adel) delete objnt; // Delete de l'objet NTupleInterface si necessaire … … 1154 1108 1155 1109 // Creation NTuple Buffer 1156 c har* ntn[4]= {"x","y","f","e"};1110 const char* ntn[4]= {"x","y","f","e"}; 1157 1111 NTuple*nt = new NTuple(4,ntn); 1158 1112 … … 1301 1255 } 1302 1256 } 1303 #ifdef SANS_EVOLPLANCK1304 CATCH(merr) {1305 fflush(stdout);1306 cout << endl;1307 cerr << endl;1308 string es = PeidaExc(merr);1309 cerr << "Services2NObjMgr::ComputeExpressions() Exception :" << merr << es;1310 } ENDTRY;1311 #else1312 1257 catch ( PException exc ) { 1313 1258 fflush(stdout); … … 1316 1261 cerr << "Services2NObjMgr::ComputeExpressions() Exception :" << exc.Msg() << endl; 1317 1262 } 1318 #endif1319 1263 1320 1264 if (adel) delete objnt; // Delete de l'objet NTupleInterface si necessaire … … 1473 1417 1474 1418 1475 1476 1477 // SANS_EVOLPLANCK Attention ! 1478 #ifdef SANS_EVOLPLANCK 1479 #include "pclassids.h" 1480 1481 /* --Methode-- */ 1482 char* Services2NObjMgr::PClassIdToClassName(int cid) 1483 { 1484 switch (cid) { 1485 case ClassId_Poly1 : 1486 return("Poly1"); 1487 case ClassId_Poly2 : 1488 return("Poly2"); 1489 case ClassId_Matrix : 1490 return("Matrix"); 1491 case ClassId_Vector : 1492 return("Vector"); 1493 1494 case ClassId_DVList : 1495 return("DVList"); 1496 1497 case ClassId_Histo1D : 1498 return("Histo1D"); 1499 case ClassId_Histo2D : 1500 return("Histo2D"); 1501 case ClassId_HProf : 1502 return("HProf"); 1503 case ClassId_HistoErr : 1504 return("HistoErr"); 1505 case ClassId_NTuple : 1506 return("NTuple"); 1507 case ClassId_XNTuple : 1508 return("XNTuple"); 1509 case ClassId_GeneralFitData : 1510 return("GeneralFitData"); 1511 1512 case ClassId_Image : 1513 return("RzImage"); 1514 case ClassId_Image + kuint_1 : 1515 return("ImageU1"); 1516 case ClassId_Image + kint_1 : 1517 return("ImageI1"); 1518 case ClassId_Image + kuint_2 : 1519 return("ImageU2"); 1520 case ClassId_Image + kint_2 : 1521 return("ImageI2"); 1522 case ClassId_Image + kuint_4 : 1523 return("ImageU4"); 1524 case ClassId_Image + kint_4 : 1525 return("ImageI4"); 1526 case ClassId_Image + kr_4 : 1527 return("ImageR4"); 1528 case ClassId_Image + kr_8 : 1529 return("ImageR8"); 1530 case ClassId_ZFidu : 1531 return("ZFidu"); 1532 1533 case ClassId_StarList : 1534 return("StarList"); 1535 case ClassId_Transfo : 1536 return("Transfo"); 1537 case ClassId_PSF : 1538 return("PSF"); 1539 1540 1541 // - Ajout objet PPF 1542 default: 1419 const char* Services2NObjMgr::PClassIdToClassName(int cid) 1420 { 1543 1421 return("AnyDataObj"); 1544 } 1545 } 1546 1547 #else 1548 char* Services2NObjMgr::PClassIdToClassName(int cid) 1549 { 1550 return("AnyDataObj"); 1551 } 1552 #endif 1422 }
Note:
See TracChangeset
for help on using the changeset viewer.