Last change
on this file since 17259 was 17231, checked in by tbretz, 12 years ago |
Moved the implementation of the output file from a data memember to a shared_ptr. If a DrsCalibration is given in the constructor, a factfits object is created instead of a ofits object to compress the file; Moved WriteDefaultKeys to ofits, to make it usuable in Mars as well
|
File size:
1.0 KB
|
Line | |
---|
1 | #ifndef FACT_DataWriteFits2
|
---|
2 | #define FACT_DataWriteFits2
|
---|
3 |
|
---|
4 | #include "DataProcessorImp.h"
|
---|
5 |
|
---|
6 | #include <array>
|
---|
7 |
|
---|
8 | namespace std
|
---|
9 | {
|
---|
10 | class ofits;
|
---|
11 | }
|
---|
12 |
|
---|
13 | class DrsCalibration;
|
---|
14 |
|
---|
15 | class DataWriteFits2 : public DataProcessorImp
|
---|
16 | {
|
---|
17 | std::shared_ptr<std::ofits> fFile;
|
---|
18 |
|
---|
19 | std::array<uint32_t, 8> fTriggerCounter;
|
---|
20 |
|
---|
21 | uint32_t fTstart[2];
|
---|
22 | uint32_t fTstop[2];
|
---|
23 |
|
---|
24 | void WriteHeader(const RUN_HEAD &h, const FAD::RunDescription &d);
|
---|
25 | void WriteFooter(const RUN_TAIL *rt);
|
---|
26 |
|
---|
27 | virtual int GetDrsStep() const { return -1; }
|
---|
28 |
|
---|
29 | public:
|
---|
30 | DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, MessageImp &imp);
|
---|
31 | DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, const DrsCalibration &cal, MessageImp &imp);
|
---|
32 |
|
---|
33 | bool Open(const RUN_HEAD &h, const FAD::RunDescription &d);
|
---|
34 | bool WriteEvt(const EVENT &e);
|
---|
35 | bool Close(const RUN_TAIL *rt = 0);
|
---|
36 |
|
---|
37 | Time GetTstart() const { return Time(fTstart[0], fTstart[1]); }
|
---|
38 | Time GetTstop() const { return Time(fTstop[0], fTstop[1]); }
|
---|
39 | };
|
---|
40 |
|
---|
41 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.