#ifndef MARS_MExtrapolatePointingPos
#define MARS_MExtrapolatePointingPos

#ifndef MARS_MTask
#include "MTask.h"
#endif

#ifndef ROOT_TSpline
#include <TSpline.h>
#endif

#ifndef ROOT_TString
#include <TString.h>
#endif

#ifndef MARS_MTime
#include "MTime.h"
#endif


class MTime;
class MPointingPos;
class MRawRunHeader;
class TString;

class MExtrapolatePointingPos : public MTask
{

 private:

    TString fFilename;
    MTime  fFirstDriveTime;
    MTime  fLastDriveTime;

    MTime  *fEvtTime;            // raw event time
    MPointingPos *fPointingPos;  // telescope pointing postion
    MRawRunHeader* fRunHeader;

    TSpline3* fSplineZd;  // Zd vs. time
    TSpline3* fSplineAz;  // Az vs. time
    TSpline3* fSplineRa;  // Ra vs. time
    TSpline3* fSplineDec; // Dec vs. time

    Bool_t fError;        // Flag indicating that error ocurred in Proccess
   
    Int_t PreProcess(MParList *pList);
    Int_t Process();
    Int_t PostProcess();
    Bool_t ReadDriveReport(const TString filename);    


 public:
    
    MExtrapolatePointingPos(const TString reportname, const char *name=NULL, const char *title=NULL);

    ~MExtrapolatePointingPos();


    ClassDef(MExtrapolatePointingPos, 1)  
};

#endif




