Ignore:
Timestamp:
09/02/04 14:32:50 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhvstime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc

    r4703 r4828  
    8282    fGraph = new TGraph;
    8383    fData = new MDataChain(rule);
     84
     85    fGraph->SetMarkerStyle(kFullDotMedium);
    8486}
    8587
     
    131133
    132134    fGraph->SetNameTitle(fName, title);
     135
     136    fMean = 0;
     137    fN    = 0;
    133138
    134139    return kTRUE;
     
    186191        fGraph->RemovePoint(0);
    187192
    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    }
    189202
    190203    return kTRUE;
  • trunk/MagicSoft/Mars/mhvstime/MHVsTime.h

    r4703 r4828  
    1313protected:
    1414    // 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
    1924
    2025    enum {
     
    5156
    5257    void SetUseEventNumber(Bool_t use = kTRUE) { fUseEventNumber = use; }
     58    void SetNumEvents(Int_t n) { fNumEvents=n; }
    5359
    5460    void Draw(Option_t *opt=NULL);
Note: See TracChangeset for help on using the changeset viewer.