Astra1DDynamic_fast.h 1.11 KB
Newer Older
gsell's avatar
gsell committed
1 2 3
#ifndef CLASSIC_AstraFIELDMAP1DDYNAMICFAST_HH
#define CLASSIC_AstraFIELDMAP1DDYNAMICFAST_HH

4
#include "Fields/Astra1D_fast.h"
gsell's avatar
gsell committed
5

6
class Astra1DDynamic_fast: public Astra1D_fast {
gsell's avatar
gsell committed
7 8 9

public:
    virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const;
10
    virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const;
gsell's avatar
gsell committed
11
    virtual void getFieldDimensions(double &zBegin, double &zEnd, double &rBegin, double &rEnd) const;
12
    virtual void getFieldDimensions(double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const;
gsell's avatar
gsell committed
13 14 15 16 17 18 19 20
    virtual void swap();
    virtual void getInfo(Inform *);
    virtual double getFrequency() const;
    virtual void setFrequency(double freq);
    virtual void getOnaxisEz(std::vector<std::pair<double, double> > & F);

private:
    Astra1DDynamic_fast(std::string aFilename);
21
    virtual ~Astra1DDynamic_fast();
gsell's avatar
gsell committed
22 23 24

    virtual void readMap();

25 26
    bool readFileHeader(std::ifstream &file);
    int stripFileHeader(std::ifstream &file);
gsell's avatar
gsell committed
27 28 29 30 31 32 33

    double frequency_m;
    double xlrep_m;

    friend class Fieldmap;
};

34
#endif