Helios++
Helios software for LiDAR simulations
ZipSyncFileFullWaveformWriter.h
1 #pragma once
2 
3 #include <filems/write/comps/ZipSyncFileWriter.h>
4 #include <filems/write/strategies/ZipFullWaveformWriteStrategy.h>
5 #include <scanner/detector/FullWaveform.h>
6 
7 #include <memory>
8 #include <vector>
9 
10 namespace helios{ namespace filems{
11 
12 using std::make_shared;
13 
24  public ZipSyncFileWriter<FullWaveform const &>
25 {
26 
27 public:
28  // *** CONSTRUCTION / DESTRUCTION *** //
29  // ************************************ //
35  string const &path,
36  int compressionMode = boost::iostreams::zlib::best_compression
37  ) :
38  ZipSyncFileWriter<FullWaveform const &>(path, compressionMode)
39  {
40  this->writeStrategy = make_shared<ZipFullWaveformWriteStrategy>(
41  this->ofs,
42  *(this->oa)
43  );
44  }
45  virtual ~ZipSyncFileFullWaveformWriter() = default;
46 };
47 
48 }}
Class representing a full waveform.
Definition: FullWaveform.h:12
std::ofstream ofs
Output file stream to be used by the simple synchronous file writer.
Definition: SimpleSyncFileWriter.h:31
std::string path
Path to file to be written.
Definition: SingleSyncFileWriter.h:28
std::shared_ptr< WriteStrategy< WriteArgs ... > > writeStrategy
The write strategy specifying how to write data to file.
Definition: SingleSyncFileWriter.h:36
Concrete class specializing ZipSyncFileWriter to write compressed full waveform data to a file.
Definition: ZipSyncFileFullWaveformWriter.h:25
ZipSyncFileFullWaveformWriter(string const &path, int compressionMode=boost::iostreams::zlib::best_compression)
Simple synchronous zipped full waveform writer constructor.
Definition: ZipSyncFileFullWaveformWriter.h:34
Abstract child of SimpleSyncFileWriter which provides support for zipped output.
Definition: ZipSyncFileWriter.h:23
unique_ptr< boost::archive::binary_oarchive > oa
Binary output archive.
Definition: ZipSyncFileWriter.h:39