Changeset 4828 for trunk/MagicSoft/Mars/mhvstime
- Timestamp:
- 09/02/04 14:32:50 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhvstime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc
r4703 r4828 82 82 fGraph = new TGraph; 83 83 fData = new MDataChain(rule); 84 85 fGraph->SetMarkerStyle(kFullDotMedium); 84 86 } 85 87 … … 131 133 132 134 fGraph->SetNameTitle(fName, title); 135 136 fMean = 0; 137 fN = 0; 133 138 134 139 return kTRUE; … … 186 191 fGraph->RemovePoint(0); 187 192 188 fGraph->SetPoint(fGraph->GetN(), t, v); 193 fMean += v; 194 fN++; 195 196 if (fN==fNumEvents) 197 { 198 fGraph->SetPoint(fGraph->GetN(), t, fMean/fN); 199 fMean = 0; 200 fN = 0; 201 } 189 202 190 203 return kTRUE; -
trunk/MagicSoft/Mars/mhvstime/MHVsTime.h
r4703 r4828 13 13 protected: 14 14 // Could be const but root < 3.02/06 doesn't like this... 15 TGraph *fGraph; // Histogram to fill 16 MDataChain *fData; // Object from which the data is filled 17 Double_t fScale; // Scale for axis (eg unit) 18 Int_t fMaxPts; // Maximum number of data points 15 TGraph *fGraph; // Histogram to fill 16 MDataChain *fData; // Object from which the data is filled 17 Double_t fScale; // Scale for axis (eg unit) 18 Int_t fMaxPts; // Maximum number of data points 19 20 Int_t fNumEvents; // Number of events to average 21 Double_t fMean; //! Mean value 22 Int_t fN; 23 19 24 20 25 enum { … … 51 56 52 57 void SetUseEventNumber(Bool_t use = kTRUE) { fUseEventNumber = use; } 58 void SetNumEvents(Int_t n) { fNumEvents=n; } 53 59 54 60 void Draw(Option_t *opt=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.