| [344] | 1 | // This may look like C code, but it is really -*- C++ -*-
 | 
|---|
 | 2 | // Module PI : Peida Interactive  PINTuple et PINTupleWdg
 | 
|---|
 | 3 | // Traceur d objet de type NTupleInterface
 | 
|---|
 | 4 | 
 | 
|---|
| [165] | 5 | #ifndef PINTUPLE_H
 | 
|---|
 | 6 | #define PINTUPLE_H
 | 
|---|
 | 7 | 
 | 
|---|
| [326] | 8 | #include "ntupintf.h"
 | 
|---|
| [165] | 9 | #include "pidrawer.h"
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 | class PINTuple : public PIDrawer {
 | 
|---|
 | 12 | public:
 | 
|---|
| [326] | 13 |                      PINTuple(NTupleInterface* nt, bool ad);
 | 
|---|
| [165] | 14 |   virtual           ~PINTuple();
 | 
|---|
 | 15 |   
 | 
|---|
| [1971] | 16 | 
 | 
|---|
| [205] | 17 |   virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
 | 
|---|
| [165] | 18 |   virtual void       UpdateLimits();
 | 
|---|
 | 19 |   
 | 
|---|
| [344] | 20 |   virtual void       SelectXY(const char* px, const char* py);
 | 
|---|
| [2373] | 21 |   virtual void       SelectWt(const char* pw=NULL);
 | 
|---|
| [344] | 22 |   virtual void       SelectErrBar(const char* erbx=NULL, const char* erby=NULL);
 | 
|---|
| [486] | 23 |   virtual void       SelectLabel(const char* plabel=NULL);
 | 
|---|
| [165] | 24 | 
 | 
|---|
| [2350] | 25 |   inline  void       ConnectPoints(bool fg=false) { connectPts = fg; }
 | 
|---|
 | 26 | 
 | 
|---|
| [2373] | 27 |   // Gestion de la representation de poids
 | 
|---|
 | 28 |   inline  void       UseSizeScale(bool fg=true, int nbins=5)
 | 
|---|
 | 29 |     { mrkSzScale = fg; if (nbins>0) nWbins = nbins; }
 | 
|---|
 | 30 |   inline  void       UseColorScale(bool fg=true) { colorScale = fg; }
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 |   inline  bool       GetSizeScale(int& nbins) 
 | 
|---|
 | 33 |     { nbins = nWbins; return mrkSzScale; }
 | 
|---|
 | 34 |   inline  bool       GetColScale() { return colorScale; }
 | 
|---|
 | 35 | 
 | 
|---|
 | 36 |   inline  void       SetStats(bool fg=true) { stats = fg; }
 | 
|---|
| [3149] | 37 |   inline  void       SetStatPosOffset(double ofx=-0.01, double ofy=-0.01) 
 | 
|---|
| [2383] | 38 |           {spoX=ofx; spoY=ofy; }
 | 
|---|
| [2373] | 39 | 
 | 
|---|
| [344] | 40 |   virtual void       AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
 | 
|---|
| [1971] | 41 | 
 | 
|---|
 | 42 | //   Methode de decodage des options
 | 
|---|
 | 43 |   virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
 | 
|---|
| [2524] | 44 |   virtual int        OptionToString(vector<string> & opt) const;
 | 
|---|
| [1975] | 45 | //   Texte d'aide des options disponibles
 | 
|---|
 | 46 |   virtual void       GetOptionsHelpInfo(string& info);
 | 
|---|
| [2517] | 47 | 
 | 
|---|
 | 48 | // Renvoie une distance au point x,y
 | 
|---|
 | 49 |   virtual double     GetDistanceToPoint(double x, double y);
 | 
|---|
| [165] | 50 |        
 | 
|---|
 | 51 | protected:
 | 
|---|
| [326] | 52 |   NTupleInterface* mNT;
 | 
|---|
| [165] | 53 |   bool mAdDO;
 | 
|---|
 | 54 |   int xK, yK;          // Index du nom de variable en X/Y ds le ntuple
 | 
|---|
 | 55 |   int xebK, yebK;      // Index du nom de variable en ErrBarX/Y ds le ntuple
 | 
|---|
| [333] | 56 |   int wK;              // Index du nom de variable poids
 | 
|---|
| [486] | 57 |   int lK;              // Index du nom de variable label (affiche en texte)
 | 
|---|
| [2373] | 58 |   double wMin, wMax;   // Valeurs de poids min/max
 | 
|---|
 | 59 |   bool mrkSzScale;     // true -> Taille de markers variable suivant poids
 | 
|---|
 | 60 |   int nWbins;          // Nombre de bins taille de marker variable
 | 
|---|
 | 61 |   bool colorScale;     // true -> Couleur de marker variable suivant poids
 | 
|---|
| [544] | 62 |   bool stats;               // true -> indication du nb de points
 | 
|---|
| [2350] | 63 |   bool connectPts;          // true -> les points sont relies par une ligne
 | 
|---|
| [3149] | 64 |   double spoX, spoY; // Stat pos offset par rapport a position defaut
 | 
|---|
| [2517] | 65 |   long NptDraw; // nombre de points effectivement dessines dans la fenetre
 | 
|---|
| [165] | 66 | };
 | 
|---|
 | 67 | 
 | 
|---|
 | 68 | #endif
 | 
|---|
 | 69 | 
 | 
|---|
 | 70 | 
 | 
|---|
 | 71 | 
 | 
|---|
 | 72 | 
 | 
|---|