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

Last change on this file since 14822 was 14700, checked in by tbretz, 12 years ago
Not only the run number needs to be propagated for consistency but also the night. Otherwise we might check the night, configure the FADs and when we start the run it has changed already. Since it is at day time this is not a likely scenario but should be avoided nevertheless.
File size: 818 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(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(EVENT *e);
31 bool Close(RUN_TAIL *rt = 0);
32
33 static void WriteDefaultKeys(std::ofits &file);
34};
35
36#endif
Note: See TracBrowser for help on using the repository browser.