OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ReferencePathSegment.h
Go to the documentation of this file.
1#ifndef OPALX_ReferencePathSegment_HH
2#define OPALX_ReferencePathSegment_HH
3
5
6#include <optional>
7#include <set>
8
20public:
21 using element_set_t = std::set<std::shared_ptr<Component>>;
22
24 double begin = 0.0, double end = 0.0, const element_set_t& activeElements = {},
25 const std::optional<double>& legacyElementEdge = std::nullopt)
26 : begin_m(begin),
27 end_m(end),
28 activeElements_m(activeElements),
29 legacyElementEdge_m(legacyElementEdge) {}
30
31 double getBegin() const { return begin_m; }
32 double getEnd() const { return end_m; }
34 bool hasLegacyElementEdge() const { return legacyElementEdge_m.has_value(); }
35 const std::optional<double>& getLegacyElementEdge() const { return legacyElementEdge_m; }
36
37private:
38 double begin_m;
39 double end_m;
41 std::optional<double> legacyElementEdge_m;
42};
43
44#endif
Defines the abstract interface for a single beamline component in the accelerator model.
Reference-coordinate interval with optional legacy ELEMEDGE anchor.
const element_set_t & getActiveElements() const
ReferencePathSegment(double begin=0.0, double end=0.0, const element_set_t &activeElements={}, const std::optional< double > &legacyElementEdge=std::nullopt)
const std::optional< double > & getLegacyElementEdge() const
std::set< std::shared_ptr< Component > > element_set_t
std::optional< double > legacyElementEdge_m