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

Last change on this file since 6976 was 6912, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.6 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 MSrcPosCam;
15class MGeomCam;
16class MTime;
17class MVector3;
18
19class MSrcPosCalc : public MTask
20{
21private:
22 enum {
23 kIsOwner = BIT(14)
24 };
25
26 MObservatory *fObservatory;
27 MPointingPos *fPointPos;
28 MPointingPos *fSourcePos;
29 MSrcPosCam *fSrcPosCam;
30 MSrcPosCam *fSrcPosAnti;
31 MGeomCam *fGeom;
32 MTime *fTime;
33
34 UShort_t fRunType; //! Run Type to decide where to get pointing position from
35
36 Bool_t fIsWobbleMode;
37
38 // MSrcPosCalc
39 void SetSrcPos(TVector2 v) const;
40 TVector2 CalcXYinCamera(const MVector3 &pos0, const MVector3 &pos) const;
41 TString GetRaDec(const MPointingPos &pos) const;
42 Bool_t GetCoordinate(TString str, Double_t &ret) const;
43 void FreeSourcePos();
44
45 // MParContainer
46 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
47
48 // MTask
49 Bool_t ReInit(MParList *pList);
50 Int_t PreProcess(MParList *pList);
51 Int_t Process();
52
53public:
54 MSrcPosCalc(const char *name=NULL, const char *title=NULL);
55 ~MSrcPosCalc() { FreeSourcePos(); }
56
57 // MSrcPosCalc
58 void SetSourcePos(MPointingPos *pos) { FreeSourcePos(); fSourcePos = pos; }
59 void SetSourcePos(Double_t ra, Double_t dec);
60 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos
61 void SetWobbleMode(Bool_t b=kTRUE) { fIsWobbleMode = b; }
62
63 ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.