mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-04-23 07:10:03 +02:00
added moench03 back
This commit is contained in:
parent
1cc7690f9a
commit
4bb8487e2c
@ -36,17 +36,21 @@ std::filesystem::path RawFileNameComponents::master_fname() const {
|
|||||||
fmt::format("{}_master_{}{}", m_base_name, m_file_index, m_ext);
|
fmt::format("{}_master_{}{}", m_base_name, m_file_index, m_ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::filesystem::path RawFileNameComponents::data_fname(size_t mod_id, size_t file_id) const{
|
std::filesystem::path RawFileNameComponents::data_fname(size_t mod_id,
|
||||||
return m_base_path / fmt::format("{}_d{}_f{}_{}.raw", m_base_name,
|
size_t file_id) const {
|
||||||
mod_id, file_id, m_file_index);
|
return m_base_path / fmt::format("{}_d{}_f{}_{}.raw", m_base_name, mod_id,
|
||||||
|
file_id, m_file_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::filesystem::path& RawFileNameComponents::base_path() const { return m_base_path; }
|
const std::filesystem::path &RawFileNameComponents::base_path() const {
|
||||||
const std::string& RawFileNameComponents::base_name() const { return m_base_name; }
|
return m_base_path;
|
||||||
|
}
|
||||||
|
const std::string &RawFileNameComponents::base_name() const {
|
||||||
|
return m_base_name;
|
||||||
|
}
|
||||||
const std::string &RawFileNameComponents::ext() const { return m_ext; }
|
const std::string &RawFileNameComponents::ext() const { return m_ext; }
|
||||||
int RawFileNameComponents::file_index() const { return m_file_index; }
|
int RawFileNameComponents::file_index() const { return m_file_index; }
|
||||||
|
|
||||||
|
|
||||||
RawMasterFile::RawMasterFile(const std::filesystem::path &fpath)
|
RawMasterFile::RawMasterFile(const std::filesystem::path &fpath)
|
||||||
: m_fnc(fpath) {
|
: m_fnc(fpath) {
|
||||||
if (!std::filesystem::exists(fpath)) {
|
if (!std::filesystem::exists(fpath)) {
|
||||||
@ -174,29 +178,15 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
|
|||||||
// keep the optional empty
|
// keep the optional empty
|
||||||
}
|
}
|
||||||
|
|
||||||
// //Update detector type for Moench
|
// Update detector type for Moench
|
||||||
// //TODO! How does this work with old .raw master files?
|
// TODO! How does this work with old .raw master files?
|
||||||
// if (m_type == DetectorType::Moench && m_analog_samples == 0 &&
|
if (m_type == DetectorType::Moench && !m_analog_samples &&
|
||||||
// m_subfile_rows == 400) {
|
m_pixels_y == 400) {
|
||||||
// m_type = DetectorType::Moench03;
|
m_type = DetectorType::Moench03;
|
||||||
// }else if (m_type == DetectorType::Moench && m_subfile_rows == 400 &&
|
} else if (m_type == DetectorType::Moench && m_pixels_y == 400 &&
|
||||||
// m_analog_samples == 5000) {
|
m_analog_samples == 5000) {
|
||||||
// m_type = DetectorType::Moench03_old;
|
m_type = DetectorType::Moench03_old;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// //Here we know we have a ChipTestBoard file update the geometry?
|
|
||||||
// //TODO! Carry on information about digtial, and transceivers
|
|
||||||
// if (m_type == DetectorType::ChipTestBoard) {
|
|
||||||
// subfile_rows = 1;
|
|
||||||
// subfile_cols = m_analog_samples*__builtin_popcount(m_adc_mask);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // only Eiger had quad
|
|
||||||
// if (m_type == DetectorType::Eiger) {
|
|
||||||
// quad = (j["Quad"] == 1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// m_geometry = {j["Geometry"]["y"], j["Geometry"]["x"]};
|
|
||||||
}
|
}
|
||||||
void RawMasterFile::parse_raw(const std::filesystem::path &fpath) {
|
void RawMasterFile::parse_raw(const std::filesystem::path &fpath) {
|
||||||
|
|
||||||
@ -225,7 +215,8 @@ void RawMasterFile::parse_raw(const std::filesystem::path &fpath) {
|
|||||||
} else if (key == "Frame Padding") {
|
} else if (key == "Frame Padding") {
|
||||||
m_frame_padding = std::stoi(value);
|
m_frame_padding = std::stoi(value);
|
||||||
// } else if (key == "Frame Discard Policy"){
|
// } else if (key == "Frame Discard Policy"){
|
||||||
// m_frame_discard_policy = StringTo<FrameDiscardPolicy>(value);
|
// m_frame_discard_policy =
|
||||||
|
// StringTo<FrameDiscardPolicy>(value);
|
||||||
// } else if (key == "Number of rows"){
|
// } else if (key == "Number of rows"){
|
||||||
// m_number_of_rows = std::stoi(value);
|
// m_number_of_rows = std::stoi(value);
|
||||||
} else if (key == "Analog Flag") {
|
} else if (key == "Analog Flag") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user