| 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 | private:
|
|---|
| 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 | Bool_t fIsWobbleMode;
|
|---|
| 35 |
|
|---|
| 36 | // MSrcPosCalc
|
|---|
| 37 | TVector2 CalcXYinCamera(const MVector3 &pos0, const MVector3 &pos) const;
|
|---|
| 38 | TString GetRaDec(const MPointingPos &pos) const;
|
|---|
| 39 | Bool_t GetCoordinate(TString str, Double_t &ret) const;
|
|---|
| 40 | void FreeSourcePos();
|
|---|
| 41 |
|
|---|
| 42 | // MParContainer
|
|---|
| 43 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
|---|
| 44 |
|
|---|
| 45 | // MTask
|
|---|
| 46 | Int_t PreProcess(MParList *pList);
|
|---|
| 47 | Int_t Process();
|
|---|
| 48 |
|
|---|
| 49 | public:
|
|---|
| 50 | MSrcPosCalc(const char *name=NULL, const char *title=NULL);
|
|---|
| 51 | ~MSrcPosCalc() { FreeSourcePos(); }
|
|---|
| 52 |
|
|---|
| 53 | // MSrcPosCalc
|
|---|
| 54 | void SetSourcePos(MPointingPos *pos) { FreeSourcePos(); fSourcePos = pos; }
|
|---|
| 55 | void SetSourcePos(Double_t ra, Double_t dec);
|
|---|
| 56 | void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos
|
|---|
| 57 | void SetWobbleMode(Bool_t b=kTRUE) { fIsWobbleMode = b; }
|
|---|
| 58 |
|
|---|
| 59 | ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
|
|---|
| 60 | };
|
|---|
| 61 |
|
|---|
| 62 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.