Changeset 6455 for trunk/MagicSoft/Mars
- Timestamp:
- 02/14/05 11:29:41 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6453 r6455 38 38 * mjobs/MDataSet.[h,cc]: 39 39 - 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 40 45 41 46 -
trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc
r4887 r6455 141 141 } 142 142 143 Bool_t MEventRateCalc::ReInit(MParList *pList) 144 { 145 fNumFirstEvent = GetNumExecutions(); 146 return kTRUE; 147 } 148 143 149 // -------------------------------------------------------------------------- 144 150 // … … 151 157 const ULong_t exec = GetNumExecutions()-1; 152 158 159 //*fLog << all << fNumFirstEvent << " " << exec << endl; 160 153 161 // Calculate the rate 154 162 const UInt_t n = fTimes.GetSize(); … … 171 179 fTimeDiff->SetReadyToSave(); 172 180 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 173 189 // Store the rate 174 190 fRate->SetRate(exec>1?rate:0, cnt); … … 176 192 177 193 // 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]); 179 198 180 199 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MEventRateCalc.h
r4887 r6455 39 39 TArrayD fTimes; //! internal array to store the last n event times 40 40 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(); 43 46 44 47 void StreamPrimitive(ofstream &out) const;
Note:
See TracChangeset
for help on using the changeset viewer.