source: trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h@ 8623

Last change on this file since 8623 was 8618, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef MARS_MSrcPosCalc
2#define MARS_MSrcPosCalc
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef ROOT_TVector2
9#include <TVector2.h>
10#endif
11
12class MObservatory;
13class MPointingPos;
14class MPointingDev;
15class MSrcPosCam;
16class MGeomCam;
17class MTime;
18class MVector3;
19class MTaskList;
20
21class MSrcPosCalc : public MTask
22{
23public:
24 enum Mode_t {
25 kDefault = 0,
26 kOffData = 1,
27 kWobble = 2
28 };
29private:
30 enum {
31 kIsOwner = BIT(14)
32 };
33
34 MObservatory *fObservatory;
35 MPointingPos *fPointPos;
36 MPointingPos *fSourcePos;
37 MPointingDev *fDeviation;
38 MSrcPosCam *fSrcPosCam;
39 MSrcPosCam *fSrcPosAnti;
40 MGeomCam *fGeom;
41 MTime *fTime;
42 MTaskList *fCallback;
43
44 UShort_t fRunType; //! Run Type to decide where to get pointing position from
45
46 Int_t fMode;
47
48 // MSrcPosCalc
49 void SetSrcPos(TVector2 v=TVector2()) const;
50 TVector2 CalcXYinCamera(const MVector3 &pos0, const MVector3 &pos) const;
51 TString GetRaDec(const MPointingPos &pos) const;
52 Bool_t GetCoordinate(TString str, Double_t &ret) const;
53 void FreeSourcePos();
54
55 // MParContainer
56 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
57
58 // MTask
59 Bool_t ReInit(MParList *pList);
60 Int_t PreProcess(MParList *pList);
61 Int_t Process();
62
63public:
64 MSrcPosCalc(const char *name=NULL, const char *title=NULL);
65 ~MSrcPosCalc() { FreeSourcePos(); }
66
67 // MSrcPosCalc
68 void SetSourcePos(MPointingPos *pos) { FreeSourcePos(); fSourcePos = pos; }
69 void SetSourcePos(Double_t ra, Double_t dec);
70 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos
71 void SetMode(Mode_t m=kDefault) { fMode = m; }
72 void SetCallback(MTaskList *list) { fCallback=list; }
73
74 ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.