Changeset 1884 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Jan 22, 2002, 4:56:12 PM (24 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto2d.cc
r1883 r1884 351 351 352 352 //++ 353 void PIHisto2D::GetClickInfo(string& info, double x, double y)353 void PIHisto2D::GetClickInfo(string& info,double x,double y,double x0,double y0,bool fgdiff) 354 354 // 355 355 // Info specifique du drawer pour la position x,y 356 356 //-- 357 357 { 358 Histo2D* h = Histogram(); 359 if (h == NULL) return; 360 int i,j; 361 char str[128]; 362 363 h->FindBin(x,y,i,j); 364 if(i<0 || i>=h->NBinX() || j<0 || j>=h->NBinY()) info += " ???"; 365 else { 366 sprintf(str," v= %g",(*h)(i,j)); 367 info += str; 358 Histo2D* h = Histogram(); 359 if(h == NULL) return; 360 361 int i,j; 362 h->FindBin(x,y,i,j); 363 if(i>=0 && i<h->NBinX() && j>=0 && j<h->NBinY()) { 364 char str[64]; 365 if(fgdiff) { 366 int i0,j0; 367 h->FindBin(x0,y0,i0,j0); 368 if(i0>=0 && i0<h->NBinX() && j0>=0 && j0<h->NBinY()) { 369 sprintf(str," DV=%g",(*h)(i,j)-(*h)(i0,j0)); 370 info += str; 371 } else { 372 info += " DV=?"; 373 } 368 374 } 369 return; 375 sprintf(str," V=%g",(*h)(i,j)); 376 info += str; 377 } else { 378 info += " V=?"; 379 } 380 381 return; 370 382 } 371 383 -
trunk/SophyaPI/PIext/pihisto2d.h
r1883 r1884 32 32 // AppendTextInfo a faire un jour - Reza 21/01/2002 33 33 // virtual void AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax); 34 virtual void GetClickInfo(string& info, double x, double y); // Info pour position X,Y 34 35 virtual void GetClickInfo(string& info, double x, double y 36 ,double x0=0.,double y0=0.,bool fgdiff=false); 35 37 36 38 virtual void UpdateLimits();
Note:
See TracChangeset
for help on using the changeset viewer.