Changeset 3135 in Sophya for trunk/SophyaPI/PIext/sohiswrap.h
- Timestamp:
- Jan 12, 2007, 7:36:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/sohiswrap.h
r3132 r3135 25 25 { 26 26 if (h == NULL) throw NullPtrError("HistoWrapper(Histo* h = NULL)"); 27 mHis = h; mAD = ad; 27 mHis = h; 28 mHpr = dynamic_cast<HProf*>(h); 29 mAD = ad; 28 30 } 29 31 ~HistoWrapper() { if (mAD) delete mHis; } … … 40 42 virtual r_8 Value(int_4 i) { return (*mHis)(i) ; } 41 43 virtual r_8 Error(int_4 i) { return mHis->Error(i) ; } 44 virtual r_8 NbEntries(int_4 i) { if(mHpr) return mHpr->SumW(i); else return 0.; } 42 45 43 46 virtual void Update() { mHis->UpdateHisto(); } … … 59 62 // pointeur sur l'objet histo 60 63 inline Histo* getHisto() { return mHis; } 64 61 65 protected: 62 66 Histo* mHis; 67 HProf* mHpr; 63 68 bool mAD; 64 69 }; … … 87 92 virtual r_8 Value(int_4 i) { return (*mHis)(i) ; } 88 93 virtual r_8 Error(int_4 i) { return mHis->Error(i) ; } 89 90 // CMV $CHECK$ pas besoin ? virtual void Update() { } 94 virtual r_8 NbEntries(int_4 i) { return mHis->NEntBin(i) ; } 91 95 92 96 // ajoute des lignes de texte avec les infos statistiques 93 97 virtual int GetStatInfoAsText(vector<string> & text) 94 98 { 95 // CMV $CHECK$ Y-a-t il qque chose a ecrire ? 96 string s = "HistoErr"; 97 text.push_back(s); 99 char label[64]; string s; 100 101 sprintf(label, "NCor= %d",mHis->NCorrel()); 102 s = label; text.push_back(s); 103 98 104 return 1; 99 105 } … … 101 107 // pointeur sur l'objet histo 102 108 inline HistoErr* getHistoErr() { return mHis; } 109 103 110 protected: 104 111 HistoErr* mHis;
Note:
See TracChangeset
for help on using the changeset viewer.