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

Last change on this file since 2811 was 2645, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.3 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;
13class MRawCrateArray;
14
15class TArrayC;
16class MArrayS;
17class MArrayB;
18
19class MRawEvtData : public MCamEvent
20{
21 friend class MRawEvtPixelIter;
22private:
23 MRawRunHeader *fRunHeader; //! provides information about numbers
24 MRawCrateArray *fCrateArray; //! provides information about ab flag
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 TArrayC *fABFlags; //-> A information about the exact trigger position
35
36 Int_t fPosInArray; //!
37 Int_t fConnectedPixels; //!
38 Int_t fArraySize; //!
39
40 void InitArrays(Bool_t flag=kFALSE);
41 void DeleteArrays();
42
43public:
44 MRawEvtData(const char *name=NULL, const char *title=NULL);
45 ~MRawEvtData();
46
47 void Init(MRawRunHeader *rh, MRawCrateArray *arr)
48 {
49 //
50 // you have to set this before you can read information
51 // from a magic binary file
52 //
53 fRunHeader = rh;
54 fCrateArray = arr;
55 }
56
57 void Clear(Option_t * = NULL);
58 void Print(Option_t * = NULL) const;
59 void Draw (Option_t * = NULL);
60
61 void DeletePixels(Bool_t flag=kFALSE);
62 void ResetPixels() { DeletePixels(kTRUE); }
63 void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
64
65 Byte_t GetNumHiGainSamples() const;
66 Byte_t GetNumLoGainSamples() const;
67 UShort_t GetNumPixels() const;
68
69 void ReadEvt(istream &fin);
70
71 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
72 void DrawPixelContent(Int_t num) const
73 {
74 TString s("HIST");
75 s += num;
76 const_cast<MRawEvtData*>(this)->Draw(s);
77 }
78
79 void Copy(TObject &named)
80#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
81 const
82#endif
83 ;
84
85 ClassDef(MRawEvtData, 3) //Container to store the raw Event Data
86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.