Changeset 544 in Sophya


Ignore:
Timestamp:
Nov 3, 1999, 7:18:23 PM (26 years ago)
Author:
ercodmgr
Message:

Documentation + ameliorations DrawStats + vector->tvector pour Planck - Reza 3/11/99

Location:
trunk/SophyaPI/PIext
Files:
11 edited

Legend:

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

    r463 r544  
    88
    99#include "nomgadapter.h"
     10
     11#ifdef SANS_EVOLPLANCK
    1012#include "matrix.h"
    1113#include "cvector.h"
     14#else
     15#include "tmatrix.h"
     16#include "tvector.h"
     17#endif
    1218
    1319//---------------------------------------------------------------
  • trunk/SophyaPI/PIext/pawexecut.cc

    r469 r544  
    66
    77#include "strutil.h"
    8 #include "cvector.h"
    9 #include "matrix.h"
    108#include "histos.h"
    119#include "histos.h"
     
    1816#include "servnobjm.h"
    1917#include "pistdimgapp.h"
     18
     19#ifdef SANS_EVOLPLANCK
     20#include "cvector.h"
     21#include "matrix.h"
     22#else
     23#include "tmatrix.h"
     24#include "tvector.h"
     25
     26#endif
    2027
    2128/* Reza + cmv  13/10/99 */
  • trunk/SophyaPI/PIext/piafitting.cc

    r495 r544  
    1717#include "fct1dfit.h"
    1818#include "fct2dfit.h"
    19 #include "matrix.h"
    20 #include "cvector.h"
    2119#include "ntuple.h"
    2220#include "cimage.h"
     
    2523#include "ntuple.h"
    2624#include "hisprof.h"
     25
     26#ifdef SANS_EVOLPLANCK
     27#include "matrix.h"
     28#include "cvector.h"
     29#else
     30#include "tmatrix.h"
     31#include "tvector.h"
     32#endif
    2733
    2834#include "piafitting.h"
  • trunk/SophyaPI/PIext/pihisto.cc

    r295 r544  
     1// Classe traceur d histogramme                 96-99
     2// CEA-DAPNIA      LAL-IN2P3/CNRS
     3
    14#include <stdio.h>
    25#include <typeinfo>
     
    58#include "hisprof.h"
    69
     10//++
     11// Class        PIHisto
     12// Lib          PIext
     13// include      pihisto.h
     14//
     15//      Classe traceur d'objet histogramme (classe *Histo*)
     16//--
     17//++
     18// Links        Parents
     19// PIDrawer
     20//--
     21//++
     22// Titre        Constructeur, méthodes
     23//--
     24//++
     25// PIHisto(Histo* histo, bool ad=false)
     26//      Constructeur. Si "ad == true", l'objet "histo" est détruit par
     27//      le destructeur de l'objet "PIHisto"
     28//      Note : "histo" doit être créé par new
     29//
     30// void  SetStats(bool fg=true)
     31//      Active/ désactive l'indication des statistiques d'histogramme
     32//--
     33
     34
    735PIHisto::PIHisto(Histo* histo, bool ad)
    836: PIDrawer(), mHisto(histo)
    937{
    1038  mAdDO = ad;     // Flag pour suppression automatique de mHisto
     39  SetStats(true);
    1140}
    1241
     
    96125  }
    97126  // A faire a la fin - DrawStats change l'attribut de ligne
    98   DrawStats(g);
     127  if (stats) DrawStats(g);
    99128}
    100129
     
    105134  //  if (mLAtt == PI_NotDefLineAtt)  g->SelLine(PI_ThinLine);
    106135  g->SelLine(PI_ThinLine);
    107   double cellHeight = (YMax() - YMin()) * 0.05;
    108   double cellWidth  = (XMax() - XMin()) * 0.23;
     136  g->SelFontSz((YMax() - YMin())/25, mFAtt);
     137//  double cellHeight = (YMax() - YMin()) * 0.05;
     138  PIGrCoord a, d;
     139  double cH = (double)g->GetFontHeight(a,d);
     140  double cellHeight = cH * 3.8;
     141//  double cellWidth  = (XMax() - XMin()) * 0.23;
     142  char label[50];
     143  sprintf(label, "N= %.8g    ", mHisto->NData());
     144  label[11] ='\0';
     145  double cellWidth =  (double)g->CalcStringWidth(label) * 1.1;
    109146  g->DrawLine(XMax() - cellWidth, YMax(),
    110147                       XMax() - cellWidth, YMax() - cellHeight);
    111148  g->DrawLine(XMax() - cellWidth, YMax() - cellHeight,
    112149                       XMax()            , YMax() - cellHeight);
    113   char label[50];
    114   sprintf(label, "N = %.6g", mHisto->NData());
    115   g->SelFontSz((YMax() - YMin())/30);
    116   g->DrawString(XMax() - cellWidth*0.9, YMax() - cellHeight*0.8, label);
     150  g->DrawString(XMax() - cellWidth*0.95, YMax() - cH*1.2, label);
     151  sprintf(label, "m= %.8g", mHisto->Mean());
     152  g->DrawString(XMax() - cellWidth*0.95, YMax() - cH*2.4, label);
     153  sprintf(label, "s= %.8g", mHisto->Sigma());
     154  g->DrawString(XMax() - cellWidth*0.95, YMax() - cH*3.6, label);
    117155                       
    118156}
  • trunk/SophyaPI/PIext/pihisto.h

    r205 r544  
     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
    14#ifndef PIHISTO_H
    25#define PIHISTO_H
     
    1114  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
    1215  virtual void       UpdateLimits();
    13   virtual void       DrawStats(PIGraphicUC* g);
     16  inline  void       SetStats(bool fg=true) { stats = true; }
    1417  inline  Histo*     Histogram() { return(mHisto); }
    1518
    1619protected:
     20  virtual void       DrawStats(PIGraphicUC* g);
    1721  Histo* mHisto;
    1822  bool mAdDO;
     23  bool stats;        // true -> indication des stats d'histo
    1924};
    2025
  • trunk/SophyaPI/PIext/pihisto2d.cc

    r537 r544  
    328328  g->SelFontSz((YMax() - YMin())/30);
    329329  g->DrawString(XMax() - cellWidth*0.9, YMax() - cellHeight*0.8, label);
    330   printf("H[%d,%d] Dynamique: [%g,%g] Frac [%g,%g]\n"
    331         ,mHisto->NBinX(),mHisto->NBinY(),HMin(),HMax(),FMin(),FMax());
     330//  printf("H[%d,%d] Dynamique: [%g,%g] Frac [%g,%g]\n"
     331//        ,mHisto->NBinX(),mHisto->NBinY(),HMin(),HMax(),FMin(),FMax());
    332332}
    333333
  • trunk/SophyaPI/PIext/pintuple.cc

    r537 r544  
    3434//++
    3535// PINTuple(NTupleInterface* nt, bool ad)
    36 //      Cosntructeur. Si "ad == true", l'objet "nt" est détruit par
     36//      Constructeur. Si "ad == true", l'objet "nt" est détruit par
    3737//      le destructeur de l'objet "PINTuple"
    38 //      Note : nt doit être créé par new
     38//      Note : "nt" doit être créé par new
    3939//--
    4040 
     
    4545  mNT = nt;
    4646  mAdDO = ad;
     47  SetStats(true);
    4748  SelectXY(NULL, NULL);
    4849  SelectWt(NULL, 1);
     
    194195}
    195196
    196 /*
    197 sprintf(buff, "NTuple:  NEntry= %d  NDisp= %d", (int)mNT->NEntry(), nok);
    198 g->BaseGraphic()->DrawString(15,15,buff);
    199 */
     197if (stats) { // Trace de stats
     198  char label[64];
     199  sprintf(label, "Nd= %d/ Ntot= %d", nok, mNT->NbLines());
     200  g->SelFontSz((YMax() - YMin())/25, mFAtt); 
     201  PIGrCoord a,d;
     202  double cH = (double)g->GetFontHeight(a,d);
     203  double cellHeight = cH * 1.4;
     204  double cellWidth =  (double)g->CalcStringWidth(label) * 1.1;
     205  g->DrawLine(XMax() - cellWidth, YMax(),
     206                       XMax() - cellWidth, YMax() - cellHeight);
     207  g->DrawLine(XMax() - cellWidth, YMax() - cellHeight,
     208                       XMax()            , YMax() - cellHeight);
     209  g->DrawString(XMax() - cellWidth*0.95, YMax() - cH*1.2, label);
     210}
     211
    200212return;
    201213}
  • trunk/SophyaPI/PIext/pintuple.h

    r486 r544  
    2222  virtual void       SelectLabel(const char* plabel=NULL);
    2323
     24  inline  void       SetStats(bool fg=true) { stats = true; }
    2425  virtual void       AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
    2526       
     
    3334  double wMin, wMax;        // Valeurs de poids min/max
    3435  int nWbins;               // Nombre de bins pour le poids (Wt)
    35 
     36  bool stats;               // true -> indication du nb de points
    3637};
    3738
  • trunk/SophyaPI/PIext/pipodrw.h

    r495 r544  
    1010#include "pidrawer.h"
    1111#include "parradapter.h"
    12 #include "cvector.h"
    13 #include "matrix.h"
    1412#include "histos2.h"
    1513
    1614#ifdef SANS_EVOLPLANCK
     15#include "cvector.h"
     16#include "matrix.h"
    1717class GeneralFunction;
    1818#else
     19#include "tvector.h"
     20#include "tmatrix.h"
    1921namespace PlanckDPC {class GeneralFunction;}
    2022#endif
  • trunk/SophyaPI/PIext/pistlist.cc

    r344 r544  
     1// Classe traceur de StarList               97-99
     2// CEA-DAPNIA      LAL-IN2P3/CNRS
     3
    14#include <stdio.h>
    25#include "pistlist.h"
    36
    4  
     7//++
     8// Class        PIStarList
     9// Lib          PIext
     10// include      pistlist.h
     11//
     12//      Classe traceur d'objets de la classe *StarList*
     13//--
     14//++
     15// Links        Parents
     16// PIDrawer
     17//--
     18//++
     19// Titre        Constructeur
     20//--
     21
     22//++
     23//  PIStarList(StarList* stl, bool ad)
     24//      Constructeur. Si "ad == true", l'objet "stl" est détruit par
     25//      le destructeur de l'objet "PIStarList"
     26//      Note : "stl" doit être créé par new
     27//--
     28
    529/* --Methode-- */
    630PIStarList::PIStarList(StarList* stl, bool ad)
     
    1640  if (mAdDO && mStL)  delete mStL;
    1741}
     42
     43//++
     44// Titre        Méthodes
     45//--
     46//++
     47//  void  SetFluxLimits(float min=1., float max=-1., int nl=5, bool dispflx=false, bool refr=false)
     48//      Modifie les paramètres de visualisation (limites en flux). Si "dispflx==true"
     49//      les valeurs de flux sont affichées pour chaque étoile.
     50//  StarList*  StList()
     51//      Retourne l'objet "StarList" associé.
     52//  float FluxMin()
     53//      Retourne le paramètre de visualisation flux minimum
     54//  float FluxMax()
     55//      Retourne le paramètre de visualisation flux maximum
     56//--
    1857
    1958/* --Methode-- */
  • trunk/SophyaPI/PIext/servnobjm.cc

    r506 r544  
    1919#include "fct2dfit.h"
    2020
     21#ifdef SANS_EVOLPLANCK
    2122#include "matrix.h"
    2223#include "cvector.h"
     24#else
     25#include "tmatrix.h"
     26#include "tvector.h"
     27#endif
     28
    2329#include "ntuple.h"
    2430#include "cimage.h"
Note: See TracChangeset for help on using the changeset viewer.