mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-08 13:40:39 +02:00

* use clang-tidy for Frame.cpp * fixes for defs.cpp * clang-tidy 6/45 * clang-tidy for core * clang-tidy fixes: for hpp File,FileInterface,SubFile.cpp * ci fixes * fix build errors * fix clang-tidy command ci * fix clang-tidy ci * clang-tidy for rawfile.cpp * clang-tidy numpy helpers * fix ci * clang-tidy file_io * clang-tidy file_io and core working * zmqheader * clagn-tidy: network_io,file_io,core * clang-tidy working * format --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com>
29 lines
966 B
C++
29 lines
966 B
C++
// Your First C++ Program
|
|
#include "aare/file_io/File.hpp"
|
|
#include "aare/utils/logger.hpp"
|
|
#include <iostream>
|
|
|
|
#define AARE_ROOT_DIR_VAR "PROJECT_ROOT_DIR"
|
|
|
|
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(511, 1023))) << '\n';
|
|
}
|
|
|
|
int main() {
|
|
auto PROJECT_ROOT_DIR = std::filesystem::path(getenv(AARE_ROOT_DIR_VAR));
|
|
std::filesystem::path const fpath(PROJECT_ROOT_DIR / "data" / "jungfrau" / "jungfrau_single_master_0.json");
|
|
std::cout << fpath << '\n';
|
|
|
|
File file(fpath, "r");
|
|
test(file, 0);
|
|
test(file, 2);
|
|
test(file, 9);
|
|
} |