Beamline.h 1.97 KB
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#ifndef CLASSIC_Beamline_HH
#define CLASSIC_Beamline_HH

// ------------------------------------------------------------------------
// $RCSfile: Beamline.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: Beamline
//
// ------------------------------------------------------------------------
// Class category: Beamlines
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:32:34 $
// $Author: fci $
//
// ------------------------------------------------------------------------

#include "AbsBeamline/ElementBase.h"
24 25
#include "Algorithms/Vektor.h"
#include "Algorithms/Quaternion.h"
gsell's avatar
gsell committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

class CLRangeError;


// Class Beamline
// ------------------------------------------------------------------------
/// An abstract sequence of beam line components.
//  A beam line is built as a list of objects derived from  ElmPtr. Each
//  ElmPtr (``element pointer'') points to a  ElementBase, and may contain
//  additional data describing the position, like lattice functions etc.

class Beamline: public ElementBase {

public:

    /// Constructor with given name.
42
    explicit Beamline(const std::string &name);
gsell's avatar
gsell committed
43 44 45 46 47 48 49 50 51 52 53

    Beamline();
    Beamline(const Beamline &);
    virtual ~Beamline();

    /// Apply visitor to all elements of the line.
    //  If the parameter [b]reverse[/b] is true, theline is traversed in
    //  reverse direction.  If any error occurs, this method may throw an
    //  exception.
    virtual void iterate(BeamlineVisitor &, bool reverse) const = 0;

54
    virtual Vector_t getOrigin3D() const;
55
    virtual Quaternion getInitialDirection() const;
56
    virtual bool getRelativeFlag() const;
gsell's avatar
gsell committed
57 58 59 60 61 62
private:

    // Not implemented.
    void operator=(const Beamline &);
};

63
#endif // CLASSIC_Beamline_HH