Skip to content

File DatFile.h

File List > Beamline > DatFile.h

Go to the documentation of this file

#pragma once

#include <filesystem>
#include <random>
#include <string>
#include <vector>

#include "Core.h"

namespace rayx {
struct DatEntry {
    double m_energy;
    double m_weight;
};

struct DatFile {
    std::string m_title;
    uint32_t m_lineCount;
    double m_start;
    double m_end;
    double m_step;

    double m_weightSum;

    std::vector<DatEntry> m_Lines;

    bool m_continuous;

    static bool load(const std::filesystem::path& filename, DatFile* out);

    [[maybe_unused]] std::string dump();
};
}  // namespace rayx