mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-07 13:10:42 +02:00
format files
This commit is contained in:
parent
2f23e4610d
commit
598e9f6708
@ -14,9 +14,7 @@ class RawFile : public FileInterface {
|
|||||||
std::filesystem::path m_fname; // TO be made private!
|
std::filesystem::path m_fname; // TO be made private!
|
||||||
|
|
||||||
// pragma to ignore warnings
|
// pragma to ignore warnings
|
||||||
void write(Frame &frame) override{
|
void write(Frame &frame) override { throw std::runtime_error("Not implemented"); };
|
||||||
throw std::runtime_error("Not implemented");
|
|
||||||
};
|
|
||||||
|
|
||||||
Frame read() override { return get_frame(this->current_frame++); };
|
Frame read() override { return get_frame(this->current_frame++); };
|
||||||
std::vector<Frame> read(size_t n_frames) override;
|
std::vector<Frame> read(size_t n_frames) override;
|
||||||
|
@ -48,7 +48,9 @@ template <> simdjson_inline simdjson::simdjson_result<uint32_t> simdjson::ondema
|
|||||||
/**
|
/**
|
||||||
* @brief cast a simdjson::ondemand::value to a std::map<std::string, std::string>
|
* @brief cast a simdjson::ondemand::value to a std::map<std::string, std::string>
|
||||||
*/
|
*/
|
||||||
template <> simdjson_inline simdjson::simdjson_result<std::map<std::string, std::string>> simdjson::ondemand::value::get() noexcept {
|
template <>
|
||||||
|
simdjson_inline simdjson::simdjson_result<std::map<std::string, std::string>>
|
||||||
|
simdjson::ondemand::value::get() noexcept {
|
||||||
std::map<std::string, std::string> map;
|
std::map<std::string, std::string> map;
|
||||||
ondemand::object obj;
|
ondemand::object obj;
|
||||||
auto error = get_object().get(obj);
|
auto error = get_object().get(obj);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <catch2/catch_test_macros.hpp>
|
|
||||||
#include "aare/ZmqHeader.hpp"
|
#include "aare/ZmqHeader.hpp"
|
||||||
#include "aare/utils/logger.hpp"
|
#include "aare/utils/logger.hpp"
|
||||||
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
using namespace aare;
|
using namespace aare;
|
||||||
TEST_CASE("Test ZmqHeader") {
|
TEST_CASE("Test ZmqHeader") {
|
||||||
@ -72,17 +71,10 @@ TEST_CASE("Test ZmqHeader") {
|
|||||||
"\"rx_roi\": [27, 28, 29, 30]"
|
"\"rx_roi\": [27, 28, 29, 30]"
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
SECTION("Test converting ZmqHeader to json string"){
|
SECTION("Test converting ZmqHeader to json string") { REQUIRE(header.to_string() == json_header); }
|
||||||
REQUIRE(header.to_string() == json_header);
|
|
||||||
|
|
||||||
}
|
|
||||||
SECTION("Test converting json string to ZmqHeader") {
|
SECTION("Test converting json string to ZmqHeader") {
|
||||||
ZmqHeader header2;
|
ZmqHeader header2;
|
||||||
header2.from_string(json_header);
|
header2.from_string(json_header);
|
||||||
REQUIRE(header2 == header);
|
REQUIRE(header2 == header);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#define LOCATION std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + ":" + std::string(__func__) + ":"
|
#define LOCATION std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + ":" + std::string(__func__) + ":"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user