31 lines
785 B
C++
31 lines
785 B
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef JUNGFRAUJOCH_STREAMWRITER_H
|
|
#define JUNGFRAUJOCH_STREAMWRITER_H
|
|
|
|
#include "ZMQImagePuller.h"
|
|
#include "HDF5DataFile.h"
|
|
|
|
struct StreamWriterStatistics {
|
|
ZMQImagePullerStatistics image_puller_stats;
|
|
std::vector<HDF5DataFileStatistics> data_file_stats;
|
|
};
|
|
|
|
class StreamWriter {
|
|
ZMQImagePuller image_puller;
|
|
Logger &logger;
|
|
StartMessage start_message;
|
|
|
|
void StartDataCollection();
|
|
void CollectImages(std::vector<HDF5DataFileStatistics> &v);
|
|
void EndDataCollection();
|
|
public:
|
|
StreamWriter(ZMQContext& context, Logger &logger, const std::string& zmq_addr);
|
|
StreamWriterStatistics Run();
|
|
void Abort();
|
|
};
|
|
|
|
|
|
#endif //JUNGFRAUJOCH_STREAMWRITER_H
|