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

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