Changeset 544 in Sophya
- Timestamp:
- Nov 3, 1999, 7:18:23 PM (26 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/nommatvecadapter.h
r463 r544 8 8 9 9 #include "nomgadapter.h" 10 11 #ifdef SANS_EVOLPLANCK 10 12 #include "matrix.h" 11 13 #include "cvector.h" 14 #else 15 #include "tmatrix.h" 16 #include "tvector.h" 17 #endif 12 18 13 19 //--------------------------------------------------------------- -
trunk/SophyaPI/PIext/pawexecut.cc
r469 r544 6 6 7 7 #include "strutil.h" 8 #include "cvector.h"9 #include "matrix.h"10 8 #include "histos.h" 11 9 #include "histos.h" … … 18 16 #include "servnobjm.h" 19 17 #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 20 27 21 28 /* Reza + cmv 13/10/99 */ -
trunk/SophyaPI/PIext/piafitting.cc
r495 r544 17 17 #include "fct1dfit.h" 18 18 #include "fct2dfit.h" 19 #include "matrix.h"20 #include "cvector.h"21 19 #include "ntuple.h" 22 20 #include "cimage.h" … … 25 23 #include "ntuple.h" 26 24 #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 27 33 28 34 #include "piafitting.h" -
trunk/SophyaPI/PIext/pihisto.cc
r295 r544 1 // Classe traceur d histogramme 96-99 2 // CEA-DAPNIA LAL-IN2P3/CNRS 3 1 4 #include <stdio.h> 2 5 #include <typeinfo> … … 5 8 #include "hisprof.h" 6 9 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 7 35 PIHisto::PIHisto(Histo* histo, bool ad) 8 36 : PIDrawer(), mHisto(histo) 9 37 { 10 38 mAdDO = ad; // Flag pour suppression automatique de mHisto 39 SetStats(true); 11 40 } 12 41 … … 96 125 } 97 126 // A faire a la fin - DrawStats change l'attribut de ligne 98 DrawStats(g);127 if (stats) DrawStats(g); 99 128 } 100 129 … … 105 134 // if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 106 135 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; 109 146 g->DrawLine(XMax() - cellWidth, YMax(), 110 147 XMax() - cellWidth, YMax() - cellHeight); 111 148 g->DrawLine(XMax() - cellWidth, YMax() - cellHeight, 112 149 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); 117 155 118 156 } -
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 1 4 #ifndef PIHISTO_H 2 5 #define PIHISTO_H … … 11 14 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 12 15 virtual void UpdateLimits(); 13 virtual void DrawStats(PIGraphicUC* g);16 inline void SetStats(bool fg=true) { stats = true; } 14 17 inline Histo* Histogram() { return(mHisto); } 15 18 16 19 protected: 20 virtual void DrawStats(PIGraphicUC* g); 17 21 Histo* mHisto; 18 22 bool mAdDO; 23 bool stats; // true -> indication des stats d'histo 19 24 }; 20 25 -
trunk/SophyaPI/PIext/pihisto2d.cc
r537 r544 328 328 g->SelFontSz((YMax() - YMin())/30); 329 329 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()); 332 332 } 333 333 -
trunk/SophyaPI/PIext/pintuple.cc
r537 r544 34 34 //++ 35 35 // PINTuple(NTupleInterface* nt, bool ad) 36 // Co sntructeur. Si "ad == true", l'objet "nt" est détruit par36 // Constructeur. Si "ad == true", l'objet "nt" est détruit par 37 37 // le destructeur de l'objet "PINTuple" 38 // Note : ntdoit être créé par new38 // Note : "nt" doit être créé par new 39 39 //-- 40 40 … … 45 45 mNT = nt; 46 46 mAdDO = ad; 47 SetStats(true); 47 48 SelectXY(NULL, NULL); 48 49 SelectWt(NULL, 1); … … 194 195 } 195 196 196 /* 197 sprintf(buff, "NTuple: NEntry= %d NDisp= %d", (int)mNT->NEntry(), nok); 198 g->BaseGraphic()->DrawString(15,15,buff); 199 */ 197 if (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 200 212 return; 201 213 } -
trunk/SophyaPI/PIext/pintuple.h
r486 r544 22 22 virtual void SelectLabel(const char* plabel=NULL); 23 23 24 inline void SetStats(bool fg=true) { stats = true; } 24 25 virtual void AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax); 25 26 … … 33 34 double wMin, wMax; // Valeurs de poids min/max 34 35 int nWbins; // Nombre de bins pour le poids (Wt) 35 36 bool stats; // true -> indication du nb de points 36 37 }; 37 38 -
trunk/SophyaPI/PIext/pipodrw.h
r495 r544 10 10 #include "pidrawer.h" 11 11 #include "parradapter.h" 12 #include "cvector.h"13 #include "matrix.h"14 12 #include "histos2.h" 15 13 16 14 #ifdef SANS_EVOLPLANCK 15 #include "cvector.h" 16 #include "matrix.h" 17 17 class GeneralFunction; 18 18 #else 19 #include "tvector.h" 20 #include "tmatrix.h" 19 21 namespace PlanckDPC {class GeneralFunction;} 20 22 #endif -
trunk/SophyaPI/PIext/pistlist.cc
r344 r544 1 // Classe traceur de StarList 97-99 2 // CEA-DAPNIA LAL-IN2P3/CNRS 3 1 4 #include <stdio.h> 2 5 #include "pistlist.h" 3 6 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 5 29 /* --Methode-- */ 6 30 PIStarList::PIStarList(StarList* stl, bool ad) … … 16 40 if (mAdDO && mStL) delete mStL; 17 41 } 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 //-- 18 57 19 58 /* --Methode-- */ -
trunk/SophyaPI/PIext/servnobjm.cc
r506 r544 19 19 #include "fct2dfit.h" 20 20 21 #ifdef SANS_EVOLPLANCK 21 22 #include "matrix.h" 22 23 #include "cvector.h" 24 #else 25 #include "tmatrix.h" 26 #include "tvector.h" 27 #endif 28 23 29 #include "ntuple.h" 24 30 #include "cimage.h"
Note:
See TracChangeset
for help on using the changeset viewer.