source: trunk/MagicSoft/Mars/mraw/MRawEvtData.h@ 2371

Last change on this file since 2371 was 2207, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.9 KB
Line 
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
12class MRawRunHeader;
13
14class TArrayC;
15class MArrayS;
16class MArrayB;
17
18class MRawEvtData : public MCamEvent
19{
20 friend class MRawEvtPixelIter;
21private:
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
39public:
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
Note: See TracBrowser for help on using the repository browser.