Changeset 2620 for trunk/MagicSoft
- Timestamp:
- 12/08/03 10:56:56 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2617 r2620 4 4 5 5 -*-*- END OF LINE -*-*- 6 2003/12/08: Thomas Bretz 7 8 * mraw/MRawFileRead.cc: 9 - implemented an artificial time-stamp for the current data 10 11 12 6 13 2003/12/07: Thomas Bretz 7 14 -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r2521 r2620 231 231 } 232 232 233 { 234 // FIXME This is a stupid workaround for the missing time stamp! 235 // Might be used depending on the run number in the future 236 static Double_t tm = 0; // Range of roughly 8min 237 const UInt_t ct = (*fRawCrateArray)[0]->GetFADCClockTick(); 238 239 tm = ct<tm ? fmod(tm, (UInt_t)(-1))+(UInt_t)(-1)+ct : ct; 240 241 const Double_t mhz = 9.375; // [1e6 ticks/s] 242 const Double_t t = tm/mhz; // [us] 243 cout << (ULong_t)t << endl; 244 const UInt_t ns = (UInt_t)fmod(t*1e3, 1e6); 245 const UShort_t ms = (UShort_t)fmod(t/1e3, 1e3); 246 const Byte_t s = (Byte_t)fmod(t/1e6, 60); 247 248 // Create an artificial time stamp! 249 UInt_t m = (Byte_t)fmod(t/60e6, 60); 250 //const Byte_t h = (Byte_t)(t/3600e6); 251 m += fRawRunHeader->GetRunNumber()*10; 252 m %= 360; // 6h 253 254 fRawEvtTime->Set(fRawRunHeader->GetDateYear(), 255 fRawRunHeader->GetDateMonth(), 256 fRawRunHeader->GetDateDay(), 257 m/60, m%60, s, ms, ns); 258 259 //cout << tm << ": "; 260 //fRawEvtTime->Print(); 261 } 262 233 263 return kTRUE; 234 264 }
Note:
See TracChangeset
for help on using the changeset viewer.