source: trunk/Mars/mpointing/MSrcPosCam.h@ 12240

Last change on this file since 12240 was 8912, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.1 KB
Line 
1#ifndef MARS_MSrcPosCam
2#define MARS_MSrcPosCam
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#include <TMath.h>
9
10class TVector2;
11
12class MSrcPosCam : public MParContainer
13{
14private:
15 Float_t fX; // [mm] x position of source in camera
16 Float_t fY; // [mm] y position of source in camera
17
18public:
19 MSrcPosCam(const char *name=NULL, const char *title=NULL);
20 MSrcPosCam(const MSrcPosCam &p);
21
22 void Clear(Option_t *) { fX = 0; fY = 0; }
23
24 void SetX(Float_t x) { fX = x; }
25 void SetY(Float_t y) { fY = y; }
26 void SetXY(Float_t x, Float_t y) { fX = x; fY = y; }
27 void SetXY(const TVector2 &v);
28
29 void Add(const TVector2 &v);
30
31 Float_t GetDist() const;
32
33 Float_t GetX() const { return fX; }
34 Float_t GetY() const { return fY; }
35 TVector2 GetXY() const;
36
37 void Paint(Option_t *opt);
38 void Print(Option_t *opt=NULL) const;
39
40 void StreamPrimitive(ostream &out) const;
41
42 //void AsciiRead(ifstream &fin);
43 //void AsciiWrite(ofstream &fout) const;
44
45 ClassDef(MSrcPosCam, 1) // container to store source position in the camera plain
46};
47
48#endif
Note: See TracBrowser for help on using the repository browser.