Changeset 8618 for trunk/MagicSoft/Mars/mpointing
- Timestamp:
- 06/28/07 21:30:25 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r8601 r8618 68 68 69 69 #include "MParList.h" 70 #include "MTaskList.h" 70 71 71 72 #include "MLog.h" … … 94 95 MSrcPosCalc::MSrcPosCalc(const char *name, const char *title) 95 96 : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fDeviation(NULL), 96 fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault) 97 fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fCallback(NULL), 98 fMode(kDefault) 97 99 { 98 100 fName = name ? name : "MSrcPosCalc"; … … 196 198 //*fLog << "Pointing Position: " << GetRaDec(*fPointPos) << endl; 197 199 *fLog << "Source Position: " << GetRaDec(*fSourcePos) << endl; 200 if (fCallback) 201 *fLog << "Using " << fCallback->GetNumPasses() << " off-regions." << endl; 198 202 199 203 // For the case ReInit is never called we try: … … 215 219 { 216 220 fSrcPosAnti->SetXY(v); 217 v *= -1; 221 222 if (fCallback) 223 { 224 const Double_t step = TMath::TwoPi()/(fCallback->GetNumPasses()+1); 225 v = v.Rotate(step*(fCallback->GetNumPass()+1)); 226 } 227 else 228 v *= -1; 229 218 230 fSrcPosCam->SetXY(v); 219 231 } -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
r7287 r8618 17 17 class MTime; 18 18 class MVector3; 19 class MTaskList; 19 20 20 21 class MSrcPosCalc : public MTask … … 39 40 MGeomCam *fGeom; 40 41 MTime *fTime; 42 MTaskList *fCallback; 41 43 42 44 UShort_t fRunType; //! Run Type to decide where to get pointing position from … … 68 70 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos 69 71 void SetMode(Mode_t m=kDefault) { fMode = m; } 72 void SetCallback(MTaskList *list) { fCallback=list; } 70 73 71 74 ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
Note:
See TracChangeset
for help on using the changeset viewer.