mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-17 01:37:13 +02:00
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:
@ -1,18 +0,0 @@
|
||||
#include "aare/FileFactory.hpp"
|
||||
#include "aare/JsonFile.hpp"
|
||||
class JsonFileFactory: public FileFactory
|
||||
{
|
||||
private:
|
||||
/* data */
|
||||
public:
|
||||
JsonFileFactory(std::filesystem::path fpath);
|
||||
virtual JsonFile* load_file() override;
|
||||
void parse_metadata(File*) override;
|
||||
void parse_fname(File*) override;
|
||||
void open_subfiles(File*);
|
||||
sls_detector_header read_header(const std::filesystem::path &fname);
|
||||
void find_geometry(File*);
|
||||
|
||||
|
||||
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
#include "aare/File.hpp"
|
||||
|
||||
|
||||
class JsonFile : public File {
|
||||
class RawFile : public File {
|
||||
|
||||
using config = RawFileConfig;
|
||||
public:
|
||||
@ -38,5 +38,5 @@ class JsonFile : public File {
|
||||
return this->base_path / fmt::format("{}_d{}_f{}_{}.raw", this->base_name, file_id, mod_id, this->findex);
|
||||
}
|
||||
|
||||
~JsonFile();
|
||||
~RawFile();
|
||||
};
|
@ -1,8 +1,16 @@
|
||||
#include "aare/File.hpp"
|
||||
#include <filesystem>
|
||||
class RawFileFactory{
|
||||
public:
|
||||
// RawFileFactory();
|
||||
// ~RawFileFactory();
|
||||
File loadFile(std::filesystem::path fpath);
|
||||
};
|
||||
#include "aare/FileFactory.hpp"
|
||||
#include "aare/RawFile.hpp"
|
||||
class RawFileFactory : public FileFactory {
|
||||
private:
|
||||
void parse_json_metadata(RawFile *file);
|
||||
void parse_raw_metadata(RawFile *file);
|
||||
|
||||
public:
|
||||
RawFileFactory(std::filesystem::path fpath);
|
||||
virtual RawFile *load_file() override;
|
||||
void parse_metadata(File *) override;
|
||||
void parse_fname(File *) override;
|
||||
void open_subfiles(File *);
|
||||
sls_detector_header read_header(const std::filesystem::path &fname);
|
||||
void find_geometry(File *);
|
||||
};
|
||||
|
@ -19,6 +19,8 @@ class SubFile {
|
||||
std::map<std::pair<DetectorType, int>, pfunc> read_impl_map = {
|
||||
{{DetectorType::Moench, 16}, &SubFile::read_impl_reorder<uint16_t>},
|
||||
{{DetectorType::Jungfrau, 16}, &SubFile::read_impl_normal},
|
||||
{{DetectorType::ChipTestBoard,16}, &SubFile::read_impl_normal},
|
||||
{{DetectorType::Mythen3, 32}, &SubFile::read_impl_normal}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user