reading raw moench files (PR#3) (#32)

* reading moench and raw files

* read mythen3 files

* read multiport mythen3

* delete .vscode and .env.dev

---------

Co-authored-by: Bechir <bechir.brahem420@gmail.com>
This commit is contained in:
Bechir Braham
2024-03-27 08:58:43 +01:00
committed by GitHub
parent 937acd1138
commit bf216f55c6
54 changed files with 483 additions and 412 deletions

View File

@ -1,4 +1,5 @@
#include "aare/Frame.hpp"
#include "aare/utils/logger.hpp"
#include <iostream>
#include <cassert>
Frame::Frame(std::byte* bytes, ssize_t rows, ssize_t cols, ssize_t bitdepth):

View File

@ -10,13 +10,14 @@ template <> std::string toString(DetectorType type) {
return "Mythen3";
case DetectorType::Moench:
return "Moench";
case DetectorType::ChipTestBoard:
return "ChipTestBoard";
default:
return "Unknown";
}
}
template <> DetectorType StringTo(std::string name) {
template <> DetectorType StringTo(std::string name) {
if (name == "Jungfrau")
return DetectorType::Jungfrau;
else if (name == "Eiger")
@ -25,18 +26,20 @@ template <> std::string toString(DetectorType type) {
return DetectorType::Mythen3;
else if (name == "Moench")
return DetectorType::Moench;
else if (name == "ChipTestBoard")
return DetectorType::ChipTestBoard;
else {
auto msg = fmt::format("Could not decode dector from: \"{}\"", name);
throw std::runtime_error(msg);
}
}
template <> TimingMode StringTo(std::string mode){
template <> TimingMode StringTo(std::string mode) {
if (mode == "auto")
return TimingMode::Auto;
else if(mode == "trigger")
else if (mode == "trigger")
return TimingMode::Trigger;
else{
else {
auto msg = fmt::format("Could not decode timing mode from: \"{}\"", mode);
throw std::runtime_error(msg);
}