FACT++  1.0
void DataWriteFits2::WriteFooter ( )
private

Definition at line 284 of file DataWriteFits2.cc.

References fFile, fTriggerCounter, fTstart, fTstop, Time::Iso(), start(), and Time::UnixDate().

Referenced by Close(), and WriteHeader().

285 {
286  //FIXME shouldn't we convert start and stop time to MjD first ?
287  //FIXME shouldn't we also add an MjD reference ?
288 
289  const Time start(fTstart[0], fTstart[1]);
290  const Time stop (fTstop[0], fTstop[1]);
291 
292  fFile->SetInt("TSTARTI", uint32_t(floor(start.UnixDate())),
293  "Time when first evt received (integral part)");
294  fFile->SetFloat("TSTARTF", fmod(start.UnixDate(), 1),
295  "Time when first evt received (fractional part)");
296  fFile->SetInt("TSTOPI", uint32_t(floor(stop.UnixDate())),
297  "Time when last evt received (integral part)");
298  fFile->SetFloat("TSTOPF", fmod(stop.UnixDate(), 1),
299  "Time when last evt received (fractional part)");
300  fFile->SetStr("DATE-OBS", start.Iso(),
301  "Time when first event received");
302  fFile->SetStr("DATE-END", stop.Iso(),
303  "Time when last event received");
304 
305  fFile->SetInt("NTRG", fTriggerCounter[0], "No of physics triggered events");
306  fFile->SetInt("NTRGPED", fTriggerCounter[1], "No of pure pedestal triggered events");
307  fFile->SetInt("NTRGLPE", fTriggerCounter[2], "No of external light pulser triggered events");
308  fFile->SetInt("NTRGTIM", fTriggerCounter[3], "No of time calibration triggered events");
309  fFile->SetInt("NTRGLPI", fTriggerCounter[4], "No of internal light pulser triggered events");
310  fFile->SetInt("NTRGEXT1", fTriggerCounter[5], "No of triggers from ext1 triggered events");
311  fFile->SetInt("NTRGEXT2", fTriggerCounter[6], "No of triggers from ext2 triggered events");
312  fFile->SetInt("NTRGMISC", fTriggerCounter[7], "No of all other triggered events");
313 }
int start(int initState)
Definition: feeserver.c:1740
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
std::shared_ptr< ofits > fFile
std::array< uint32_t, 8 > fTriggerCounter
uint32_t fTstop[2]
uint32_t fTstart[2]

+ Here is the call graph for this function:

+ Here is the caller graph for this function: