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

Last change on this file since 2952 was 2523, checked in by cmv, 22 years ago

OptionToString cmv 19/03/04

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