![]() |
SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
|
#include "SHiP/FieldService/FieldMap.h"#include "SHiP/FieldService/IFieldSource.h"#include <array>#include <cstdint>#include <memory>#include <span>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | SHiP::FieldMapWriteOptions |
| class | SHiP::FieldMapSource |
IFieldSource with one evaluator per magnet, read from field-map files. More... | |
| struct | SHiP::FieldMapSource::MagnetConfig |
| struct | SHiP::FieldMapPlacements |
| Contents of a placement manifest: where each magnet's map sits, and the geometry version those positions were taken from. More... | |
Namespaces | |
| namespace | SHiP |
Functions | |
| std::vector< FieldMap > | SHiP::readFieldMaps (std::string const &path) |
Read every map in path. | |
| FieldMap | SHiP::readFieldMap (std::string const &path, std::string const &name) |
Read the map called name from path; throws if there is none. | |
| void | SHiP::writeFieldMaps (std::string const &path, std::span< FieldMap const > maps, FieldMapWriteOptions const &options={}) |
Write maps to a new file at path, replacing any existing file. | |
| std::shared_ptr< IFieldEvaluator > | SHiP::loadFieldMap (std::string const &file, std::string const &map) |
Evaluator for map map in file. | |
| FieldMapPlacements | SHiP::readFieldMapPlacements (std::string const &path) |
Read the placement manifest at path, resolved as in resolveFieldMapPath (so a bare "placements.json" finds the one under $SHIPFIELD_ROOT/share/field/). | |
Variables | |
| constexpr std::uint16_t | SHiP::kFieldMapFormatMajor = 1 |
| Format version written by this library. | |
| constexpr std::uint16_t | SHiP::kFieldMapFormatMinor = 0 |
| constexpr char const * | SHiP::kFieldMapNTupleName = "field_maps" |
| Name of the RNTuple holding the maps. | |
| constexpr int | SHiP::kPlacementsFormatVersion = 1 |
| Placement manifest version this library reads (docs/placements_format.md). | |