FACT++  1.0
DataWriteFits2.h
Go to the documentation of this file.
1 #ifndef FACT_DataWriteFits2
2 #define FACT_DataWriteFits2
3 
4 #include "DataProcessorImp.h"
5 
6 #include <array>
7 
8 class ofits;
9 
10 class DrsCalibration;
11 
13 {
14  std::shared_ptr<ofits> fFile;
15 
16  std::array<uint32_t, 8> fTriggerCounter;
17 
18  uint32_t fTstart[2];
19  uint32_t fTstop[2];
20 
21  void WriteHeader(const RUN_HEAD &h, const FAD::RunDescription &d);
22  void WriteFooter();
23 
24  virtual int GetDrsStep() const { return -1; }
25 
26 public:
27  DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, MessageImp &imp);
28  DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, const DrsCalibration &cal, MessageImp &imp);
29 
30  bool Open(const RUN_HEAD &h, const FAD::RunDescription &d);
31  bool WriteEvt(const EVT_CTRL2 &e);
32  bool Close(const EVT_CTRL2 &);
33 
34  Time GetTstart() const { return Time(fTstart[0], fTstart[1]); }
35  Time GetTstop() const { return Time(fTstop[0], fTstop[1]); }
36 };
37 
38 #endif
The base implementation of a distributed messaging system.
Definition: MessageImp.h:10
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
std::shared_ptr< ofits > fFile
bool WriteEvt(const EVT_CTRL2 &e)
void WriteHeader(const RUN_HEAD &h, const FAD::RunDescription &d)
Definition: FAD.h:92
Definition: ofits.h:29
bool Open(const RUN_HEAD &h, const FAD::RunDescription &d)
std::array< uint32_t, 8 > fTriggerCounter
virtual int GetDrsStep() const
uint32_t fTstop[2]
Time GetTstop() const
uint32_t fTstart[2]
DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, MessageImp &imp)
bool Close(const EVT_CTRL2 &)
Time GetTstart() const