mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-07 21:20:40 +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>
28 lines
645 B
C++
28 lines
645 B
C++
// Your First C++ Program
|
|
#include "aare/core/Frame.hpp"
|
|
#include "aare/file_io/File.hpp"
|
|
#include <iostream>
|
|
|
|
#define AARE_ROOT_DIR_VAR "PROJECT_ROOT_DIR"
|
|
|
|
using aare::File;
|
|
using aare::FileConfig;
|
|
using aare::Frame;
|
|
|
|
int main() {
|
|
auto path = std::filesystem::path("/tmp/test.npy");
|
|
auto dtype = aare::DType(typeid(uint32_t));
|
|
FileConfig const cfg = {dtype, 100, 100};
|
|
File npy(path, "w", cfg);
|
|
Frame f(100, 100, dtype.bitdepth());
|
|
for (int i = 0; i < 10000; i++) {
|
|
f.set<uint32_t>(i / 100, i % 100, i);
|
|
}
|
|
|
|
npy.write(f);
|
|
f.set<uint32_t>(0, 0, 77);
|
|
npy.write(f);
|
|
npy.write(f);
|
|
return 0;
|
|
}
|