source: Sophya/trunk/SophyaPI/PIext/pihisto.h@ 3132

Last change on this file since 3132 was 3125, checked in by ansari, 19 years ago

1/ Introduction d'une classe P1DHistoWrapper (fichier phistwrapper.h) pour rendre PIHisto independant de SOPHYA et des objets Histo, HistErr, HProf ...
2/ Ecriture du wrapper/adaptateur pour SOPHYA::Histo,HProf,HistErr
3/ mise en conformite des ObjAdapter piapp pour Histo,HistErr, chgt numero de version

Reza 11/01/2007

File size: 1.6 KB
RevLine 
[544]1// This may look like C code, but it is really -*- C++ -*-
2// Classe traceur d histogramme 96-99
[3125]3// C. Magneville / R. Ansari 2000-2007
[544]4// CEA-DAPNIA LAL-IN2P3/CNRS
[3125]5
[165]6#ifndef PIHISTO_H
7#define PIHISTO_H
8
9#include "pidrawer.h"
[3125]10#include "phistwrapper.h"
[165]11
[3125]12
[165]13class PIHisto : public PIDrawer {
14public:
[3125]15 PIHisto(P1DHistoWrapper* histo, bool ad=true);
[165]16 virtual ~PIHisto();
[205]17 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
[165]18 virtual void UpdateLimits();
[2229]19 inline void SetStats(bool fg=true) {stats=fg;}
[2383]20 inline void SetStatPosOffset(float ofx=-0.01, float ofy=-0.01)
[2523]21 {spoX=ofx; spoY=ofy; }
[2229]22 // fg=-1 pas de barre d'erreur, 1=barres d'erreurs,
23 // 0=barres d'erreurs automatiques: trace si HProf ou markeur demande
[2469]24 inline void SetError(short fg=0) {error=fg;}
[2517]25 inline void SetFilled(bool fg=false) {filled=fg;}
[3125]26 inline P1DHistoWrapper* HistoWrapper() {return(mHisto);}
[165]27
[1971]28// Methode de decodage des options
29 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
[2523]30 virtual int OptionToString(vector<string> & opt) const;
[2229]31 virtual void GetOptionsHelpInfo(string& info);
[1971]32
[2517]33// Renvoie une distance au point x,y
34 virtual double GetDistanceToPoint(double x, double y);
35
[165]36protected:
[544]37 virtual void DrawStats(PIGraphicUC* g);
[3125]38 P1DHistoWrapper* mHisto;
[165]39 bool mAdDO;
[2517]40 bool stats,filled;
[2469]41 short error;
[2383]42 float spoX, spoY; // Stat pos offset par rapport a position defaut
[165]43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.