mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-07 21:20:40 +02:00

* add config files for multimodule receiving * read subfiles with unordered and missing frames * save work debugging * Revert "save work debugging" This reverts commit e791992a05efd754f93a80c980d17397eb4b6045. * Revert "read subfiles with unordered and missing frames" This reverts commit 1177fd129d3690db92e9597ccda62598e5a44d41. * throw when two frames have different frame numbers * write single part RawFile (working beta) * correct total number of frames in master file * add new mythen file with syncd frames * save work * save work for receive multimodule multimodule config results in too much packet loss. needs more debugging. * setup Task Distributiosn/ parallelization programming model * read frames with same frame number * clang-tidy fixes, formatting, add tests * added second receiver * Synchronize between zmq streams and merge frames * improve readability in loop * fix failing tests * add simple test for merge frames * restructure files and use top-level header * working pedestal + tests * test_pedestal statistics * QA test pedestal, fix clang-tidy errors --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com> Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
29 lines
866 B
C++
29 lines
866 B
C++
#include "aare.hpp"
|
|
#include "aare/examples/defs.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
using aare::File;
|
|
using aare::Frame;
|
|
|
|
void test(File &f, int frame_number) {
|
|
std::cout << "frame number: " << frame_number << '\n';
|
|
Frame frame = f.iread(frame_number);
|
|
std::cout << *(reinterpret_cast<uint16_t *>(frame.get(0, 0))) << '\n';
|
|
std::cout << *(reinterpret_cast<uint16_t *>(frame.get(0, 1))) << '\n';
|
|
std::cout << *(reinterpret_cast<uint16_t *>(frame.get(1, 0))) << '\n';
|
|
std::cout << *(reinterpret_cast<uint16_t *>(frame.get(49, 49))) << '\n';
|
|
}
|
|
|
|
int main() {
|
|
|
|
auto PROJECT_ROOT_DIR = std::filesystem::path(getenv(AARE_ROOT_DIR));
|
|
std::filesystem::path const fpath(PROJECT_ROOT_DIR / "data" / "numpy" / "test_numpy_file.npy");
|
|
std::cout << fpath << '\n';
|
|
|
|
File file(fpath, "r");
|
|
test(file, 0);
|
|
test(file, 2);
|
|
test(file, 24);
|
|
}
|