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

Last change on this file since 3135 was 3135, checked in by cmv, 19 years ago

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

File size: 1.4 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe traceur d histogramme 96-99
3// C. Magneville / R. Ansari 2000-2007
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
6#ifndef PIHISTO_H
7#define PIHISTO_H
8
9#include "pidrawer.h"
10#include "phistwrapper.h"
11
12
13class PIHisto : public PIDrawer {
14public:
15 PIHisto(P1DHistoWrapper* histowp, bool ad=true);
16 virtual ~PIHisto();
17 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
18 virtual void UpdateLimits();
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 }
29
30// Methode de decodage des options
31 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
32 virtual int OptionToString(vector<string> & opt) const;
33 virtual void GetOptionsHelpInfo(string& info);
34
35// Renvoie une distance au point x,y
36 virtual double GetDistanceToPoint(double x, double y);
37
38protected:
39 virtual void DrawStats(PIGraphicUC* g);
40 P1DHistoWrapper* mHistoWp;
41 bool mAdDO;
42 bool stats,filled;
43 short error,todraw;
44 float spoX, spoY; // Stat pos offset par rapport a position defaut
45};
46
47#endif
Note: See TracBrowser for help on using the repository browser.