Changeset 7744 for trunk/MagicSoft/Mars/mpointing
- Timestamp:
- 05/24/06 19:00:45 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 2 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; -
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h
r7594 r7744 26 26 27 27 TArrayI fSkip; //! Counter for execution statistics 28 Double_t fLastMjd; //! Time of last processed report 28 29 29 30 UInt_t fNumMinStars; // Minimum number of identified stars … … 32 33 Float_t fNsbMax; // Maximum NSB to calc mean and rms 33 34 Float_t fMaxAbsDev; // [arcmin] Maximum considered absolute deviation 35 Float_t fMaxAge; // [min] Maximum age of reports to be used without an update 34 36 35 37 Float_t fDx; // Starguider calibration dx … … 38 40 // MPointingDevCalc 39 41 Int_t ProcessStarguiderReport(); 42 void Skip(Int_t i); 40 43 41 44 // MParContainer … … 49 52 50 53 public: 51 MPointingDevCalc() : fReport(0), fDeviation(0), fSkip( 5), fNumMinStars(8),52 fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15), f Dx(-7), fDy(16)54 MPointingDevCalc() : fReport(0), fDeviation(0), fSkip(6), fNumMinStars(8), 55 fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15), fMaxAge(1), fDx(-7), fDy(16) 53 56 { 54 57 fName = "MPointingDevCalc"; … … 65 68 void SetDx(Float_t dx) { fDx=dx; } 66 69 void SetDy(Float_t dy) { fDy=dy; } 70 void SetMaxAge(Float_t age) { fMaxAge=age; } 67 71 68 72 ClassDef(MPointingDevCalc, 0) //Task calculating the pointing deviation
Note:
See TracChangeset
for help on using the changeset viewer.