// Copyright (2019-2023) Paul Scherrer Institute #ifndef JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H #define JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H #include #include #include "../common/Plot.h" #include "AzimuthalIntegrationMapping.h" #include "../acquisition_device/AcquisitionDevice.h" class AzimuthalIntegrationProfile { mutable std::mutex m; std::vector sum; std::vector count; std::vector bin_to_q; std::string title; public: explicit AzimuthalIntegrationProfile(const AzimuthalIntegrationMapping &mapping); AzimuthalIntegrationProfile(const AzimuthalIntegrationProfile& other); // Not thread safe AzimuthalIntegrationProfile(AzimuthalIntegrationProfile&& other) noexcept; // Not thread safe AzimuthalIntegrationProfile& operator=(const AzimuthalIntegrationProfile& other); //Not thread safe void SetTitle(const std::string& input); void Add(const DeviceOutput &result); void Add(const std::vector &sum, const std::vector &count); std::vector GetResult() const; float GetMeanValueOfBins(uint16_t min_bin, uint16_t max_bin) const; MultiLinePlot GetPlot() const; AzimuthalIntegrationProfile& operator+=(const AzimuthalIntegrationProfile& profile); }; #endif //JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H