Changeset 7744 for trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
- Timestamp:
- 05/24/06 19:00:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
r7740 r7744 84 84 } 85 85 86 fNsbSum = 0;87 fNsbSq = 0;88 fNsbCount = 0;86 fNsbSum = 0; 87 fNsbSq = 0; 88 fNsbCount = 0; 89 89 90 90 fRunType = run->GetRunType(); … … 127 127 // We use kRTNone here as a placeholder for data runs. 128 128 fRunType = MRawRunHeader::kRTNone; 129 fLastMjd = -1; 129 130 130 131 fSkip.Reset(); 131 132 132 133 return fDeviation ? kTRUE : kFALSE; 134 } 135 136 // -------------------------------------------------------------------------- 137 // 138 // Increase fSkip[i] by one. If the data in fDeviation is outdated (older 139 // than fMaxAge) and the current report should be skipped reset DevZdAz and 140 // DevXY and fSkip[5] is increased by one. 141 // 142 void MPointingDevCalc::Skip(Int_t i) 143 { 144 fSkip[i]++; 145 146 const Double_t diff = (fReport->GetMjd()-fLastMjd)*1440; // [min] 1440=24*60 147 if (diff<fMaxAge && fLastMjd>0) 148 return; 149 150 fDeviation->SetDevZdAz(0, 0); 151 fDeviation->SetDevXY(0, 0); 152 fSkip[5]++; 133 153 } 134 154 … … 142 162 fDeviation->SetDevXY(0, 0); //?!? 143 163 fSkip[1]++; 164 fLastMjd = fReport->GetMjd(); 144 165 return kTRUE; 145 166 } … … 167 188 if (nsb<sum-rms || nsb>sum+rms) 168 189 { 169 fSkip[2]++;190 Skip(2); 170 191 return kTRUE; 171 192 } … … 174 195 if (fReport->GetNumIdentifiedStars()<fNumMinStars) 175 196 { 176 fSkip[3]++;197 Skip(3); 177 198 return kTRUE; 178 199 } … … 185 206 if (dev*60>fMaxAbsDev) 186 207 { 187 fSkip[4]++;208 Skip(4); 188 209 return kTRUE; 189 210 } … … 198 219 199 220 fSkip[0]++; 221 fLastMjd = fReport->GetMjd(); 200 222 201 223 return kTRUE; … … 238 260 PrintSkipped(fSkip[3], Form("Number of identified stars < %d", fNumMinStars)); 239 261 PrintSkipped(fSkip[4], Form("Absolute deviation > %.1farcmin", fMaxAbsDev)); 262 PrintSkipped(fSkip[5], Form("Events set to 0 because older than %.1fmin", fMaxAge)); 240 263 *fLog << " " << (int)fSkip[0] << " (" << Form("%5.1f", 100.*fSkip[0]/GetNumExecutions()) << "%) Evts survived calculation!" << endl; 241 264 *fLog << endl; … … 251 274 // MPointingDevCalc.NsbMax: 60 252 275 // MPointingDevCalc.MaxAbsDev: 15 276 // MPointingDevCalc.MaxAge: 1.0 253 277 // 254 278 Int_t MPointingDevCalc::ReadEnv(const TEnv &env, TString prefix, Bool_t print) … … 290 314 rc = kTRUE; 291 315 } 316 if (IsEnvDefined(env, prefix, "MaxAge", print)) 317 { 318 fMaxAge = GetEnvValue(env, prefix, "MaxAge", fMaxAge); 319 rc = kTRUE; 320 } 292 321 293 322 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.