Changeset 2679 in Sophya for trunk/SophyaPI/PIext


Ignore:
Timestamp:
Apr 19, 2005, 4:02:39 PM (20 years ago)
Author:
cmv
Message:

Pour que le n/proj ne dessine plus cmv 19/04/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/servnobjm.cc

    r2668 r2679  
    506506NTuple* nt = NULL;
    507507AnyDataObj* oh = NULL;
     508bool h1_already_exist = false;
    508509if (nomh1.length() > 0) oh=MyObjMgr()->GetObj(nomh1);
    509510else nomh1 = "/tmp/projh1d";
    510 if ( (oh != NULL) && (typeid(*oh) == typeid(Histo)) )  h1 = (Histo*)oh;  // Pas de remise a zero ! h1->Zero();
    511 else {
     511if ( (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 {
    512516  char* ntn[2]= {"hxval", "hwt"};
    513517  nt = new NTuple(2,ntn);  // Creation NTuple
     
    536540  }
    537541
    538 MyObjMgr()->DisplayObj(nomh1, dopt);
     542if(!h1_already_exist) MyObjMgr()->DisplayObj(nomh1, dopt);
    539543return; 
    540544}
     
    555559NTuple* nt = NULL;
    556560AnyDataObj* oh = NULL;
     561bool h2_already_exist = false;
    557562if (nomh2.length() > 0)  oh=MyObjMgr()->GetObj(nomh2);
    558563else nomh2 = "/tmp/projh2d";
    559 if ( (oh != NULL) && (typeid(*oh) == typeid(Histo2D)) )  h2 = (Histo2D*)oh;  // Pas de remise a zero ! h2->Zero();
    560 else {
     564if ( (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 {
    561569  char* ntn[3]= {"hxval", "hyval", "hwt"};
    562570  nt = new NTuple(3,ntn);  // Creation NTuple
     
    586594  }
    587595
    588 MyObjMgr()->DisplayObj(nomh2, dopt);
     596if(!h2_already_exist) MyObjMgr()->DisplayObj(nomh2, dopt);
    589597return; 
    590598
     
    616624NTuple* nt = NULL;
    617625AnyDataObj* oh = NULL;
     626bool hp_already_exist = false;
    618627if (nomprof.length() > 0)  oh=MyObjMgr()->GetObj(nomprof);
    619628else nomprof = "/tmp/projprof";
    620 if( (oh!=NULL) && (typeid(*oh) == typeid(HProf)) )  hprof = (HProf*)oh;
    621 else {
     629if( (oh!=NULL) && (typeid(*oh) == typeid(HProf)) ) {
     630  hprof = (HProf*)oh;
     631  hp_already_exist = true;
     632} else {
    622633  char* ntn[3]= {"hxval", "hyval", "hwt"};
    623634  nt = new NTuple(3,ntn);  // Creation NTuple
     
    647658hprof->UpdateHisto();
    648659
    649 MyObjMgr()->DisplayObj(nomprof, dopt);
     660if(!hp_already_exist) MyObjMgr()->DisplayObj(nomprof, dopt);
    650661return;
    651662}
Note: See TracChangeset for help on using the changeset viewer.