mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-01-21 12:08:54 +01:00
saving work: failed attempt at sublibraries
This commit is contained in:
7
examples/CMakeLists.txt
Normal file
7
examples/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
add_executable(example "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp")
|
||||
|
||||
target_include_directories(example PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
target_link_libraries(example PUBLIC aare)
|
||||
|
||||
|
||||
27
examples/main.cpp
Normal file
27
examples/main.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Your First C++ Program
|
||||
#include <iostream>
|
||||
#include <FileHandler.hpp>
|
||||
|
||||
using JFileHandler = FileHandler<DetectorType::Jungfrau,uint16_t>;
|
||||
using JFile = File<DetectorType::Jungfrau,uint16_t>;
|
||||
using JFrame = Frame<uint16_t>;
|
||||
|
||||
|
||||
void test(JFileHandler* f,int frame_number){
|
||||
std::cout << "frame number: " << frame_number << std::endl;
|
||||
JFrame* frame = f->get_frame(frame_number);
|
||||
std::cout << frame->get(0,0) << ' ';
|
||||
std::cout << frame->get(0,1) << ' ';
|
||||
std::cout << frame->get(1,0) << ' ';
|
||||
std::cout << frame->get(511,1023) << std::endl;
|
||||
|
||||
delete frame;
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::filesystem::path fpath("/home/l_bechir/github/aare/data/jungfrau_single_master_0.json");
|
||||
auto fileHandler = new JFileHandler (fpath);
|
||||
|
||||
delete fileHandler;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user