Class LatticeSequenceCombo
- All Implemented Interfaces:
Comparable<LatticeElement>
,Iterable<LatticeElement>
This class is an extension of the LatticeSequence
class needed
for generating modeling lattices from AcceleratorSeqCombo
hardware structures. We need an extra level of processing to account for the
fact that AcceleratorSeqCombo
flattens out its constituent
sequence objects when requesting the accelerator nodes, that is, you must ask
for the constituent sequences explicitly.
Given a valid ElementMapping
object,
AcceleratorSeqCombo
object, and
SynchronizationManager
for the online model, the
LatticeSequenceCombo
will create an online model
Lattice
object. This object is used by a
ScenarioGenerator
to create a new Scenario
object.
Thus, the actual "lattice generation" is done mostly in the
LatticeSequence
class. The peripheral resources such as hardware
node to model element mappings and synchronization managers are created
outside this class.
- Since:
- Jan 20, 2015
- Author:
- Christopher K. Allen
-
Field Summary
Fields inherited from class xal.sim.scenario.LatticeSequence
EPS
Fields inherited from class xal.sim.scenario.LatticeElement
dblElemCntrPos, dblElemEntrPos, dblElemExitPos, dblElemLen
-
Constructor Summary
ConstructorsConstructorDescriptionLatticeSequenceCombo
(AcceleratorSeqCombo smfSeqCmbRoot, ElementMapping mapNodeToElem) Constructor for lattice combo sequences. -
Method Summary
Modifier and TypeMethodDescriptioncreateModelLattice
(SynchronizationManager mgrSync) Creates a new model lattice object according to the configuration of this lattice sequence.Overrides the base class implementation to return a down class to
.AcceleratorSeqCombo
Methods inherited from class xal.sim.scenario.LatticeSequence
createModelingElement, createModelSequence, createParentLattice, getModelingClass, getNodeToElementMap, getSequenceModelType, getSubSequences, isAxisOriginCentered, isRfCavity, isThin, iterator, toString
Methods inherited from class xal.sim.scenario.LatticeElement
axialTranslation, compareTo, getCenterPosition, getEndPosition, getFirstSlice, getLength, getModelingElementId, getNextSlice, getStartPosition, isArtificial, isContainedIn, isFirstSlice, isLastSlice, setModelingElementId, splitElementAt, splitElementAt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LatticeSequenceCombo
Constructor for lattice combo sequences. Instantiates a new
LatticeSequenceCombo
object for the given accelerator combo sequence under the assumption that that sequence is the top level (i.e., not a sub-sequence).- Parameters:
smfSeqCmbRoot
- top level associated hardware accelerator sequencemapNodeToElem
- the mapping of SMF hardware nodes to modeling element class types- Since:
- Jan 20, 2015 by Christopher K. Allen
-
-
Method Details
-
getHardwareNode
Overrides the base class implementation to return a down class to
. Since this class can only be instantiated with anAcceleratorSeqCombo
AcceleratorSeq
of this child type, this is a save operation.- Overrides:
getHardwareNode
in classLatticeSequence
- Returns:
- the accelerator sequence hardware associated with this lattice sequence object
- Since:
- Jan 20, 2015 by Christopher K. Allen
- See Also:
-
createModelLattice
Description copied from class:LatticeSequence
Creates a new model lattice object according to the configuration of this lattice sequence. The given synchronization manager is populated with synchronization associations for the returned model lattice. However, the synchronization manager is still unbound to any scenario.- Overrides:
createModelLattice
in classLatticeSequence
- Parameters:
mgrSync
- synchronization manager to receive synchronization associations for the model elements in the returned model lattice- Returns:
- new model lattice with the configuration provided by the accelerator sequence given to the public constructor
- Throws:
ModelException
- problem instantiating modeling elements- Since:
- Jan 20, 2015 by Christopher K. Allen
- See Also:
-