Changeset 6455 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/14/05 11:29:41 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6453 r6455  
    3838   * mjobs/MDataSet.[h,cc]:
    3939     - added
     40
     41   * manalysis/MEventRateCalc.[h,cc]:
     42     - added a fix which make sure, that the rate is not influenced
     43       too much by the start of data taking
     44     - fixed setting of mean time corresponding to rate-interval
    4045
    4146
  • trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc

    r4887 r6455  
    141141}
    142142
     143Bool_t MEventRateCalc::ReInit(MParList *pList)
     144{
     145    fNumFirstEvent = GetNumExecutions();
     146    return kTRUE;
     147}
     148
    143149// --------------------------------------------------------------------------
    144150//
     
    151157    const ULong_t exec = GetNumExecutions()-1;
    152158
     159    //*fLog << all << fNumFirstEvent << " " << exec << endl;
     160
    153161    // Calculate the rate
    154162    const UInt_t n = fTimes.GetSize();
     
    171179    fTimeDiff->SetReadyToSave();
    172180
     181    // Make sure, that the beginning of data-takeing (open
     182    // a new file) doesn't effect the rate too much
     183    if (exec<fNumFirstEvent+n)
     184    {
     185        fRate->SetRate(-1, 0);
     186        return kTRUE;
     187    }
     188
    173189    // Store the rate
    174190    fRate->SetRate(exec>1?rate:0, cnt);
     
    176192
    177193    // Store the corresponding time
    178     fTimeRate->SetMean(fTimes[n1%n], fTimes[n2%n]);
     194    if (exec==fNumFirstEvent+n)
     195        fTimeRate->SetMean(fTimes[n2%n], fTimes[n2%n]);
     196    else
     197        fTimeRate->SetMean(fTimes[n1%n], fTimes[n2%n]);
    179198
    180199    return kTRUE;
  • trunk/MagicSoft/Mars/manalysis/MEventRateCalc.h

    r4887 r6455  
    3939    TArrayD  fTimes;         //! internal array to store the last n event times
    4040
    41     Int_t PreProcess(MParList *pList);
    42     Int_t Process();
     41    Int_t fNumFirstEvent;    //! Number of first event in file
     42
     43    Bool_t ReInit(MParList *pList);
     44    Int_t  PreProcess(MParList *pList);
     45    Int_t  Process();
    4346
    4447    void  StreamPrimitive(ofstream &out) const;
Note: See TracChangeset for help on using the changeset viewer.