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