1 | #ifndef MARS_MInterpolatePointingPos
|
---|
2 | #define MARS_MInterpolatePointingPos
|
---|
3 |
|
---|
4 | #ifndef MARS_MTask
|
---|
5 | #include "MTask.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TSpline
|
---|
9 | #include <TSpline.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef MARS_MTime
|
---|
13 | #include "MTime.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class MTime;
|
---|
17 | class MPointingPos;
|
---|
18 | class MRawRunHeader;
|
---|
19 | class MDirIter;
|
---|
20 |
|
---|
21 | class MInterpolatePointingPos : public MTask
|
---|
22 | {
|
---|
23 | public:
|
---|
24 |
|
---|
25 | enum TimeMode_t {
|
---|
26 | kRunTime,
|
---|
27 | kEventTime
|
---|
28 | };
|
---|
29 |
|
---|
30 | private:
|
---|
31 |
|
---|
32 | static const Int_t fgNumStartEvents; //! Default for fNumStartEvents (now set to: 10000)
|
---|
33 |
|
---|
34 | Int_t fNumStartEvents; // Start number of allowed events
|
---|
35 |
|
---|
36 | Bool_t fDebug;
|
---|
37 |
|
---|
38 | TString fFilename;
|
---|
39 | MTime fFirstDriveTime;
|
---|
40 | MTime fLastDriveTime;
|
---|
41 |
|
---|
42 | MTime *fEvtTime; //! Raw event time
|
---|
43 | MPointingPos *fPointingPos; //! Telescope pointing postion
|
---|
44 | MRawRunHeader *fRunHeader; //! Run Header
|
---|
45 | MDirIter *fDirIter; //! Dir Iter
|
---|
46 |
|
---|
47 | TSpline3* fSplineZd; //! Zd vs. time
|
---|
48 | TSpline3* fSplineAz; //! Az vs. time
|
---|
49 | TSpline3* fSplineRa; //! Ra vs. time
|
---|
50 | TSpline3* fSplineDec; //! Dec vs. time
|
---|
51 |
|
---|
52 | Int_t PreProcess(MParList *pList);
|
---|
53 | Int_t Process();
|
---|
54 | Bool_t ReadDriveReport();
|
---|
55 |
|
---|
56 | TimeMode_t fTimeMode;
|
---|
57 |
|
---|
58 |
|
---|
59 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
60 |
|
---|
61 | public:
|
---|
62 |
|
---|
63 | MInterpolatePointingPos(const char *name=NULL, const char *title=NULL);
|
---|
64 |
|
---|
65 | ~MInterpolatePointingPos();
|
---|
66 |
|
---|
67 | void AddFiles(MDirIter *dir) { fDirIter = dir; }
|
---|
68 | void AddFile(const char *name) { fFilename = name; }
|
---|
69 |
|
---|
70 | void SetTimeMode( TimeMode_t mode) { fTimeMode = mode; }
|
---|
71 | void SetDebug( const Bool_t b=kTRUE) { fDebug = b; }
|
---|
72 |
|
---|
73 | void Clear(Option_t *o="");
|
---|
74 |
|
---|
75 | Int_t GetNumStartEvents() const { return fNumStartEvents; }
|
---|
76 | void SetNumStartEvents ( const Int_t i=fgNumStartEvents ) { fNumStartEvents = i; }
|
---|
77 |
|
---|
78 | ClassDef(MInterpolatePointingPos, 1) // Interpolate the drive pointing positions
|
---|
79 | };
|
---|
80 |
|
---|
81 | #endif
|
---|
82 |
|
---|
83 |
|
---|
84 |
|
---|
85 |
|
---|