Changeset 12636 for trunk/FACT++/src
- Timestamp:
- 11/24/11 15:50:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Fits.cc
r12618 r12636 320 320 { 321 321 // FIXME: Check error? 322 const double doubleValue = *reinterpret_cast<double*>(fStandardPointers[0]); 323 324 const double start = Time(doubleValue).UnixDate(); 325 const double stop = Time(fEndMjD).UnixDate(); 326 327 fFile->WriteKeyNT("TSTARTI", uint32_t(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", uint32_t(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(), 322 const double time = *reinterpret_cast<double*>(fStandardPointers[0]); 323 324 fFile->WriteKeyNT("TSTARTI", uint32_t(floor(time)), "Time when first event received (integral part)"); 325 fFile->WriteKeyNT("TSTARTF", fmod(time, 1), "Time when first event received (fractional part)"); 326 fFile->WriteKeyNT("TSTOPI", uint32_t(floor(fEndMjD)), "Time when last event received (integral part)"); 327 fFile->WriteKeyNT("TSTOPF", fmod(fEndMjD, 1), "Time when last event received (fractional part)"); 328 329 fFile->WriteKeyNT("DATE-OBS", Time(time+40587).Iso(), 333 330 "Time when first event received"); 334 331 335 fFile->WriteKeyNT("DATE-END", Time(fEndMjD ).Iso(),332 fFile->WriteKeyNT("DATE-END", Time(fEndMjD+40587).Iso(), 336 333 "Time when last event received"); 337 334 } 338 fEndMjD = *reinterpret_cast<double*>(fStandardPointers[0]);335 fEndMjD = time; 339 336 340 337 return true; … … 353 350 if (fFile->IsOpen() && fFile->IsOwner()) 354 351 { 355 const double stop = Time(fEndMjD).UnixDate();356 357 352 // FIMXE: Check for error? (It is allowed that fFile is NULL) 358 fFile->WriteKeyNT("TSTOPI", uint32_t(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(),353 fFile->WriteKeyNT("TSTOPI", uint32_t(floor(fEndMjD)), "Time when last event received (integral part)"); 354 fFile->WriteKeyNT("TSTOPF", fmod(fEndMjD, 1), "Time when last event received (fractional part)"); 355 356 fFile->WriteKeyNT("DATE-END", Time(fEndMjD+40587).Iso(), 362 357 "Time when last event received"); 363 358 }
Note:
See TracChangeset
for help on using the changeset viewer.