OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
BeamSequence.cpp
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2// $RCSfile: BeamSequence.cpp,v $
3// ------------------------------------------------------------------------
4// $Revision: 1.1.1.1 $
5// ------------------------------------------------------------------------
6// Copyright: see Copyright.readme
7// ------------------------------------------------------------------------
8//
9// Class: BeamSequence
10// The abstract base class for all OPAL beam sequences (LINE and SEQUENCE).
11//
12// ------------------------------------------------------------------------
13//
14// $Date: 2000/03/27 09:33:34 $
15// $Author: Andreas Adelmann $
16//
17// ------------------------------------------------------------------------
18
22
23// Class BeamSequence
24// ------------------------------------------------------------------------
25
27
28const std::string BeamSequence::getCategory() const { return "SEQUENCE"; }
29
30BeamSequence* BeamSequence::find(const std::string& name) {
32 BeamSequence* bs = dynamic_cast<BeamSequence*>(opal->find(name));
33 if (bs == 0) {
34 throw OpalException(
35 "BeamSequence::find()", "Beam line or sequence \"" + name + "\" not found.");
36 }
37 return bs;
38}
39
40BeamSequence::BeamSequence(int size, const char* name, const char* help)
41 : Element(size, name, help) {}
42
43BeamSequence::BeamSequence(const std::string& name, BeamSequence* parent) : Element(name, parent) {}
The base class for all OPAL beam lines and sequences.
virtual const std::string getCategory() const
Return the object category as a string.
virtual ~BeamSequence()
static BeamSequence * find(const std::string &name)
Find a BeamSequence by name.
The global OPAL structure.
Definition OpalData.h:45
Object * find(const std::string &name)
Find entry.
Definition OpalData.cpp:477
static OpalData * getInstance()
Definition OpalData.cpp:193