Commit 8997fb4e authored by kraus's avatar kraus

replace all pointers to ElementBase with shared and weak pointers resp.

parent d7d4f1f1
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "AbstractObjects/Element.h" #include "AbstractObjects/Element.h"
#include <memory>
class Beamline; class Beamline;
...@@ -48,7 +50,7 @@ public: ...@@ -48,7 +50,7 @@ public:
/// Return the embedded CLASSIC beam line. /// Return the embedded CLASSIC beam line.
// The result it the ideal line. // The result it the ideal line.
virtual Beamline *fetchLine() const = 0; virtual std::shared_ptr<Beamline> fetchLine() const = 0;
protected: protected:
...@@ -68,4 +70,4 @@ private: ...@@ -68,4 +70,4 @@ private:
void operator=(const BeamSequence &); void operator=(const BeamSequence &);
}; };
#endif // OPAL_BeamSequence_HH #endif // OPAL_BeamSequence_HH
\ No newline at end of file
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
#include "AbstractObjects/Object.h" #include "AbstractObjects/Object.h"
#include "AbstractObjects/Expressions.h" #include "AbstractObjects/Expressions.h"
#include <vector> #include <vector>
#include <memory>
class Attribute; class Attribute;
class Beamline; class Beamline;
...@@ -113,7 +115,7 @@ public: ...@@ -113,7 +115,7 @@ public:
/// Return embedded CLASSIC beamline. /// Return embedded CLASSIC beamline.
// Returns the CLASSIC beamline representing the table. // Returns the CLASSIC beamline representing the table.
// The data of the table are attached to each position in the line. // The data of the table are attached to each position in the line.
virtual const Beamline *getLine() const = 0; virtual std::shared_ptr<const Beamline> getLine() const = 0;
/// Return a table row. /// Return a table row.
// Returns the values stored in the row specified by the first argument, // Returns the values stored in the row specified by the first argument,
...@@ -165,4 +167,4 @@ private: ...@@ -165,4 +167,4 @@ private:
void operator=(const Table &); void operator=(const Table &);
}; };
#endif // OPAL_Table_HH #endif // OPAL_Table_HH
\ No newline at end of file
...@@ -605,7 +605,7 @@ void ParallelTTracker::computeExternalFields(OrbitThreader &oth) { ...@@ -605,7 +605,7 @@ void ParallelTTracker::computeExternalFields(OrbitThreader &oth) {
void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) { void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) {
bool hasWake = false; bool hasWake = false;
WakeFunction *wfInstance; std::shared_ptr<WakeFunction> wfInstance;
Inform msg("ParallelTTracker ", *gmsg); Inform msg("ParallelTTracker ", *gmsg);
...@@ -640,7 +640,7 @@ void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) { ...@@ -640,7 +640,7 @@ void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) {
if (!wakeStatus_m) { if (!wakeStatus_m) {
msg << level2 << "============== START WAKE CALCULATION =============" << endl; msg << level2 << "============== START WAKE CALCULATION =============" << endl;
wfInstance->initialize((*it).get()); wfInstance->initialize(*it);
wakeStatus_m = true; wakeStatus_m = true;
} }
...@@ -677,7 +677,7 @@ void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) { ...@@ -677,7 +677,7 @@ void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) {
void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elements, OrbitThreader &oth) { void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elements, OrbitThreader &oth) {
Inform msg("ParallelTTracker ", *gmsg); Inform msg("ParallelTTracker ", *gmsg);
std::set<IndexMap::value_t::value_type> elementsWithParticleMatterInteraction; std::set<IndexMap::value_t::value_type> elementsWithParticleMatterInteraction;
std::set<ParticleMatterInteractionHandler*> particleMatterinteractionHandlers; std::set<ParticleMatterInteractionHandler::SP> particleMatterinteractionHandlers;
std::pair<double, double> currentRange(0.0, 0.0); std::pair<double, double> currentRange(0.0, 0.0);
while (elements.size() > 0) { while (elements.size() > 0) {
...@@ -698,8 +698,8 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen ...@@ -698,8 +698,8 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
} }
if (elementsWithParticleMatterInteraction.size() > 0) { if (elementsWithParticleMatterInteraction.size() > 0) {
std::set<ParticleMatterInteractionHandler*> oldSPHandlers; std::set<ParticleMatterInteractionHandler::SP> oldSPHandlers;
std::vector<ParticleMatterInteractionHandler*> leftBehindSPHandlers, newSPHandlers; std::vector<ParticleMatterInteractionHandler::SP> leftBehindSPHandlers, newSPHandlers;
for (auto it: activeParticleMatterInteractionHandlers_m) { for (auto it: activeParticleMatterInteractionHandlers_m) {
oldSPHandlers.insert(it); oldSPHandlers.insert(it);
} }
...@@ -738,7 +738,7 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen ...@@ -738,7 +738,7 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
do { do {
///all particles in material if max per node is 2 and other degraders have 0 particles ///all particles in material if max per node is 2 and other degraders have 0 particles
//check if more than one degrader has particles //check if more than one degrader has particles
ParticleMatterInteractionHandler* onlyDegraderWithParticles = NULL; ParticleMatterInteractionHandler::SP onlyDegraderWithParticles = NULL;
int degradersWithParticlesCount = 0; int degradersWithParticlesCount = 0;
for (auto it: activeParticleMatterInteractionHandlers_m) { for (auto it: activeParticleMatterInteractionHandlers_m) {
it->setFlagAllParticlesIn(false); it->setFlagAllParticlesIn(false);
...@@ -979,7 +979,7 @@ void ParallelTTracker::writePhaseSpace(const long long /*step*/, bool psDump, bo ...@@ -979,7 +979,7 @@ void ParallelTTracker::writePhaseSpace(const long long /*step*/, bool psDump, bo
FieldList collimators = itsOpalBeamline_m.getElementByType(ElementBase::CCOLLIMATOR); FieldList collimators = itsOpalBeamline_m.getElementByType(ElementBase::CCOLLIMATOR);
if (collimators.size() != 0) { if (collimators.size() != 0) {
for (FieldList::iterator it = collimators.begin(); it != collimators.end(); ++ it) { for (FieldList::iterator it = collimators.begin(); it != collimators.end(); ++ it) {
FlexibleCollimator* coll = static_cast<FlexibleCollimator*>(it->getElement().get()); std::shared_ptr<FlexibleCollimator> coll = std::static_pointer_cast<FlexibleCollimator>(it->getElement());
std::string name = coll->getName(); std::string name = coll->getName();
unsigned int losses = coll->getLosses(); unsigned int losses = coll->getLosses();
collimatorLosses.push_back(std::make_pair(name, losses)); collimatorLosses.push_back(std::make_pair(name, losses));
...@@ -1216,7 +1216,7 @@ void ParallelTTracker::autophaseCavities(const BorisPusher &pusher) { ...@@ -1216,7 +1216,7 @@ void ParallelTTracker::autophaseCavities(const BorisPusher &pusher) {
auto elementSet = itsOpalBeamline_m.getElements(nextR); auto elementSet = itsOpalBeamline_m.getElements(nextR);
for (auto element: elementSet) { for (auto element: elementSet) {
if (element->getType() == ElementBase::TRAVELINGWAVE) { if (element->getType() == ElementBase::TRAVELINGWAVE) {
const TravelingWave *TWelement = static_cast<const TravelingWave *>(element.get()); std::shared_ptr<const TravelingWave> TWelement = std::static_pointer_cast<const TravelingWave>(element);
if (!TWelement->getAutophaseVeto()) { if (!TWelement->getAutophaseVeto()) {
CavityAutophaser ap(itsReference, element); CavityAutophaser ap(itsReference, element);
ap.getPhaseAtMaxEnergy(itsOpalBeamline_m.transformToLocalCS(element, itsBunch_m->RefPartR_m), ap.getPhaseAtMaxEnergy(itsOpalBeamline_m.transformToLocalCS(element, itsBunch_m->RefPartR_m),
...@@ -1225,7 +1225,7 @@ void ParallelTTracker::autophaseCavities(const BorisPusher &pusher) { ...@@ -1225,7 +1225,7 @@ void ParallelTTracker::autophaseCavities(const BorisPusher &pusher) {
} }
} else if (element->getType() == ElementBase::RFCAVITY) { } else if (element->getType() == ElementBase::RFCAVITY) {
const RFCavity *RFelement = static_cast<const RFCavity *>(element.get()); std::shared_ptr<const RFCavity> RFelement = std::static_pointer_cast<const RFCavity>(element);
if (!RFelement->getAutophaseVeto()) { if (!RFelement->getAutophaseVeto()) {
CavityAutophaser ap(itsReference, element); CavityAutophaser ap(itsReference, element);
ap.getPhaseAtMaxEnergy(itsOpalBeamline_m.transformToLocalCS(element, itsBunch_m->RefPartR_m), ap.getPhaseAtMaxEnergy(itsOpalBeamline_m.transformToLocalCS(element, itsBunch_m->RefPartR_m),
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
#include <list> #include <list>
#include <vector> #include <vector>
#include <memory>
class ParticleMatterInteractionHandler; class ParticleMatterInteractionHandler;
...@@ -205,7 +206,7 @@ private: ...@@ -205,7 +206,7 @@ private:
bool deletedParticles_m; bool deletedParticles_m;
WakeFunction* wakeFunction_m; std::shared_ptr<WakeFunction> wakeFunction_m;
double pathLength_m; double pathLength_m;
...@@ -242,7 +243,7 @@ private: ...@@ -242,7 +243,7 @@ private:
IpplTimings::TimerRef BinRepartTimer_m; IpplTimings::TimerRef BinRepartTimer_m;
IpplTimings::TimerRef WakeFieldTimer_m; IpplTimings::TimerRef WakeFieldTimer_m;
std::set<ParticleMatterInteractionHandler*> activeParticleMatterInteractionHandlers_m; std::set<std::shared_ptr<ParticleMatterInteractionHandler>> activeParticleMatterInteractionHandlers_m;
bool particleMatterStatus_m; bool particleMatterStatus_m;
unsigned long totalParticlesInSimulation_m; unsigned long totalParticlesInSimulation_m;
......
...@@ -69,7 +69,7 @@ BeamStripping::BeamStripping(const BeamStripping &right): ...@@ -69,7 +69,7 @@ BeamStripping::BeamStripping(const BeamStripping &right):
maxr_m(right.maxr_m), maxr_m(right.maxr_m),
minz_m(right.minz_m), minz_m(right.minz_m),
maxz_m(right.maxz_m), maxz_m(right.maxz_m),
parmatint_m(NULL) { parmatint_m(nullptr) {
} }
BeamStripping::BeamStripping(const std::string &name): BeamStripping::BeamStripping(const std::string &name):
...@@ -84,7 +84,7 @@ BeamStripping::BeamStripping(const std::string &name): ...@@ -84,7 +84,7 @@ BeamStripping::BeamStripping(const std::string &name):
maxr_m(0.0), maxr_m(0.0),
minz_m(0.0), minz_m(0.0),
maxz_m(0.0), maxz_m(0.0),
parmatint_m(NULL) { parmatint_m(nullptr) {
} }
...@@ -166,7 +166,7 @@ bool BeamStripping::getStop() const { ...@@ -166,7 +166,7 @@ bool BeamStripping::getStop() const {
} }
bool BeamStripping::checkBeamStripping(PartBunchBase<double, 3> *bunch, std::shared_ptr<Cyclotron> cycl, bool BeamStripping::checkBeamStripping(PartBunchBase<double, 3> *bunch, std::shared_ptr<Cyclotron> const& cycl,
const int /*turnnumber*/, const double /*t*/, const double /*tstep*/) { const int /*turnnumber*/, const double /*t*/, const double /*tstep*/) {
bool flagNeedUpdate = false; bool flagNeedUpdate = false;
...@@ -190,7 +190,7 @@ bool BeamStripping::checkBeamStripping(PartBunchBase<double, 3> *bunch, std::sha ...@@ -190,7 +190,7 @@ bool BeamStripping::checkBeamStripping(PartBunchBase<double, 3> *bunch, std::sha
} }
reduce(&flagNeedUpdate, &flagNeedUpdate + 1, &flagNeedUpdate, OpBitwiseOrAssign()); reduce(&flagNeedUpdate, &flagNeedUpdate + 1, &flagNeedUpdate, OpBitwiseOrAssign());
if (flagNeedUpdate && parmatint_m) { if (flagNeedUpdate && parmatint_m) {
dynamic_cast<BeamStrippingPhysics*>(parmatint_m)->setCyclotron(cycl); std::dynamic_pointer_cast<BeamStrippingPhysics>(parmatint_m)->setCyclotron(cycl);
parmatint_m->apply(bunch, boundingSphere); parmatint_m->apply(bunch, boundingSphere);
} }
return flagNeedUpdate; return flagNeedUpdate;
......
...@@ -27,9 +27,11 @@ ...@@ -27,9 +27,11 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <memory>
class BeamlineVisitor; class BeamlineVisitor;
class Cyclotron; class Cyclotron;
class ParticleMatterInteractionHandler;
struct PFieldData { struct PFieldData {
std::string filename; std::string filename;
...@@ -77,7 +79,7 @@ public: ...@@ -77,7 +79,7 @@ public:
/// Apply visitor to BeamStripping. /// Apply visitor to BeamStripping.
virtual void accept(BeamlineVisitor &) const; virtual void accept(BeamlineVisitor &) const;
virtual bool checkBeamStripping(PartBunchBase<double, 3> *bunch, std::shared_ptr<Cyclotron> cycl, const int turnnumber, const double t, const double tstep); virtual bool checkBeamStripping(PartBunchBase<double, 3> *bunch, std::shared_ptr<Cyclotron> const& cycl, const int turnnumber, const double t, const double tstep);
virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField); virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField);
...@@ -145,7 +147,7 @@ private: ...@@ -145,7 +147,7 @@ private:
double maxz_m; /// mm double maxz_m; /// mm
///@} ///@}
ParticleMatterInteractionHandler *parmatint_m; std::shared_ptr<ParticleMatterInteractionHandler> parmatint_m;
protected: protected:
// object of Matrices including pressure field map and its derivates // object of Matrices including pressure field map and its derivates
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "AbsBeamline/PluginElement.h" #include "AbsBeamline/PluginElement.h"
#include <memory>
class ParticleMatterInteractionHandler; class ParticleMatterInteractionHandler;
class CCollimator: public PluginElement { class CCollimator: public PluginElement {
...@@ -83,7 +85,7 @@ private: ...@@ -83,7 +85,7 @@ private:
///@} ///@}
double rmax_m; ///< maximum extend in r double rmax_m; ///< maximum extend in r
ParticleMatterInteractionHandler *parmatint_m = nullptr; std::shared_ptr<ParticleMatterInteractionHandler> parmatint_m = nullptr;
}; };
inline inline
...@@ -100,4 +102,4 @@ inline ...@@ -100,4 +102,4 @@ inline
double CCollimator::getWidth() { double CCollimator::getWidth() {
return width_m; return width_m;
} }
#endif // CLASSIC_CCollimator_HH #endif // CLASSIC_CCollimator_HH
\ No newline at end of file
...@@ -151,7 +151,7 @@ Channel *ElementBase::getChannel(const std::string &aKey, bool create) { ...@@ -151,7 +151,7 @@ Channel *ElementBase::getChannel(const std::string &aKey, bool create) {
const ConstChannel *ElementBase::getConstChannel(const std::string &aKey) const { const ConstChannel *ElementBase::getConstChannel(const std::string &aKey) const {
// Use const_cast to allow calling the non-const method GetChannel(). // Use const_cast to allow calling the non-const method GetChannel().
// The const return value of this method will nevertheless inhibit set(). // The const return value of this method will nevertheless inhibit set().
return const_cast<ElementBase *>(this)->getChannel(aKey); return const_cast<ElementBase * >(this)->getChannel(aKey);
} }
...@@ -310,15 +310,15 @@ bool ElementBase::update(const AttributeSet &set) { ...@@ -310,15 +310,15 @@ bool ElementBase::update(const AttributeSet &set) {
return true; return true;
} }
void ElementBase::setWake(WakeFunction *wk) { void ElementBase::setWake(std::shared_ptr<WakeFunction> const& wf) {
wake_m = wk;//->clone(getName() + std::string("_wake")); } wake_m = wf;
} }
void ElementBase::setBoundaryGeometry(BoundaryGeometry *geo) { void ElementBase::setBoundaryGeometry(BoundaryGeometry *geo) {
bgeometry_m = geo;//->clone(getName() + std::string("_wake")); } bgeometry_m = geo;//->clone(getName() + std::string("_wake")); }
} }
void ElementBase::setParticleMatterInteraction(ParticleMatterInteractionHandler *parmatint) { void ElementBase::setParticleMatterInteraction(std::shared_ptr<ParticleMatterInteractionHandler> const& parmatint) {
parmatint_m = parmatint; parmatint_m = parmatint;
} }
......
...@@ -399,16 +399,16 @@ public: ...@@ -399,16 +399,16 @@ public:
/// attach a wake field to the element /// attach a wake field to the element
virtual void setWake(WakeFunction *wf); virtual void setWake(std::shared_ptr<WakeFunction> const& wf);
/// return the attached wake object if there is any /// return the attached wake object if there is any
virtual WakeFunction *getWake() const; virtual std::shared_ptr<WakeFunction> getWake() const;
virtual bool hasWake() const; virtual bool hasWake() const;
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys); virtual void setParticleMatterInteraction(std::shared_ptr<ParticleMatterInteractionHandler> const& spys);
virtual ParticleMatterInteractionHandler *getParticleMatterInteraction() const; virtual std::shared_ptr<ParticleMatterInteractionHandler> getParticleMatterInteraction() const;
virtual bool hasParticleMatterInteraction() const; virtual bool hasParticleMatterInteraction() const;
...@@ -466,11 +466,11 @@ private: ...@@ -466,11 +466,11 @@ private:
// The user-defined set of attributes. // The user-defined set of attributes.
AttributeSet userAttribs; AttributeSet userAttribs;
WakeFunction *wake_m; std::shared_ptr<WakeFunction> wake_m;
BoundaryGeometry *bgeometry_m; BoundaryGeometry *bgeometry_m;
ParticleMatterInteractionHandler *parmatint_m; std::shared_ptr<ParticleMatterInteractionHandler> parmatint_m;
bool positionIsFixed; bool positionIsFixed;
///@{ ELEMEDGE attribute ///@{ ELEMEDGE attribute
...@@ -541,12 +541,12 @@ bool ElementBase::isSharable() const ...@@ -541,12 +541,12 @@ bool ElementBase::isSharable() const
{ return shareFlag; } { return shareFlag; }
inline inline
WakeFunction *ElementBase::getWake() const std::shared_ptr<WakeFunction> ElementBase::getWake() const
{ return wake_m; } { return wake_m; }
inline inline
bool ElementBase::hasWake() const bool ElementBase::hasWake() const
{ return wake_m != NULL; } { return wake_m != nullptr; }
inline inline
BoundaryGeometry *ElementBase::getBoundaryGeometry() const BoundaryGeometry *ElementBase::getBoundaryGeometry() const
...@@ -557,12 +557,12 @@ bool ElementBase::hasBoundaryGeometry() const ...@@ -557,12 +557,12 @@ bool ElementBase::hasBoundaryGeometry() const
{ return bgeometry_m != NULL; } { return bgeometry_m != NULL; }
inline inline
ParticleMatterInteractionHandler *ElementBase::getParticleMatterInteraction() const std::shared_ptr<ParticleMatterInteractionHandler> ElementBase::getParticleMatterInteraction() const
{ return parmatint_m; } { return parmatint_m; }
inline inline
bool ElementBase::hasParticleMatterInteraction() const bool ElementBase::hasParticleMatterInteraction() const
{ return parmatint_m != NULL; } { return parmatint_m != nullptr; }
inline inline
void ElementBase::setCSTrafoGlobal2Local(const CoordinateSystemTrafo &trafo) void ElementBase::setCSTrafoGlobal2Local(const CoordinateSystemTrafo &trafo)
......
...@@ -80,7 +80,7 @@ private: ...@@ -80,7 +80,7 @@ private:
unsigned int losses_m; unsigned int losses_m;
std::unique_ptr<LossDataSink> lossDs_m; std::unique_ptr<LossDataSink> lossDs_m;
ParticleMatterInteractionHandler *parmatint_m; std::shared_ptr<ParticleMatterInteractionHandler> parmatint_m;
}; };
inline inline
...@@ -108,4 +108,4 @@ std::string FlexibleCollimator::getDescription() const { ...@@ -108,4 +108,4 @@ std::string FlexibleCollimator::getDescription() const {
return description_m; return description_m;
} }
#endif // CLASSIC_FlexibleCollimator_HH #endif // CLASSIC_FlexibleCollimator_HH
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// Class Integrator // Class Integrator
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
Integrator::Integrator(ElementBase *elem): Integrator::Integrator(ElementBase::SP const& elem):
ElementBase(elem->getName()), itsElement(elem) ElementBase(elem->getName()), itsElement(elem)
{} {}
...@@ -42,4 +42,4 @@ Integrator::~Integrator() ...@@ -42,4 +42,4 @@ Integrator::~Integrator()
void Integrator::makeSharable() { void Integrator::makeSharable() {
shareFlag = true; shareFlag = true;
itsElement->makeSharable(); itsElement->makeSharable();
} }
\ No newline at end of file
...@@ -42,12 +42,12 @@ class Integrator: public ElementBase { ...@@ -42,12 +42,12 @@ class Integrator: public ElementBase {
public: public:
explicit Integrator(ElementBase *); explicit Integrator(ElementBase::SP const& );
Integrator(const Integrator &rhs); Integrator(const Integrator &rhs);
virtual ~Integrator(); virtual ~Integrator();
/// Return the embedded element. /// Return the embedded element.
inline ElementBase *getElement() const; inline ElementBase::SP getElement() const;
/// Set sharable flag. /// Set sharable flag.
// The whole structure depending on [b]this[/b] is marked as sharable. // The whole structure depending on [b]this[/b] is marked as sharable.
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
protected: protected:
/// Pointer to the replaced element. /// Pointer to the replaced element.
Pointer<ElementBase> itsElement; ElementBase::SP itsElement;
private: private:
...@@ -94,8 +94,8 @@ private: ...@@ -94,8 +94,8 @@ private:
// Implementation. // Implementation.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
inline ElementBase *Integrator::getElement() const { inline ElementBase::SP Integrator::getElement() const {
return &*itsElement; return itsElement;
} }
#endif // CLASSIC_Integrator_HH #endif // CLASSIC_Integrator_HH
\ No newline at end of file
...@@ -33,7 +33,7 @@ ElmPtr::ElmPtr(const ElmPtr &rhs): ...@@ -33,7 +33,7 @@ ElmPtr::ElmPtr(const ElmPtr &rhs):
{} {}
ElmPtr::ElmPtr(ElementBase *elem): ElmPtr::ElmPtr(ElementBase::SP const& elem):
itsElement(elem) itsElement(elem)
{} {}
...@@ -44,4 +44,4 @@ ElmPtr::~ElmPtr() ...@@ -44,4 +44,4 @@ ElmPtr::~ElmPtr()
void ElmPtr::accept(BeamlineVisitor &visitor) const { void ElmPtr::accept(BeamlineVisitor &visitor) const {
itsElement->accept(visitor); itsElement->accept(visitor);
} }
\ No newline at end of file
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
ElmPtr(); ElmPtr();
ElmPtr(const ElmPtr &); ElmPtr(const ElmPtr &);
ElmPtr(ElementBase *); ElmPtr(ElementBase::SP const& );
virtual ~ElmPtr(); virtual ~ElmPtr();
/// Apply visitor. /// Apply visitor.
......
...@@ -20,10 +20,11 @@ ...@@ -20,10 +20,11 @@
// //
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
#include "AbsBeamline/Definition.h"
#include <string> #include <string>
#include <memory> #include <memory>
class ElementBase;
class AttributeSet;