Changeset 3135 in Sophya for trunk/SophyaPI/PIext/pihisto.h


Ignore:
Timestamp:
Jan 12, 2007, 7:36:32 PM (19 years ago)
Author:
cmv
Message:

suite du display des HistoErr avec Wrapper cmv 12/01/07

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pihisto.h

    r3125 r3135  
    1313class PIHisto : public PIDrawer {
    1414public:
    15                      PIHisto(P1DHistoWrapper* histo, bool ad=true);
     15                     PIHisto(P1DHistoWrapper* histowp, bool ad=true);
    1616  virtual           ~PIHisto();
    1717  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
    1818  virtual void       UpdateLimits();
    19   inline  void       SetStats(bool fg=true) {stats=fg;}
    20   inline  void       SetStatPosOffset(float ofx=-0.01, float ofy=-0.01)
    21                                      {spoX=ofx; spoY=ofy; }
    22   // fg=-1 pas de barre d'erreur, 1=barres d'erreurs,
    23   // 0=barres d'erreurs automatiques: trace si HProf ou markeur demande
    24   inline  void       SetError(short fg=0) {error=fg;}
    25   inline  void       SetFilled(bool fg=false) {filled=fg;}
    26   inline  P1DHistoWrapper*     HistoWrapper() {return(mHisto);}
     19
     20  inline  P1DHistoWrapper*     HistoWrapper() {return(mHistoWp);}
     21
     22//   ce qu'on plot
     23  double DrawVal(int_4 i) {
     24    if(todraw==1) return mHistoWp->Value(i);
     25    if(todraw==2) return mHistoWp->Error(i);
     26    if(todraw==3) return mHistoWp->NbEntries(i);
     27    return (*mHistoWp)(i);
     28  }
    2729
    2830//   Methode de decodage des options
     
    3638protected:
    3739  virtual void       DrawStats(PIGraphicUC* g);
    38   P1DHistoWrapper*   mHisto;
     40  P1DHistoWrapper*   mHistoWp;
    3941  bool mAdDO;
    4042  bool stats,filled;
    41   short error;
     43  short error,todraw;
    4244  float spoX, spoY; // Stat pos offset par rapport a position defaut
    4345};
Note: See TracChangeset for help on using the changeset viewer.