mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-14 16:27:14 +02:00
use clang-tidy (#59)
* 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>
This commit is contained in:
@ -9,14 +9,14 @@ using aare::File;
|
||||
using aare::Frame;
|
||||
|
||||
void test1(File &f, int frame_number) {
|
||||
std::cout << "frame number: " << frame_number << std::endl;
|
||||
std::cout << "frame number: " << frame_number << '\n';
|
||||
Frame frame = f.iread(frame_number);
|
||||
std::cout << *((uint32_t *)frame.get(0, 0)) << std::endl;
|
||||
std::cout << *((uint32_t *)frame.get(0, 1)) << std::endl;
|
||||
std::cout << *((uint32_t *)frame.get(0, 3839)) << std::endl;
|
||||
std::cout << *(reinterpret_cast<uint32_t *>(frame.get(0, 0))) << '\n';
|
||||
std::cout << *(reinterpret_cast<uint32_t *>(frame.get(0, 1))) << '\n';
|
||||
std::cout << *(reinterpret_cast<uint32_t *>(frame.get(0, 3839))) << '\n';
|
||||
|
||||
for (int i = 0; i < 3840; i++) {
|
||||
uint16_t x = *((uint32_t *)frame.get(0, i));
|
||||
uint16_t const x = *(reinterpret_cast<uint32_t *>(frame.get(0, i)));
|
||||
if (x != i) {
|
||||
aare::logger::error("error at i", i, "x", x);
|
||||
}
|
||||
@ -24,11 +24,11 @@ void test1(File &f, int frame_number) {
|
||||
}
|
||||
|
||||
void test2(File &f, int frame_number) {
|
||||
std::cout << "frame number: " << frame_number << std::endl;
|
||||
std::cout << "frame number: " << frame_number << '\n';
|
||||
Frame frame = f.iread(frame_number);
|
||||
std::cout << *((uint32_t *)frame.get(0, 0)) << std::endl;
|
||||
std::cout << *((uint32_t *)frame.get(0, 1)) << std::endl;
|
||||
std::cout << *((uint32_t *)frame.get(0, 1280 * 4 - 1)) << std::endl;
|
||||
std::cout << *(reinterpret_cast<uint32_t *>(frame.get(0, 0))) << '\n';
|
||||
std::cout << *(reinterpret_cast<uint32_t *>(frame.get(0, 1))) << '\n';
|
||||
std::cout << *(reinterpret_cast<uint32_t *>(frame.get(0, 1280 * 4 - 1))) << '\n';
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
Reference in New Issue
Block a user