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

Last change on this file since 3713 was 2958, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef MARS_MRawEvtData
2#define MARS_MRawEvtData
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MCamEvent
8#include "MCamEvent.h"
9#endif
10
11// gcc 3.2
12//class ifstream;
13#include <iosfwd>
14
15class MRawRunHeader;
16class MRawCrateArray;
17
18class TArrayC;
19class MArrayS;
20class MArrayB;
21
22class MRawEvtData : public MParContainer, public MCamEvent
23{
24 friend class MRawEvtPixelIter;
25private:
26 MRawRunHeader *fRunHeader; //! provides information about numbers
27 MRawCrateArray *fCrateArray; //! provides information about ab flag
28
29 // FIXME: COMMENT ABOUT ORDERING
30
31 MArrayS *fHiGainPixId; //-> list of pixel IDs of hi gain channel
32 MArrayB *fHiGainFadcSamples; //-> list of hi gain samples of all pixels (ordering: see fHiGainPixId)
33
34 MArrayS *fLoGainPixId; //-> list of pixel IDs of lo gain channel
35 MArrayB *fLoGainFadcSamples; //-> list of lo gain samples of all pixels (ordering: see fLoGainPixId)
36
37 TArrayC *fABFlags; //-> A information about the exact trigger position
38
39 Int_t fPosInArray; //!
40 Int_t fConnectedPixels; //!
41 Int_t fArraySize; //!
42
43 void InitArrays(Bool_t flag=kFALSE);
44 void DeleteArrays();
45
46public:
47 MRawEvtData(const char *name=NULL, const char *title=NULL);
48 ~MRawEvtData();
49
50 void Init(MRawRunHeader *rh, MRawCrateArray *arr)
51 {
52 //
53 // you have to set this before you can read information
54 // from a magic binary file
55 //
56 fRunHeader = rh;
57 fCrateArray = arr;
58 }
59
60 void Clear(Option_t * = NULL);
61 void Print(Option_t * = NULL) const;
62 void Draw (Option_t * = NULL);
63
64 void DeletePixels(Bool_t flag=kFALSE);
65 void ResetPixels() { DeletePixels(kTRUE); }
66 void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
67
68 Byte_t GetNumHiGainSamples() const;
69 Byte_t GetNumLoGainSamples() const;
70 UShort_t GetNumPixels() const;
71
72 void ReadEvt(istream &fin);
73
74 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
75 void DrawPixelContent(Int_t num) const
76 {
77 TString s("HIST");
78 s += num;
79 const_cast<MRawEvtData*>(this)->Draw(s);
80 }
81
82 void Copy(TObject &named)
83#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
84 const
85#endif
86 ;
87
88 ClassDef(MRawEvtData, 4) //Container to store the raw Event Data
89};
90
91#endif
Note: See TracBrowser for help on using the repository browser.