Commit 01405a79 authored by frey_m's avatar frey_m
Browse files

Merge branch '554-unused-classes-in-src' into 'master'

Resolve "Unused classes in src"

Closes #554

See merge request !390
parents 4848122f 43d81252
......@@ -6,7 +6,6 @@ set (_SRCS
BeamSequence.cpp
Definition.cpp
Directory.cpp
Editor.cpp
Element.cpp
Invalidator.cpp
OpalData.cpp
......@@ -33,7 +32,6 @@ set (HDRS
BeamSequence.h
Definition.h
Directory.h
Editor.h
Element.h
Expressions.h
Invalidator.h
......
// ------------------------------------------------------------------------
// $RCSfile: Editor.cpp,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: Editor
// The base class for all OPAL sequence editor commands.
//
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:33:35 $
// $Author: Andreas Adelmann $
//
// ------------------------------------------------------------------------
#include "AbstractObjects/Editor.h"
// Class Editor
// ------------------------------------------------------------------------
Editor::~Editor()
{}
const std::string Editor::getCategory() const {
return "EDITOR";
}
bool Editor::shouldTrace() const {
return true;
}
bool Editor::shouldUpdate() const {
return false;
}
Editor::Editor(const std::string &name, Editor *parent):
Object(name, parent)
{}
Editor::Editor(int size, const char *name, const char *help):
Object(size, name, help)
{}
#ifndef OPAL_Editor_HH
#define OPAL_Editor_HH
// ------------------------------------------------------------------------
// $RCSfile: Editor.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: Editor
//
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:33:35 $
// $Author: Andreas Adelmann $
//
// ------------------------------------------------------------------------
#include "AbstractObjects/Object.h"
// Class Editor
// ------------------------------------------------------------------------
/// The base class for all OPAL sequence editor commands.
// It implements the common behaviour of editor commands, it can also
// be used via dynamic casting to determine whether an object represents
// an editor command.
class Editor: public Object {
public:
virtual ~Editor();
/// Return the object category as a string.
// Return the string "EDITOR".
virtual const std::string getCategory() const;
/// Trace flag.
// If true, the object's execute() function should be traced.
// Always true for editor commands.
virtual bool shouldTrace() const;
/// Update flag.
// If true, the data structure should be updated before calling execute().
// Always false for editor commands.
virtual bool shouldUpdate() const;
protected:
/// Constructor for exemplars.
Editor(int size, const char *name, const char *help);
/// Constructor for cloning.
Editor(const std::string &name, Editor *parent);
private:
// Not implemented.
Editor();
Editor(const Editor &);
void operator=(const Editor &);
};
#endif // OPAL_Editor_HH
......@@ -4,14 +4,12 @@ set (_SRCS
IndexMap.cpp
Hamiltonian.cpp
lomb.cpp
NilTracker.cpp
MapAnalyser.cpp
MultiBunchHandler.cpp
OrbitThreader.cpp
ParallelCyclotronTracker.cpp
ParallelTTracker.cpp
StepSizeConfig.cpp
ThickMapper.cpp
ThickTracker.cpp
)
......@@ -29,12 +27,10 @@ set (HDRS
lomb.h
MapAnalyser.h
MultiBunchHandler.h
NilTracker.h
OrbitThreader.h
ParallelCyclotronTracker.h
ParallelTTracker.h
StepSizeConfig.h
ThickMapper.h
ThickTracker.h
)
......
//
// Class NilTracker
// :FIXME: Add class description
//
// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
// All rights reserved
//
// This file is part of OPAL.
//
// OPAL is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#include "Algorithms/NilTracker.h"
NilTracker::NilTracker(const Beamline &beamline,
const PartData &reference,
bool revBeam,
bool revTrack):
Tracker(beamline, reference, revBeam, revTrack)
{ }
NilTracker::~NilTracker() {
}
void NilTracker::execute() {
}
\ No newline at end of file
//
// Class NilTracker
// :FIXME: Add class description
//
// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
// All rights reserved
//
// This file is part of OPAL.
//
// OPAL is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#ifndef OPAL_NILTRACKER_H
#define OPAL_NILTRACKER_H
#define NIL_VISITELEMENT(elem) virtual void visit##elem(const elem &) { }
#include "Algorithms/Tracker.h"
class BMultipoleField;
template <class T, unsigned Dim>
class PartBunchBase;
class BeamBeam;
class BeamStripping;
class CCollimator;
class Corrector;
class Degrader;
class Diagnostic;
class Drift;
class ElementBase;
class FlexibleCollimator;
class Lambertson;
class Marker;
class Monitor;
class Multipole;
class ParallelPlate;
class Probe;
class RBend;
class RFCavity;
class RFQuadrupole;
class SBend;
class Separator;
class Septum;
class Solenoid;
class TravelingWave;
class NilTracker: public Tracker {
public:
/// Constructor.
explicit NilTracker(const Beamline &beamline,
const PartData &reference,
bool revBeam,
bool revTrack);
virtual ~NilTracker();
NIL_VISITELEMENT(Beamline)
NIL_VISITELEMENT(BeamBeam)
NIL_VISITELEMENT(BeamStripping)
NIL_VISITELEMENT(CCollimator)
NIL_VISITELEMENT(Corrector)
NIL_VISITELEMENT(Degrader)
NIL_VISITELEMENT(Diagnostic)
NIL_VISITELEMENT(Drift)
NIL_VISITELEMENT(FlexibleCollimator)
NIL_VISITELEMENT(Lambertson)
NIL_VISITELEMENT(Marker)
NIL_VISITELEMENT(Monitor)
NIL_VISITELEMENT(Multipole)
NIL_VISITELEMENT(ParallelPlate)
NIL_VISITELEMENT(Probe)
NIL_VISITELEMENT(RBend)
NIL_VISITELEMENT(RFCavity)
NIL_VISITELEMENT(RFQuadrupole)
NIL_VISITELEMENT(SBend)
NIL_VISITELEMENT(Separator)
NIL_VISITELEMENT(Septum)
NIL_VISITELEMENT(Solenoid)
NIL_VISITELEMENT(TravelingWave)
virtual void execute();
private:
NilTracker();
NilTracker(const NilTracker &);
void operator=(const NilTracker &);
};
#endif // OPAL_NILTRACKER_H
\ No newline at end of file
......@@ -42,10 +42,8 @@
#include "AbsBeamline/Corrector.h"
#include "AbsBeamline/Cyclotron.h"
#include "AbsBeamline/Degrader.h"
#include "AbsBeamline/Diagnostic.h"
#include "AbsBeamline/Drift.h"
#include "AbsBeamline/ElementBase.h"
#include "AbsBeamline/Lambertson.h"
#include "AbsBeamline/Offset.h"
#include "AbsBeamline/Marker.h"
#include "AbsBeamline/Monitor.h"
......@@ -60,11 +58,9 @@
#include "AbsBeamline/RBend.h"
#include "AbsBeamline/Ring.h"
#include "AbsBeamline/RFCavity.h"
#include "AbsBeamline/RFQuadrupole.h"
#include "AbsBeamline/SBend.h"
#include "AbsBeamline/SBend3D.h"
#include "AbsBeamline/ScalingFFAMagnet.h"
#include "AbsBeamline/Separator.h"
#include "AbsBeamline/Septum.h"
#include "AbsBeamline/Solenoid.h"
#include "AbsBeamline/Stripper.h"
......@@ -568,14 +564,6 @@ void ParallelCyclotronTracker::visitCyclotron(const Cyclotron &cycl) {
buildupFieldList(BcParameter, ElementBase::CYCLOTRON, cycl_m);
}
/**
* Not implemented and most probable never used
*
*/
void ParallelCyclotronTracker::visitBeamBeam(const BeamBeam &) {
*gmsg << "In BeamBeam tracker is missing " << endl;
}
void ParallelCyclotronTracker::visitBeamStripping(const BeamStripping &bstp) {
*gmsg << "* ------------------------------ Beam Stripping ------------------------------" << endl;
......@@ -677,16 +665,6 @@ void ParallelCyclotronTracker::visitDegrader(const Degrader &deg) {
}
/**
*
*
* @param diag
*/
void ParallelCyclotronTracker::visitDiagnostic(const Diagnostic &diag) {
*gmsg << "In Diagnostic; L= " << diag.getElementLength() << endl;
myElements.push_back(dynamic_cast<Diagnostic *>(diag.clone()));
}
/**
*
*
......@@ -706,16 +684,6 @@ void ParallelCyclotronTracker::visitFlexibleCollimator(const FlexibleCollimator
}
/**
*
*
* @param lamb
*/
void ParallelCyclotronTracker::visitLambertson(const Lambertson &lamb) {
*gmsg << "In Lambertson; L= " << lamb.getElementLength() << endl;
myElements.push_back(dynamic_cast<Lambertson *>(lamb.clone()));
}
void ParallelCyclotronTracker::visitOffset(const Offset & off) {
if (opalRing_m == NULL)
throw OpalException(
......@@ -1010,16 +978,6 @@ void ParallelCyclotronTracker::visitRFCavity(const RFCavity &as) {
buildupFieldList(BcParameter, ElementBase::RFCAVITY, elptr);
}
/**
*
*
* @param rfq
*/
void ParallelCyclotronTracker::visitRFQuadrupole(const RFQuadrupole &rfq) {
*gmsg << "In RFQuadrupole; L = " << rfq.getElementLength() << " however the element is missing " << endl;
myElements.push_back(dynamic_cast<RFQuadrupole *>(rfq.clone()));
}
/**
*
*
......@@ -1030,16 +988,6 @@ void ParallelCyclotronTracker::visitSBend(const SBend &bend) {
myElements.push_back(dynamic_cast<SBend *>(bend.clone()));
}
/**
*
*
* @param sep
*/
void ParallelCyclotronTracker::visitSeparator(const Separator &sep) {
*gmsg << "In Separator L= " << sep.getElementLength() << " however the element is missing " << endl;
myElements.push_back(dynamic_cast<Separator *>(sep.clone()));
}
/**
*
*
......@@ -1097,15 +1045,6 @@ void ParallelCyclotronTracker::visitSolenoid(const Solenoid &solenoid) {
}
}
/**
*
*
* @param pplate
*/
void ParallelCyclotronTracker::visitParallelPlate(const ParallelPlate &/*pplate*/) {
//do nothing
}
/**
*
*
......
......@@ -94,9 +94,6 @@ public:
/// Apply the algorithm to a RFCavity.
virtual void visitRFCavity(const RFCavity &);
/// Apply the algorithm to a BeamBeam.
virtual void visitBeamBeam(const BeamBeam &);
/// Apply the algorithm to a Beam Stripping.
virtual void visitBeamStripping(const BeamStripping &);
......@@ -109,18 +106,12 @@ public:
/// Apply the algorithm to a Degrader
virtual void visitDegrader(const Degrader &);
/// Apply the algorithm to a Diagnostic.
virtual void visitDiagnostic(const Diagnostic &);
/// Apply the algorithm to a Drift.
virtual void visitDrift(const Drift &);
/// Apply the algorithm to a flexible collimator
virtual void visitFlexibleCollimator(const FlexibleCollimator &);
/// Apply the algorithm to a Lambertson.
virtual void visitLambertson(const Lambertson &);
/// Apply the algorithm to a Marker.
virtual void visitMarker(const Marker &);
......@@ -151,9 +142,6 @@ public:
/// Apply the algorithm to a RBend.
virtual void visitRBend(const RBend &);
/// Apply the algorithm to a RFQuadrupole.
virtual void visitRFQuadrupole(const RFQuadrupole &);
/// Apply the algorithm to a SBend.
virtual void visitSBend(const SBend &);
......@@ -163,9 +151,6 @@ public:
/// Apply the algorithm to a ScalingFFAMagnet.
virtual void visitScalingFFAMagnet(const ScalingFFAMagnet &bend);
/// Apply the algorithm to a Separator.
virtual void visitSeparator(const Separator &);
/// Apply the algorithm to a Septum.
virtual void visitSeptum(const Septum &);
......@@ -175,9 +160,6 @@ public:
/// Apply the algorithm to a charge stripper.
virtual void visitStripper(const Stripper &);
/// Apply the algorithm to a ParallelPlate, it is empty for cyclotrontracker .
virtual void visitParallelPlate(const ParallelPlate &);
/// Apply the algorithm to a VariabelRFCavity.
virtual void visitVariableRFCavity(const VariableRFCavity &cav);
......
......@@ -34,16 +34,13 @@
#include "Algorithms/OrbitThreader.h"
#include "Algorithms/IndexMap.h"
#include "AbsBeamline/BeamBeam.h"
#include "AbsBeamline/BeamStripping.h"
#include "AbsBeamline/CCollimator.h"
#include "AbsBeamline/Corrector.h"
#include "AbsBeamline/Diagnostic.h"
#include "AbsBeamline/Degrader.h"
#include "AbsBeamline/Drift.h"
#include "AbsBeamline/FlexibleCollimator.h"
#include "AbsBeamline/ElementBase.h"
#include "AbsBeamline/Lambertson.h"
#include "AbsBeamline/Marker.h"
#include "AbsBeamline/Monitor.h"
#include "AbsBeamline/Multipole.h"
......@@ -53,12 +50,9 @@
#include "AbsBeamline/RBend3D.h"
#include "AbsBeamline/RFCavity.h"
#include "AbsBeamline/TravelingWave.h"
#include "AbsBeamline/RFQuadrupole.h"
#include "AbsBeamline/SBend.h"
#include "AbsBeamline/Separator.h"
#include "AbsBeamline/Septum.h"
#include "AbsBeamline/Solenoid.h"
#include "AbsBeamline/ParallelPlate.h"
#include "Beamlines/Beamline.h"
#include "Elements/OpalBeamline.h"
......@@ -103,9 +97,6 @@ public:
virtual ~ParallelTTracker();
/// Apply the algorithm to a BeamBeam.
virtual void visitBeamBeam(const BeamBeam &);
/// Apply the algorithm to a BeamStripping.
virtual void visitBeamStripping(const BeamStripping &);
......@@ -119,18 +110,12 @@ public:
/// Apply the algorithm to a Degrader.
virtual void visitDegrader(const Degrader &);
/// Apply the algorithm to a Diagnostic.
virtual void visitDiagnostic(const Diagnostic &);
/// Apply the algorithm to a Drift.
virtual void visitDrift(const Drift &);
/// Apply the algorithm to a flexible collimator
virtual void visitFlexibleCollimator(const FlexibleCollimator &);
/// Apply the algorithm to a Lambertson.
virtual void visitLambertson(const Lambertson &);
/// Apply the algorithm to a Marker.
virtual void visitMarker(const Marker &);
......@@ -158,15 +143,9 @@ public:
/// Apply the algorithm to a RFCavity.
virtual void visitTravelingWave(const TravelingWave &);
/// Apply the algorithm to a RFQuadrupole.
virtual void visitRFQuadrupole(const RFQuadrupole &);
/// Apply the algorithm to a SBend.
virtual void visitSBend(const SBend &);
/// Apply the algorithm to a Separator.
virtual void visitSeparator(const Separator &);
/// Apply the algorithm to a Septum.
virtual void visitSeptum(const Septum &);
......@@ -176,9 +155,6 @@ public:
/// Apply the algorithm to a Solenoid.
virtual void visitSource(const Source &);
/// Apply the algorithm to a ParallelPlate.
virtual void visitParallelPlate(const ParallelPlate &);
/// Apply the algorithm to a beam line.
// overwrite the execute-methode from DefaultVisitor
virtual void visitBeamline(const Beamline &);
......@@ -292,9 +268,6 @@ private:
void evenlyDistributeParticles();
};
inline void ParallelTTracker::visitBeamBeam(const BeamBeam &bb) {
itsOpalBeamline_m.visit(bb, *this, itsBunch_m);
}
inline void ParallelTTracker::visitBeamStripping(const BeamStripping &bstp) {
itsOpalBeamline_m.visit(bstp, *this, itsBunch_m);
......@@ -315,11 +288,6 @@ inline void ParallelTTracker::visitDegrader(const Degrader &deg) {
}
inline void ParallelTTracker::visitDiagnostic(const Diagnostic &diag) {
itsOpalBeamline_m.visit(diag, *this, itsBunch_m);
}
inline void ParallelTTracker::visitDrift(const Drift &drift) {
itsOpalBeamline_m.visit(drift, *this, itsBunch_m);
}
......@@ -330,11 +298,6 @@ inline void ParallelTTracker::visitFlexibleCollimator(const FlexibleCollimator &
}
inline void ParallelTTracker::visitLambertson(const Lambertson &lamb) {
itsOpalBeamline_m.visit(lamb, *this, itsBunch_m);
}
inline void ParallelTTracker::visitMarker(const Marker &marker) {
itsOpalBeamline_m.visit(marker, *this, itsBunch_m);
}
......@@ -376,20 +339,11 @@ inline void ParallelTTracker::visitTravelingWave(const TravelingWave &as) {
}
inline void ParallelTTracker::visitRFQuadrupole(const RFQuadrupole &rfq) {
itsOpalBeamline_m.visit(rfq, *this, itsBunch_m);
}
inline void ParallelTTracker::visitSBend(const SBend &bend) {
itsOpalBeamline_m.visit(bend, *this, itsBunch_m);
}
inline void ParallelTTracker::visitSeparator(const Separator &sep) {
itsOpalBeamline_m.visit(sep, *this, itsBunch_m);
}
inline void ParallelTTracker::visitSeptum(const Septum &sept) {
itsOpalBeamline_m.visit(sept, *this, itsBunch_m);
}
......@@ -403,10 +357,6 @@ inline void ParallelTTracker::visitSource(const Source &source) {
itsOpalBeamline_m.visit(source, *this, itsBunch_m);
}
inline void ParallelTTracker::visitParallelPlate(const ParallelPlate &pplate) {
itsOpalBeamline_m.visit(pplate, *this, itsBunch_m);
}
inline void ParallelTTracker::kickParticles(const BorisPusher &pusher) {
int localNum = itsBunch_m->getLocalNum();
for (int i = 0; i < localNum; ++i)
......
This diff is collapsed.
#ifndef OPAL_ThickMapper_HH
#define OPAL_ThickMapper_HH
// ------------------------------------------------------------------------