Changeset 544 in Sophya for trunk/SophyaPI/PIext/pintuple.cc


Ignore:
Timestamp:
Nov 3, 1999, 7:18:23 PM (26 years ago)
Author:
ercodmgr
Message:

Documentation + ameliorations DrawStats + vector->tvector pour Planck - Reza 3/11/99

File:
1 edited

Legend:

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

    r537 r544  
    3434//++
    3535// PINTuple(NTupleInterface* nt, bool ad)
    36 //      Cosntructeur. Si "ad == true", l'objet "nt" est détruit par
     36//      Constructeur. Si "ad == true", l'objet "nt" est détruit par
    3737//      le destructeur de l'objet "PINTuple"
    38 //      Note : nt doit être créé par new
     38//      Note : "nt" doit être créé par new
    3939//--
    4040 
     
    4545  mNT = nt;
    4646  mAdDO = ad;
     47  SetStats(true);
    4748  SelectXY(NULL, NULL);
    4849  SelectWt(NULL, 1);
     
    194195}
    195196
    196 /*
    197 sprintf(buff, "NTuple:  NEntry= %d  NDisp= %d", (int)mNT->NEntry(), nok);
    198 g->BaseGraphic()->DrawString(15,15,buff);
    199 */
     197if (stats) { // Trace de stats
     198  char label[64];
     199  sprintf(label, "Nd= %d/ Ntot= %d", nok, mNT->NbLines());
     200  g->SelFontSz((YMax() - YMin())/25, mFAtt); 
     201  PIGrCoord a,d;
     202  double cH = (double)g->GetFontHeight(a,d);
     203  double cellHeight = cH * 1.4;
     204  double cellWidth =  (double)g->CalcStringWidth(label) * 1.1;
     205  g->DrawLine(XMax() - cellWidth, YMax(),
     206                       XMax() - cellWidth, YMax() - cellHeight);
     207  g->DrawLine(XMax() - cellWidth, YMax() - cellHeight,
     208                       XMax()            , YMax() - cellHeight);
     209  g->DrawString(XMax() - cellWidth*0.95, YMax() - cH*1.2, label);
     210}
     211
    200212return;
    201213}
Note: See TracChangeset for help on using the changeset viewer.