Changeset 12616
- Timestamp:
- 11/22/11 14:13:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Fits.cc
r12536 r12616 238 238 return false; 239 239 240 if (!fFile->WriteKeyNT("TSTART", "", "Time of the first receied data")) 241 return false; 242 243 if (!fFile->WriteKeyNT("TSTOP", "", "Time of the last receied data")) 240 if (!fFile->WriteKeyNT("TSTARTI", 0, "Time when first event received (integral part)") || 241 !fFile->WriteKeyNT("TSTARTF", 0, "Time when first event received (fractional part)") || 242 !fFile->WriteKeyNT("TSTOPI", 0, "Time when last event received (integral part)") || 243 !fFile->WriteKeyNT("TSTOPF", 0, "Time when last event received (fractional part)") || 244 !fFile->WriteKeyNT("DATE-OBS", 0, "Time when first event received") || 245 !fFile->WriteKeyNT("DATE-END", 0, "Time when last event received")) 244 246 return false; 245 247 … … 319 321 // FIXME: Check error? 320 322 const double doubleValue = *reinterpret_cast<double*>(fStandardPointers[0]); 321 fFile->WriteKeyNT("TSTART", Time(doubleValue).Iso(), 322 "Time of the first received data"); 323 fFile->WriteKeyNT("TSTOP", Time(fEndMjD).Iso(), 324 "Time of the last receied data"); 323 324 const double start = Time(doubleValue).UnixTime(); 325 const double stop = Time(fEndMjD).UnixTime(); 326 327 fFile->WriteKeyNT("TSTARTI", floor(start), "Time when first event received (integral part)"); 328 fFile->WriteKeyNT("TSTARTF", fmod(start, 1), "Time when first event received (fractional part)"); 329 fFile->WriteKeyNT("TSTOPI", floor(stop), "Time when last event received (integral part)"); 330 fFile->WriteKeyNT("TSTOPF", fmod(stop, 1), "Time when last event received (fractional part)"); 331 332 fFile->WriteKeyNT("DATE-OBS", Time(doubleValue).Iso(), 333 "Time when first event received"); 334 335 fFile->WriteKeyNT("DATE-END", Time(fEndMjD).Iso(), 336 "Time when last event received"); 325 337 } 326 338 fEndMjD = *reinterpret_cast<double*>(fStandardPointers[0]); … … 341 353 if (fFile->IsOpen() && fFile->IsOwner()) 342 354 { 355 const double stop = Time(fEndMjD).UnixTime(); 356 343 357 // FIMXE: Check for error? (It is allowed that fFile is NULL) 344 fFile->WriteKeyNT("TSTOP", Time(fEndMjD).Iso(), 345 "Time of the last receied data"); 358 fFile->WriteKeyNT("TSTOPI", floor(stop), "Time when last event received (integral part)"); 359 fFile->WriteKeyNT("TSTOPF", fmod(stop, 1), "Time when last event received (fractional part)"); 360 361 fFile->WriteKeyNT("DATE-END", Time(fEndMjD).Iso(), 362 "Time when last event received"); 346 363 } 347 364
Note:
See TracChangeset
for help on using the changeset viewer.