Changeset 1035 in Sophya for trunk


Ignore:
Timestamp:
Jun 7, 2000, 3:04:24 PM (25 years ago)
Author:
ercodmgr
Message:
  • creation comm newprofe pour profile avec erreur sur mean
  • correction petit bug n/plot pour increment nom histo 1d paw_n_plot1D_??? dans le cas ou on veut faire

"n/plot ..." puis "n/plot ... same"

cmv 7/6/2000

Location:
trunk/SophyaPI/PIext
Files:
3 edited

Legend:

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

    r769 r1035  
    237237  mObjMgr->AddObj(h, tokens[0]);
    238238  }
    239 else if (kw == "newprof") {
     239else if (kw == "newprof" || kw == "newprofe") {
    240240  if (tokens.size() < 4)
    241     { cout << "Usage: newprof name xmin xmax nbin [ymin ymax]" << endl; return(0); }
     241    { cout << "Usage: newprof[e] name xmin xmax nbin [ymin ymax]" << endl; return(0); }
    242242  int nbx;
    243243  float xmin, xmax, ymin = 1., ymax = -1.;
     
    249249  xmin = atof(tokens[1].c_str());   xmax = atof(tokens[2].c_str());
    250250  HProf* h = new HProf(xmin, xmax, nbx, ymin, ymax);
     251  if(kw == "newprofe") h->SetErrOpt(false);
    251252  mObjMgr->AddObj(h, tokens[0]);
    252253  }
     
    815816kw = "newh1d";
    816817usage = "Creates a 1D histogramm \n Usage: newh1d name xmin xmax nbin";
    817 usage += "\n  Related commands: newh2d  newprof newnt  newgfd "; 
     818usage += "\n  Related commands: newh2d  newprof[e] newnt  newgfd "; 
    818819mpiac->RegisterCommand(kw, usage, this, "Objects");
    819820kw = "newh2d";
    820821usage = "Creates a 2D histogramm \n Usage: newh2d name xmin xmax nbinx ymin ymax nbiny";
    821 usage += "\n  Related commands: newh1d  newprof newnt  newgfd "; 
     822usage += "\n  Related commands: newh1d  newprof[e] newnt  newgfd "; 
    822823mpiac->RegisterCommand(kw, usage, this, "Objects");
    823824kw = "newprof";
    824825usage = "Creates a profile histogramm \n Usage: newprof name xmin xmax nbin [ymin ymax]";
    825 usage += "\n  Related commands: newh1d  newh2d newnt newgfd "; 
     826usage += "\n  Errors represent the data spread in the X bin "; 
     827usage += "\n  Related commands: newh1d  newh2d newprofe newnt newgfd "; 
     828mpiac->RegisterCommand(kw, usage, this, "Objects");
     829kw = "newprofe";
     830usage = "Creates a profile histogramm \n Usage: newprofe name xmin xmax nbin [ymin ymax]";
     831usage += "\n  Errors represent the error on the data mean in the X bin "; 
     832usage += "\n  Related commands: newh1d  newh2d newprof newnt newgfd "; 
    826833mpiac->RegisterCommand(kw, usage, this, "Objects");
    827834kw = "newnt";
    828835usage = "Creates a ntuple \n Usage: newnt name v1 v2 v3 .. vn";
    829836usage += "\n        newnt name nvar"; 
    830 usage += "\n  Related commands: newh1d  newh2d newprof newgfd "; 
     837usage += "\n  Related commands: newh1d  newh2d newprof[e] newgfd "; 
    831838mpiac->RegisterCommand(kw, usage, this, "Objects");
    832839kw = "newgfd";
    833840usage = "Creates GeneralFit Data object \n Usage: newgfd nvar nalloc [errx(0/1)]";
    834 usage += "\n  Related commands: newh1d  newh2d  newprof newnt "; 
     841usage += "\n  Related commands: newh1d  newh2d  newprof[e] newnt "; 
    835842mpiac->RegisterCommand(kw, usage, this, "Objects");
    836843kw = "newvec";
  • trunk/SophyaPI/PIext/pawexecut.cc

    r815 r1035  
    2626
    2727/* Reza + cmv  13/10/99 */
     28
     29uint_4 PAWExecutor::autoc_counter_ = 0;
    2830
    2931/* methode */
     
    173175if(tokens.size() < 1) {
    174176  cout
    175   <<"Usage: n/plot nameobj.x_exp [cut] [w_exp] [loop] [gratt]"<<endl
     177  <<"Usage: n/plot nameobj.x_exp [cut] [w_exp] [loop] [gratt] [nomh1]"<<endl
    176178  <<"       n/plot nameobj.y_exp%x_exp [cut] [loop] [gratt]"<<endl
    177179  <<"       n/plot nameobj.z_exp%y_exp%x_exp [cut] [loop] [gratt]"<<endl
     
    181183string nameobj,expx,expy,expz;
    182184int nvar = decodepawstring(tokens[0],nameobj,expx,expy,expz);
    183 string expcut = "1"; string expwt = "1."; string loop = ""; string dopt = "";
     185string expcut = "1"; string expwt = "1."; string loop = "";
     186string dopt = ""; string nameproj="";
    184187if(tokens.size()>=2) expcut = tokens[1]; if(expcut=="!") expcut="1";
    185188
     
    190193  cout<<"PAWExecutor::n_plot Error: bad coding "<<tokens[0]<<endl;
    191194} else if(nvar==1) { // c'est un plot 1D
    192   if(tokens.size()>=3) expwt = tokens[2]; if(expwt=="!") expwt="1.";
    193   if(tokens.size()>=4) loop  = tokens[3]; if(loop=="!") loop="";
    194   if(tokens.size()>=5) dopt  = tokens[4];
    195   string nameproj = "/autoc/paw_n_plot1D";
    196   AnyDataObj* mobj = omg.GetObj(nameproj);
    197   //  if(mobj!=NULL) omg.DelObj(nameproj);  $CHECK$ Reza 12/12/99 - clean auto
     195  if(tokens.size()>=3) expwt    = tokens[2]; if(expwt=="!") expwt="1.";
     196  if(tokens.size()>=4) loop     = tokens[3]; if(loop=="!") loop="";
     197  if(tokens.size()>=5) dopt     = tokens[4]; if(dopt=="!") dopt="";
     198  if(tokens.size()>=6) nameproj = tokens[5];
     199  if(nameproj.length()<=0 || nameproj=="!") {
     200    nameproj = "/autoc/paw_n_plot1D_";
     201    AnyDataObj* mobj = omg.GetObj(nameproj);
     202    if(mobj!=NULL) {
     203      char buff[16]; autoc_counter_++; sprintf(buff,"%d",autoc_counter_);
     204      nameproj += buff;
     205    }
     206  }
    198207  srvo->ProjectH1(nameobj,expx,expwt,expcut,nameproj,dopt,loop);
    199208} else if(nvar==2) { // c'est un plot 2D
  • trunk/SophyaPI/PIext/pawexecut.h

    r466 r1035  
    3232                      ,string& xexp,string& yexp,string& zexp);
    3333  PIStdImgApp* mApp;
     34  static uint_4 autoc_counter_;
    3435};
    3536
Note: See TracChangeset for help on using the changeset viewer.