Changeset 2679 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Apr 19, 2005, 4:02:39 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/servnobjm.cc
r2668 r2679 506 506 NTuple* nt = NULL; 507 507 AnyDataObj* oh = NULL; 508 bool h1_already_exist = false; 508 509 if (nomh1.length() > 0) oh=MyObjMgr()->GetObj(nomh1); 509 510 else nomh1 = "/tmp/projh1d"; 510 if ( (oh != NULL) && (typeid(*oh) == typeid(Histo)) ) h1 = (Histo*)oh; // Pas de remise a zero ! h1->Zero(); 511 else { 511 if ( (oh != NULL) && (typeid(*oh) == typeid(Histo)) ) { 512 h1 = (Histo*)oh; 513 h1_already_exist = true; 514 // Pas de remise a zero ! h1->Zero(); 515 } else { 512 516 char* ntn[2]= {"hxval", "hwt"}; 513 517 nt = new NTuple(2,ntn); // Creation NTuple … … 536 540 } 537 541 538 MyObjMgr()->DisplayObj(nomh1, dopt);542 if(!h1_already_exist) MyObjMgr()->DisplayObj(nomh1, dopt); 539 543 return; 540 544 } … … 555 559 NTuple* nt = NULL; 556 560 AnyDataObj* oh = NULL; 561 bool h2_already_exist = false; 557 562 if (nomh2.length() > 0) oh=MyObjMgr()->GetObj(nomh2); 558 563 else nomh2 = "/tmp/projh2d"; 559 if ( (oh != NULL) && (typeid(*oh) == typeid(Histo2D)) ) h2 = (Histo2D*)oh; // Pas de remise a zero ! h2->Zero(); 560 else { 564 if ( (oh != NULL) && (typeid(*oh) == typeid(Histo2D)) ) { 565 h2 = (Histo2D*)oh; 566 h2_already_exist = true; 567 // Pas de remise a zero ! h2->Zero(); 568 } else { 561 569 char* ntn[3]= {"hxval", "hyval", "hwt"}; 562 570 nt = new NTuple(3,ntn); // Creation NTuple … … 586 594 } 587 595 588 MyObjMgr()->DisplayObj(nomh2, dopt);596 if(!h2_already_exist) MyObjMgr()->DisplayObj(nomh2, dopt); 589 597 return; 590 598 … … 616 624 NTuple* nt = NULL; 617 625 AnyDataObj* oh = NULL; 626 bool hp_already_exist = false; 618 627 if (nomprof.length() > 0) oh=MyObjMgr()->GetObj(nomprof); 619 628 else nomprof = "/tmp/projprof"; 620 if( (oh!=NULL) && (typeid(*oh) == typeid(HProf)) ) hprof = (HProf*)oh; 621 else { 629 if( (oh!=NULL) && (typeid(*oh) == typeid(HProf)) ) { 630 hprof = (HProf*)oh; 631 hp_already_exist = true; 632 } else { 622 633 char* ntn[3]= {"hxval", "hyval", "hwt"}; 623 634 nt = new NTuple(3,ntn); // Creation NTuple … … 647 658 hprof->UpdateHisto(); 648 659 649 MyObjMgr()->DisplayObj(nomprof, dopt);660 if(!hp_already_exist) MyObjMgr()->DisplayObj(nomprof, dopt); 650 661 return; 651 662 }
Note:
See TracChangeset
for help on using the changeset viewer.