OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
src
src
Lines
SequenceMember.cpp
Go to the documentation of this file.
1
// ------------------------------------------------------------------------
2
// $RCSfile: SequenceMember.cpp,v $
3
// ------------------------------------------------------------------------
4
// $Revision: 1.2 $
5
// ------------------------------------------------------------------------
6
// Copyright: see Copyright.readme
7
// ------------------------------------------------------------------------
8
//
9
// Class: SequenceMember
10
// A SequenceMember includes the special data required for OPAL sequences.
11
//
12
// ------------------------------------------------------------------------
13
//
14
// $Date: 2001/08/13 15:16:16 $
15
// $Author: jowett $
16
//
17
// ------------------------------------------------------------------------
18
19
#include "
Lines/SequenceMember.h
"
20
#include "
AbsBeamline/ElementBase.h
"
21
22
23
// Class SequenceMember
24
// ------------------------------------------------------------------------
25
26
SequenceMember::SequenceMember
():
27
FlaggedElmPtr
(),
28
itsPosition(0.0), itsFlag(ABSOLUTE), itsType(
UNKNOWN
),
OpalElement
()
29
{}
30
31
32
SequenceMember::SequenceMember
(
const
SequenceMember
&rhs):
33
FlaggedElmPtr
(rhs),
34
itsPosition(rhs.itsPosition),
35
itsFlag(rhs.itsFlag),
36
itsType(rhs.itsType),
37
OpalElement
(rhs.
OpalElement
)
38
{}
39
40
41
SequenceMember::~SequenceMember
()
42
{}
43
44
45
void
SequenceMember::setLength
(
double
drift) {
46
if
(
itsType
==
GENERATED
)
getElement
()->
setElementLength
(drift);
47
}
ElementBase.h
UNKNOWN
@ UNKNOWN
Definition:
Fieldmap.h:15
SequenceMember.h
ElementBase::setElementLength
virtual void setElementLength(double length)
Set design length.
Definition:
ElementBase.h:436
ElmPtr::getElement
ElementBase * getElement() const
Get the element pointer.
Definition:
ElmPtr.h:58
FlaggedElmPtr
A section of a beam line.
Definition:
FlaggedElmPtr.h:36
OpalElement
Definition:
OpalElement.h:28
SequenceMember
A member of a SEQUENCE.
Definition:
SequenceMember.h:29
SequenceMember::SequenceMember
SequenceMember()
Definition:
SequenceMember.cpp:26
SequenceMember::itsType
MemberType itsType
Type word.
Definition:
SequenceMember.h:71
SequenceMember::GENERATED
@ GENERATED
Definition:
SequenceMember.h:38
SequenceMember::~SequenceMember
~SequenceMember()
Definition:
SequenceMember.cpp:41
SequenceMember::setLength
void setLength(double drift)
Store the drift length for a generated drift.
Definition:
SequenceMember.cpp:45
Generated on Wed Aug 25 2021 16:41:04 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.1