#ifndef OAEMFIELD_ISOLENOIDFIELDDESCRIPTION_HXX #define OAEMFIELD_ISOLENOIDFIELDDESCRIPTION_HXX #include #include #include //#include namespace COMET{ class ISolenoidFieldDescription; } class COMET::ISolenoidFieldDescription:public COMET::IElementFieldDescription{ public: ISolenoidFieldDescription(); ISolenoidFieldDescription( double current, double coilInnerRadius, double coilOuterRadius, double coilLength, const TVector3* translation, const TRotation* rotation ); /// Copy constructor to handle owned pointers ISolenoidFieldDescription(const ISolenoidFieldDescription& rhs); /// Assignment constructor to handle owned pointers ISolenoidFieldDescription& operator=(ISolenoidFieldDescription rhs); /// Swap function for copy-and-swap idiom friend void swap(ISolenoidFieldDescription& aDescr, ISolenoidFieldDescription& bDescr){ // Swap the base classes swap(static_cast(aDescr), static_cast(bDescr)); // Use std::swap now using std::swap; // Swap the members swap(aDescr.fCurrent, bDescr.fCurrent); swap(aDescr.fLength, bDescr.fLength); swap(aDescr.fInnerR, bDescr.fInnerR); swap(aDescr.fOuterR, bDescr.fOuterR); } virtual ~ISolenoidFieldDescription(); virtual void ls(Option_t* opt = "") const; //virtual COMET::IElementField* Recreate()const; double Current()const{return fCurrent;} double FullLength()const{return fLength;} double InnerR()const{return fInnerR;} double OuterR()const{return fOuterR;} ClassDef(ISolenoidFieldDescription,4); private: double fCurrent; double fLength; double fInnerR; double fOuterR; }; #endif // OAEMFIELD_ISOLENOIDFIELDDESCRIPTION_HXX