OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Probe.h
Go to the documentation of this file.
1 #ifndef CLASSIC_Probe_HH
2 #define CLASSIC_Probe_HH
3 
5 
6 #include <memory>
7 #include <string>
8 
9 class PeakFinder;
10 
11 // Class Probe
12 // ------------------------------------------------------------------------
14 // Class Probe defines the abstract interface for a probe.
15 
16 class Probe: public PluginElement {
17 
18 public:
20  explicit Probe(const std::string &name);
21 
22  Probe();
23  Probe(const Probe &);
24  void operator=(const Probe &) = delete;
25  virtual ~Probe();
26 
28  virtual void accept(BeamlineVisitor &) const override;
29 
31  void setStep(double step);
33  virtual double getStep() const;
35  virtual ElementBase::ElementType getType() const override;
36 
37 private:
39  virtual void doInitialise(PartBunchBase<double, 3> *bunch) override;
41  virtual bool doCheck(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) override;
43  virtual void doGoOffline() override;
45  virtual bool doPreCheck(PartBunchBase<double, 3>*) override;
46 
47  double step_m;
48  std::unique_ptr<PeakFinder> peakfinder_m;
49 };
50 
51 #endif // CLASSIC_Probe_HH
virtual ~Probe()
Definition: Probe.cpp:24
double step_m
Step size of the probe (bin width in histogram file)
Definition: Probe.h:47
void setStep(double step)
Set probe histogram bin width.
Definition: Probe.cpp:43
virtual ElementBase::ElementType getType() const override
Get element type std::string.
Definition: Probe.cpp:109
virtual void doInitialise(PartBunchBase< double, 3 > *bunch) override
Initialise peakfinder file.
Definition: Probe.cpp:30
virtual bool doCheck(PartBunchBase< double, 3 > *bunch, const int turnnumber, const double t, const double tstep) override
Record probe hits when bunch particles pass.
Definition: Probe.cpp:68
virtual double getStep() const
Member variable access.
Definition: Probe.cpp:47
std::unique_ptr< PeakFinder > peakfinder_m
Pointer to Peakfinder instance.
Definition: Probe.h:48
Interface for probe.
Definition: Probe.h:16
void operator=(const Probe &)=delete
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Probe.
Definition: Probe.cpp:26
const std::string name
virtual void doGoOffline() override
Hook for goOffline.
Definition: Probe.cpp:36
virtual bool doPreCheck(PartBunchBase< double, 3 > *) override
Virtual hook for preCheck.
Definition: Probe.cpp:51
Probe()
Definition: Probe.cpp:11
Abstract algorithm.