OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Diagnostic.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: Diagnostic.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: Diagnostic
10 // Defines the abstract interface for a beam diagnostic.
11 //
12 // ------------------------------------------------------------------------
13 // Class category: AbsBeamline
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:32:31 $
17 // $Author: fci $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "AbsBeamline/Diagnostic.h"
23 
24 
25 // Class Diagnostic
26 // ------------------------------------------------------------------------
27 
29  Component()
30 { }
31 
32 
34  Component(rhs)
35 { }
36 
37 
38 Diagnostic::Diagnostic(const std::string &name):
39  Component(name)
40 { }
41 
42 
44 { }
45 
46 
47 void Diagnostic::accept(BeamlineVisitor &visitor) const {
48  visitor.visitDiagnostic(*this);
49 }
50 
51 void Diagnostic::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
52  RefPartBunch_m = bunch;
53 }
54 
56 { }
57 
58 bool Diagnostic::bends() const {
59  return false;
60 }
61 
63  return DIAGNOSTIC;
64 }
65 
66 void Diagnostic::getDimensions(double &zBegin, double &zEnd) const
67 { }
virtual bool bends() const override
Definition: Diagnostic.cpp:58
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Diagnostic.
Definition: Diagnostic.cpp:47
Interface for beam diagnostics.
Definition: Diagnostic.h:32
virtual ~Diagnostic()
Definition: Diagnostic.cpp:43
virtual void finalise() override
Definition: Diagnostic.cpp:55
PartBunchBase< double, 3 > * RefPartBunch_m
Definition: Component.h:200
virtual ElementBase::ElementType getType() const override
Get element type std::string.
Definition: Diagnostic.cpp:62
virtual void getDimensions(double &zBegin, double &zEnd) const override
Definition: Diagnostic.cpp:66
const std::string name
virtual void visitDiagnostic(const Diagnostic &)=0
Apply the algorithm to a diagnostic.
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
Definition: Diagnostic.cpp:51
Interface for a single beam element.
Definition: Component.h:51
Abstract algorithm.