Commit c88aec5a authored by gsell's avatar gsell

cleanup: comment-out unused variables in method definitions in Classic

parent 79443cef
......@@ -40,30 +40,30 @@ BeamBeam::BeamBeam(const std::string &name):
{}
BeamBeam::~BeamBeam()
{}
BeamBeam::~BeamBeam() {
}
void BeamBeam::accept(BeamlineVisitor &visitor) const {
visitor.visitBeamBeam(*this);
}
void BeamBeam::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
void BeamBeam::initialise(PartBunchBase<double, 3> *bunch, double & /*startField*/, double &/*endField*/) {
RefPartBunch_m = bunch;
}
void BeamBeam::finalise()
{}
void BeamBeam::finalise() {
}
bool BeamBeam::bends() const {
return false;
}
void BeamBeam::getDimensions(double &zBegin, double &zEnd) const {
void BeamBeam::getDimensions(double & /*zBegin*/, double & /*zEnd*/) const {
}
ElementBase::ElementType BeamBeam::getType() const {
return BEAMBEAM;
}
\ No newline at end of file
}
......@@ -161,23 +161,23 @@ bool BeamStripping::getStop() const {
return stop_m;
}
bool BeamStripping::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) {
bool BeamStripping::apply(const size_t &/*i*/, const double &/*t*/, Vector_t &/*E*/, Vector_t &/*B*/) {
return false;
}
bool BeamStripping::apply(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) {
bool BeamStripping::apply(const Vector_t &/*R*/, const Vector_t &/*P*/, const double &/*t*/, Vector_t &/*E*/, Vector_t &/*B*/) {
return false;
}
bool BeamStripping::checkBeamStripping(Vector_t r, Vector_t rmin, Vector_t rmax) {
bool BeamStripping::checkBeamStripping(Vector_t r, Vector_t /*rmin*/, Vector_t /*rmax*/) {
int pflag = checkPoint(r(0), r(1), r(2));
bool isDead = (pflag != 0);
return isDead;
}
bool BeamStripping::checkBeamStripping(PartBunchBase<double, 3> *bunch, Cyclotron* cycl,
const int turnnumber, const double t, const double tstep) {
const int /*turnnumber*/, const double /*t*/, const double /*tstep*/) {
bool flagNeedUpdate = false;
......@@ -254,7 +254,7 @@ bool BeamStripping::bends() const {
return false;
}
void BeamStripping::getDimensions(double &zBegin, double &zEnd) const {}
void BeamStripping::getDimensions(double &/*zBegin*/, double &/*zEnd*/) const {}
ElementBase::ElementType BeamStripping::getType() const {
return BEAMSTRIPPING;
......@@ -412,4 +412,5 @@ void BeamStripping::getPressureFromFile(const double &scaleFactor) {
fclose(f);
}
#undef CHECK_BSTP_FSCANF_EOF
\ No newline at end of file
#undef CHECK_BSTP_FSCANF_EOF
......@@ -161,10 +161,10 @@ bool Bend2D::apply(const size_t &i,
}
bool Bend2D::apply(const Vector_t &R,
const Vector_t &P,
const double &t,
Vector_t &E,
Vector_t &B) {
const Vector_t &/*P*/,
const double &/*t*/,
Vector_t &/*E*/,
Vector_t &B) {
if(designRadius_m > 0.0) {
......@@ -239,7 +239,7 @@ void Bend2D::initialise(PartBunchBase<double, 3> *bunch,
}
void Bend2D::adjustFringeFields(double ratio) {
findChordLength(*gmsg, chordLength_m);
findChordLength(chordLength_m);
double delta = std::abs(entranceParameter1_m - entranceParameter2_m);
entranceParameter1_m = entranceParameter2_m - delta * ratio;
......@@ -362,8 +362,8 @@ void Bend2D::calcEngeFunction(double zNormalized,
}
}
Vector_t Bend2D::calcCentralField(const Vector_t &R,
double deltaX) {
// :FIXME: is this correct?
Vector_t Bend2D::calcCentralField(const Vector_t &/*R*/, double /*deltaX*/) {
Vector_t B(0, 0, 0);
//double nOverRho = fieldIndex_m / designRadius_m;
......@@ -382,7 +382,7 @@ Vector_t Bend2D::calcCentralField(const Vector_t &R,
}
Vector_t Bend2D::calcEntranceFringeField(const Vector_t &R,
double deltaX) {
double /*deltaX*/) {
const CoordinateSystemTrafo toEntranceRegion(Vector_t(0, 0, entranceParameter2_m),
Quaternion(0, 0, 1, 0));
......@@ -419,7 +419,7 @@ Vector_t Bend2D::calcEntranceFringeField(const Vector_t &R,
}
Vector_t Bend2D::calcExitFringeField(const Vector_t &R,
double deltaX) {
double /*deltaX*/) {
const CoordinateSystemTrafo fromEndToExitRegion(Vector_t(0, 0, exitParameter2_m),
Quaternion(1, 0, 0, 0));
......@@ -517,7 +517,7 @@ bool Bend2D::calculateMapField(const Vector_t &R, Vector_t &B) {
return hitMaterial;
}
void Bend2D::calculateRefTrajectory(double &angleX, double &angleY) {
void Bend2D::calculateRefTrajectory(double &angleX, double &/*angleY*/) {
const double mass = RefPartBunch_m->getM();
const double gamma = designEnergy_m / mass + 1.;
......@@ -693,9 +693,9 @@ void Bend2D::findBendEffectiveLength(double startField, double endField) {
}
void Bend2D::findBendStrength(double mass,
double gamma,
double betaGamma,
double charge) {
double /*gamma*/,
double betaGamma,
double /*charge*/) {
/*
* Use an iterative procedure to set the magnet field amplitude
......@@ -1094,7 +1094,7 @@ void Bend2D::setEngeOriginDelta(double delta) {
* and exit points in the magnet. A positive delta shifts them towards
* the center of the magnet.
*/
findChordLength(*gmsg, chordLength_m);
findChordLength(chordLength_m);
entranceParameter1_m = delta - std::abs(entranceParameter1_m
- entranceParameter2_m);
......@@ -1213,7 +1213,7 @@ void Bend2D::setGapFromFieldMap() {
bool Bend2D::setupBendGeometry(Inform &msg, double &startField, double &endField) {
chordLength_m = 0.0;
if(!findChordLength(msg, chordLength_m))
if(!findChordLength(chordLength_m))
return false;
if(treatAsDrift(msg, chordLength_m)) {
......@@ -1261,7 +1261,7 @@ bool Bend2D::setupBendGeometry(Inform &msg, double &startField, double &endField
}
bool Bend2D::setupDefaultFieldMap(Inform &msg) {
bool Bend2D::setupDefaultFieldMap(Inform &/*msg*/) {
if(length_m <= 0.0) {
ERRORMSG("If using \"1DPROFILE1-DEFAULT\" field map you must set the "
......@@ -1277,7 +1277,7 @@ bool Bend2D::setupDefaultFieldMap(Inform &msg) {
}
void Bend2D::setFieldBoundaries(double startField, double endField) {
void Bend2D::setFieldBoundaries(double startField, double /*endField*/) {
startField_m = startField - deltaBeginEntry_m / cos(entranceAngle_m);
endField_m = (startField + angle_m * designRadius_m +
......@@ -1292,7 +1292,7 @@ void Bend2D::setupPusher(PartBunchBase<double, 3> *bunch) {
}
bool Bend2D::treatAsDrift(Inform &msg, double chordLength) {
bool Bend2D::treatAsDrift(Inform &/*msg*/, double chordLength) {
if(designEnergy_m <= 0.0) {
WARNMSG("Warning: bend design energy is zero. Treating as drift."
<< endl);
......@@ -1728,4 +1728,5 @@ std::array<double,2> Bend2D::getExitFringeFieldLength() const {
extFFL[1] = ( exitParameter2_m-exitParameter1_m ); //before edge
return extFFL;
}
\ No newline at end of file
}
......@@ -65,8 +65,8 @@ public:
/*
* Methods for OPAL-SLICE.
*/
virtual void addKR(int i, double t, Vector_t &K) { };
virtual void addKT(int i, double t, Vector_t &K) { };
virtual void addKR(int /*i*/, double /*t*/, Vector_t &/*K*/) {};
virtual void addKT(int /*i*/, double /*t*/, Vector_t &/*K*/) {};
/*
......@@ -180,8 +180,7 @@ private:
double gamma,
double betaGamma,
double charge);
virtual bool findChordLength(Inform &msg,
double &chordLength) = 0;
virtual bool findChordLength(double &chordLength) = 0;
bool findIdealBendParameters(double chordLength);
bool initializeFieldMap(Inform &msg);
bool inMagnetCentralRegion(const Vector_t &R) const;
......@@ -404,4 +403,5 @@ Vector_t Bend2D::transformToExitRegion(const Vector_t &R) const {
return toExitRegion_m.transformTo(R);
}
#endif // CLASSIC_BEND_H
\ No newline at end of file
#endif // CLASSIC_BEND_H
......@@ -93,7 +93,7 @@ bool CCollimator::doFinaliseCheck(PartBunchBase<double, 3> *bunch, bool flagNeed
return flagNeedUpdate;
}
void CCollimator::doInitialise(PartBunchBase<double, 3> *bunch) {
void CCollimator::doInitialise(PartBunchBase<double, 3> */*bunch*/) {
parmatint_m = getParticleMatterInteraction();
}
......@@ -166,4 +166,5 @@ void CCollimator::doSetGeom() {
// *gmsg << "point " << i << " ( " << geom_m[i].x << ", " << geom_m[i].y << ")" << endl;
// }
// *gmsg << "rmin " << rmin_m << " rmax " << rmax_m << endl;
}
\ No newline at end of file
}
......@@ -97,9 +97,9 @@ ElementBase::ElementType Component::getType() const {
}
bool Component::apply(const size_t &i,
const double &t,
Vector_t &E,
Vector_t &B) {
const double &/*t*/,
Vector_t &/*E*/,
Vector_t &/*B*/) {
const Vector_t &R = RefPartBunch_m->R[i];
if (R(2) >= 0.0 && R(2) < getElementLength()) {
if (!isInsideTransverse(R)) return true;
......@@ -108,10 +108,10 @@ bool Component::apply(const size_t &i,
}
bool Component::apply(const Vector_t &R,
const Vector_t &P,
const double &t,
Vector_t &E,
Vector_t &B) {
const Vector_t &/*P*/,
const double &/*t*/,
Vector_t &/*E*/,
Vector_t &/*B*/) {
if (R(2) >= 0.0 && R(2) < getElementLength()) {
if (!isInsideTransverse(R)) return true;
}
......@@ -119,12 +119,12 @@ bool Component::apply(const Vector_t &R,
}
bool Component::applyToReferenceParticle(const Vector_t &R,
const Vector_t &P,
const double &t,
Vector_t &E,
Vector_t &B) {
const Vector_t &/*P*/,
const double &/*t*/,
Vector_t &/*E*/,
Vector_t &/*B*/) {
if (R(2) >= 0.0 && R(2) < getElementLength()) {
if (!isInsideTransverse(R)) return true;
}
return false;
}
\ No newline at end of file
}
......@@ -99,9 +99,9 @@ public:
// and magnetic fields at point [b]P[/b] for time [b]t[/b].
EBVectors EBfield(const Point3D &P, double t) const;
virtual void addKR(int i, double t, Vector_t &K) {};
virtual void addKR(int, double, Vector_t &/*K*/) {};
virtual void addKT(int i, double t, Vector_t &K) {};
virtual void addKT(int, double, Vector_t &/*K*/) {};
virtual bool apply(const size_t &i,
const double &t,
......@@ -132,13 +132,13 @@ public:
* \returns true if particle is outside the field map, else false
* Default for component is to return false and make no change to A and phi
*/
virtual bool getPotential(const Vector_t &R,
const double &t,
Vector_t &A,
double &phi) {return false;}
virtual bool getPotential(const Vector_t &/*R*/,
const double &/*t*/,
Vector_t &/*A*/,
double &/*phi*/) {return false;}
virtual double getDesignEnergy() const;
virtual void setDesignEnergy(const double& energy, bool changeable);
virtual void setDesignEnergy(const double& energy, bool changeable = true);
virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) = 0;
......@@ -234,7 +234,7 @@ inline EBVectors Component::EBfield(const Point3D &P, double t) const
inline void Component::setExitFaceSlope(const double &m)
{ exit_face_slope_m = m; }
inline void Component::setDesignEnergy(const double& energy, bool changeable = true )
inline void Component::setDesignEnergy(const double &/*energy*/, bool /*changeable*/)
{ }
inline double Component::getDesignEnergy() const
......
......@@ -74,8 +74,8 @@ bool Corrector::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B
bool Corrector::apply(const Vector_t &R,
const Vector_t &P,
const double &t,
Vector_t &E,
const double &/*t*/,
Vector_t &/*E*/,
Vector_t &B) {
if (R(2) >= 0.0 && R(2) < getElementLength()) {
......@@ -151,4 +151,5 @@ void Corrector::getDimensions(double &zBegin, double &zEnd) const
ElementBase::ElementType Corrector::getType() const {
return CORRECTOR;
}
\ No newline at end of file
}
......@@ -375,7 +375,7 @@ bool Cyclotron::apply(const size_t &id, const double &t, Vector_t &E, Vector_t &
return flagNeedUpdate;
}
bool Cyclotron::apply(const Vector_t &R, const Vector_t &P,
bool Cyclotron::apply(const Vector_t &R, const Vector_t &/*P*/,
const double &t, Vector_t &E, Vector_t &B) {
const double rad = std::hypot(R[0],R[1]);
......@@ -1020,7 +1020,7 @@ void Cyclotron::initR(double rmin, double dr, int nrad) {
BP.delr = dr;
}
void Cyclotron::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
void Cyclotron::initialise(PartBunchBase<double, 3> *bunch, double &/*startField*/, double &/*endField*/) {
RefPartBunch_m = bunch;
online_m = true;
}
......@@ -1033,7 +1033,7 @@ void Cyclotron::initialise(PartBunchBase<double, 3> *bunch, const int &fieldflag
}
void Cyclotron::getFieldFromFile_FFA(const double &scaleFactor) {
void Cyclotron::getFieldFromFile_FFA(const double &/*scaleFactor*/) {
/*
Field is read in from ascii file (COSY output) in the order:
......@@ -1520,7 +1520,7 @@ void Cyclotron::getFieldFromFile_Synchrocyclotron(const double &scaleFactor) {
getFieldFromFile_Carbon(scaleFactor);
}
void Cyclotron::getDimensions(double &zBegin, double &zEnd) const
void Cyclotron::getDimensions(double &/*zBegin*/, double &/*zEnd*/) const
{ }
#undef CHECK_CYC_FSCANF_EOF
......
......@@ -87,7 +87,7 @@ inline bool Degrader::isInMaterial(double z ) {
return ((z > 0.0) && (z <= getElementLength()));
}
bool Degrader::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) {
bool Degrader::apply(const size_t &i, const double &t, Vector_t &/*E*/, Vector_t &/*B*/) {
const Vector_t &R = RefPartBunch_m->R[i];
const Vector_t &P = RefPartBunch_m->P[i];
......@@ -117,9 +117,9 @@ bool Degrader::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
bool Degrader::applyToReferenceParticle(const Vector_t &R,
const Vector_t &P,
const double &t,
const double &/*t*/,
Vector_t &E,
Vector_t &B) {
Vector_t &/*B*/) {
if (!isInMaterial(R(2))) return false;
Vector_t updatedP = P;
......@@ -203,4 +203,5 @@ ElementBase::ElementType Degrader::getType() const {
string Degrader::getDegraderShape() {
return "DEGRADER";
}
\ No newline at end of file
}
......@@ -48,7 +48,7 @@ void Diagnostic::accept(BeamlineVisitor &visitor) const {
visitor.visitDiagnostic(*this);
}
void Diagnostic::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
void Diagnostic::initialise(PartBunchBase<double, 3> *bunch, double &/*startField*/, double &/*endField*/) {
RefPartBunch_m = bunch;
}
......@@ -63,5 +63,5 @@ ElementBase::ElementType Diagnostic::getType() const {
return DIAGNOSTIC;
}
void Diagnostic::getDimensions(double &zBegin, double &zEnd) const
{ }
\ No newline at end of file
void Diagnostic::getDimensions(double &/*zBegin*/, double &/*zEnd*/) const
{ }
......@@ -67,7 +67,8 @@ void FlexibleCollimator::accept(BeamlineVisitor &visitor) const {
}
bool FlexibleCollimator::isStopped(const Vector_t &R, const Vector_t &P, double recpgamma) {
bool FlexibleCollimator::isStopped(const Vector_t &R, const Vector_t &, double /*recpgamma*/) {
// :FIXME: why commented out?
const double z = R(2);// + P(2) * recpgamma;
if ((z < 0.0) ||
......@@ -85,7 +86,7 @@ bool FlexibleCollimator::isStopped(const Vector_t &R, const Vector_t &P, double
return false;
}
bool FlexibleCollimator::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) {
bool FlexibleCollimator::apply(const size_t &i, const double &t, Vector_t &/*E*/, Vector_t &/*B*/) {
const Vector_t &R = RefPartBunch_m->R[i];
const Vector_t &P = RefPartBunch_m->P[i];
const double &dt = RefPartBunch_m->dt[i];
......@@ -105,14 +106,22 @@ bool FlexibleCollimator::apply(const size_t &i, const double &t, Vector_t &E, Ve
return pdead;
}
bool FlexibleCollimator::applyToReferenceParticle(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) {
bool FlexibleCollimator::applyToReferenceParticle(
const Vector_t &/*R*/,
const Vector_t &/*P*/,
const double &/*t*/,
Vector_t &/*E*/,
Vector_t &/*B*/) {
return false;
}
// rectangle collimators in cyclotron cyclindral coordinates
// without particlematterinteraction, the particle hitting collimator is deleted directly
bool FlexibleCollimator::checkCollimator(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) {
bool FlexibleCollimator::checkCollimator(
PartBunchBase<double, 3> */*bunch*/,
const int /*turnnumber*/,
const double /*t*/,
const double /*tstep*/) {
return false;
}
......@@ -261,4 +270,5 @@ void FlexibleCollimator::writeHolesAndQuadtree(const std::string &baseFilename)
}
}
\ No newline at end of file
}
......@@ -48,7 +48,7 @@ void Lambertson::accept(BeamlineVisitor &visitor) const {
visitor.visitLambertson(*this);
}
void Lambertson::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
void Lambertson::initialise(PartBunchBase<double, 3> *bunch, double &/*startField*/, double &/*endField*/) {
RefPartBunch_m = bunch;
}
......@@ -59,10 +59,9 @@ bool Lambertson::bends() const {
return false;
}
void Lambertson::getDimensions(double &zBegin, double &zEnd) const {
void Lambertson::getDimensions(double &/*zBegin*/, double &/*zEnd*/) const {
}
ElementBase::ElementType Lambertson::getType() const {
return LAMBERTSON;
}
\ No newline at end of file
}
......@@ -49,7 +49,7 @@ void Marker::accept(BeamlineVisitor &visitor) const {
visitor.visitMarker(*this);
}
void Marker::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
void Marker::initialise(PartBunchBase<double, 3> *bunch, double &/*startField*/, double &/*endField*/) {
RefPartBunch_m = bunch;
}
......@@ -61,10 +61,10 @@ bool Marker::bends() const {
}
void Marker::getDimensions(double &zBegin, double &zEnd) const {
void Marker::getDimensions(double &/*zBegin*/, double &/*zEnd*/) const {
}
ElementBase::ElementType Marker::getType() const {
return MARKER;
}
\ No newline at end of file
}
......@@ -71,7 +71,7 @@ void Monitor::accept(BeamlineVisitor &visitor) const {
visitor.visitMonitor(*this);
}
bool Monitor::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) {
bool Monitor::apply(const size_t &i, const double &t, Vector_t &/*E*/, Vector_t &/*B*/) {
const Vector_t &R = RefPartBunch_m->R[i];
const Vector_t &P = RefPartBunch_m->P[i];
const double &dt = RefPartBunch_m->dt[i];
......@@ -225,4 +225,5 @@ void Monitor::writeStatistics() {
}
statFileEntries_sm.clear();
}
\ No newline at end of file
}
......@@ -168,7 +168,7 @@ std::size_t Multipole::getNSlices() const {
//ff
// radial focussing term
void Multipole::addKR(int i, double t, Vector_t &K) {
void Multipole::addKR(int i, double /*t*/, Vector_t &K) {
Inform msg("Multipole::addK()");
double b = RefPartBunch_m->getBeta(i);
......@@ -192,7 +192,7 @@ void Multipole::addKR(int i, double t, Vector_t &K) {
//ff
//transverse kick
void Multipole::addKT(int i, double t, Vector_t &K) {
void Multipole::addKT(int i, double /*t*/, Vector_t &K) {
Inform msg("Multipole::addK()");
Vector_t tmpE(0.0, 0.0, 0.0);
......@@ -218,7 +218,7 @@ void Multipole::addKT(int i, double t, Vector_t &K) {
K += Vector_t(cf * dx, -cf * dy, 0.0);
}
void Multipole::computeField(Vector_t R, Vector_t &E, Vector_t &B) {
void Multipole::computeField(Vector_t R, Vector_t &/*E*/, Vector_t &B) {
{
std::vector<Vector_t> Rn(max_NormalComponent_m + 1);
std::vector<double> fact(max_NormalComponent_m + 1);
......
......@@ -91,8 +91,8 @@ void MultipoleT::finalise() {
RefPartBunch_m = NULL;
}
bool MultipoleT::apply(const Vector_t &R, const Vector_t &P,
const double &t,Vector_t &E, Vector_t &B) {
bool MultipoleT::apply(const Vector_t &R, const Vector_t &/*P*/,
const double &/*t*/,Vector_t &/*E*/, Vector_t &B) {
/** Rotate coordinates around the central axis of the magnet */
Vector_t R_prime = rotateFrame(R);
/** If magnet is not straight go to local Frenet-Serret coordinates */
......@@ -404,7 +404,7 @@ void MultipoleT::accept(BeamlineVisitor& visitor) const {
visitor.visitMultipoleT(*this);
}
void MultipoleT::getDimensions(double &zBegin, double &zEnd) const {
void MultipoleT::getDimensions(double &/*zBegin*/, double &/*zEnd*/) const {
}
void MultipoleT::setAperture(double vertAp, double horizAp) {
......@@ -535,8 +535,8 @@ void MultipoleT::initialise() {
}
void MultipoleT::initialise(PartBunchBase<double, 3>* bunch,
double &startField,
double &endField) {
double &/*startField*/,
double &/*endField*/) {
RefPartBunch_m = bunch;
initialise();
}
......
......@@ -71,8 +71,8 @@ MultipoleTBase::MultipoleTBase(const MultipoleTBase &right):
MultipoleTBase::~MultipoleTBase() {
}
bool MultipoleTBase::apply(const Vector_t &R, const Vector_t &P,
const double &t,Vector_t &E, Vector_t &B) {
bool MultipoleTBase::apply(const Vector_t &R, const Vector_t &/*P*/,
const double &/*t*/,Vector_t &/*E*/, Vector_t &B) {
/** Rotate coordinates around the central axis of the magnet */
Vector_t R_prime = rotateFrame(R);
/** Go to local Frenet-Serret coordinates */
......