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