1 | #ifndef MARS_MRawEvtData
|
---|
2 | #define MARS_MRawEvtData
|
---|
3 |
|
---|
4 | #ifndef MARS_MCamEvent
|
---|
5 | #include "MCamEvent.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | // gcc 3.2
|
---|
9 | //class ifstream;
|
---|
10 | #include <iosfwd>
|
---|
11 |
|
---|
12 | class MRawRunHeader;
|
---|
13 |
|
---|
14 | class TArrayC;
|
---|
15 | class MArrayS;
|
---|
16 | class MArrayB;
|
---|
17 |
|
---|
18 | class MRawEvtData : public MCamEvent
|
---|
19 | {
|
---|
20 | friend class MRawEvtPixelIter;
|
---|
21 | private:
|
---|
22 | MRawRunHeader *fRunHeader; //! provides information about numbers
|
---|
23 |
|
---|
24 | // FIXME: COMMENT ABOUT ORDERING
|
---|
25 |
|
---|
26 | MArrayS *fHiGainPixId; // list of pixel IDs of hi gain channel
|
---|
27 | MArrayB *fHiGainFadcSamples; // list of hi gain samples of all pixels (ordering: see fHiGainPixId)
|
---|
28 |
|
---|
29 | MArrayS *fLoGainPixId; // list of pixel IDs of lo gain channel
|
---|
30 | MArrayB *fLoGainFadcSamples; // list of lo gain samples of all pixels (ordering: see fLoGainPixId)
|
---|
31 |
|
---|
32 | Int_t fPosInArray; //!
|
---|
33 | Int_t fConnectedPixels; //!
|
---|
34 | Int_t fArraySize; //!
|
---|
35 |
|
---|
36 | void InitArrays(Bool_t flag=kFALSE);
|
---|
37 | void DeleteArrays();
|
---|
38 |
|
---|
39 | public:
|
---|
40 | MRawEvtData(const char *name=NULL, const char *title=NULL);
|
---|
41 | ~MRawEvtData();
|
---|
42 |
|
---|
43 | void Init(MRawRunHeader *rh)
|
---|
44 | {
|
---|
45 | //
|
---|
46 | // you have to set this before you can read information
|
---|
47 | // from a magic binary file
|
---|
48 | //
|
---|
49 | fRunHeader = rh;
|
---|
50 | }
|
---|
51 |
|
---|
52 | void Clear(Option_t * = NULL);
|
---|
53 | void Print(Option_t * = NULL) const;
|
---|
54 | void Draw (Option_t * = NULL);
|
---|
55 |
|
---|
56 | void DeletePixels(Bool_t flag=kFALSE);
|
---|
57 | void ResetPixels() { DeletePixels(kTRUE); }
|
---|
58 | void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
|
---|
59 |
|
---|
60 | Byte_t GetNumHiGainSamples() const;
|
---|
61 | Byte_t GetNumLoGainSamples() const;
|
---|
62 | UShort_t GetNumPixels() const;
|
---|
63 |
|
---|
64 | void ReadEvt(istream &fin);
|
---|
65 |
|
---|
66 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
67 | void DrawPixelContent(Int_t num) const
|
---|
68 | {
|
---|
69 | TString s("HIST");
|
---|
70 | s += num;
|
---|
71 | const_cast<MRawEvtData*>(this)->Draw(s);
|
---|
72 | }
|
---|
73 |
|
---|
74 | ClassDef(MRawEvtData, 2) //Container to store the raw Event Data
|
---|
75 | };
|
---|
76 |
|
---|
77 | #endif
|
---|