source: trunk/FACT++/src/DataWriteFits2.h@ 16103

Last change on this file since 16103 was 16055, checked in by tbretz, 12 years ago
Replaced the pointer argument when opening a file or writing an event by a const-reference.
File size: 973 bytes
Line 
1#ifndef FACT_DataWriteFits2
2#define FACT_DataWriteFits2
3
4#include "DataProcessorImp.h"
5#include "externals/ofits.h"
6
7#include <array>
8
9class DataWriteFits2 : public DataProcessorImp
10{
11 std::ofits fFile;
12
13 std::array<uint32_t, 8> fTriggerCounter;
14
15 uint32_t fTstart[2];
16 uint32_t fTstop[2];
17
18 void WriteHeader(const RUN_HEAD &h, const FAD::RunDescription &d);
19 void WriteFooter(const RUN_TAIL *rt);
20
21 virtual int GetDrsStep() const { return -1; }
22
23public:
24 DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, MessageImp &imp) :
25 DataProcessorImp(path, night, runid, imp)
26 {
27 }
28
29 bool Open(const RUN_HEAD &h, const FAD::RunDescription &d);
30 bool WriteEvt(const EVENT &e);
31 bool Close(const RUN_TAIL *rt = 0);
32
33 Time GetTstart() const { return Time(fTstart[0], fTstart[1]); }
34 Time GetTstop() const { return Time(fTstop[0], fTstop[1]); }
35
36 static void WriteDefaultKeys(std::ofits &file);
37};
38
39#endif
Note: See TracBrowser for help on using the repository browser.