source: trunk/Mars/mpointing/MSrcPosCam.h

Last change on this file was 18580, checked in by tbretz, 8 years ago
Added SetupFits to be able to read the container from a fits file.
File size: 1.2 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 fits;
11class TVector2;
12
13class MSrcPosCam : public MParContainer
14{
15private:
16 Float_t fX; // [mm] x position of source in camera
17 Float_t fY; // [mm] y position of source in camera
18
19public:
20 MSrcPosCam(const char *name=NULL, const char *title=NULL);
21 MSrcPosCam(const MSrcPosCam &p);
22
23 void Clear(Option_t *) { fX = 0; fY = 0; }
24
25 void SetX(Float_t x) { fX = x; }
26 void SetY(Float_t y) { fY = y; }
27 void SetXY(Float_t x, Float_t y) { fX = x; fY = y; }
28 void SetXY(const TVector2 &v);
29
30 void Add(const TVector2 &v);
31
32 Float_t GetDist() const;
33
34 Float_t GetX() const { return fX; }
35 Float_t GetY() const { return fY; }
36 TVector2 GetXY() const;
37
38 void Paint(Option_t *opt);
39 void Print(Option_t *opt=NULL) const;
40
41 void StreamPrimitive(std::ostream &out) const;
42
43 //void AsciiRead(ifstream &fin);
44 //void AsciiWrite(ofstream &fout) const;
45
46 Bool_t SetupFits(fits &fin);
47
48 ClassDef(MSrcPosCam, 1) // container to store source position in the camera plain
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.