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

Last change on this file since 5138 was 4738, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.3 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
28 // FIXME: COMMENT ABOUT ORDERING
29
30 MArrayS *fHiGainPixId; //-> list of pixel IDs of hi gain channel
31 MArrayB *fHiGainFadcSamples; //-> list of hi gain samples of all pixels (ordering: see fHiGainPixId)
32
33 MArrayS *fLoGainPixId; //-> list of pixel IDs of lo gain channel
34 MArrayB *fLoGainFadcSamples; //-> list of lo gain samples of all pixels (ordering: see fLoGainPixId)
35
36 MArrayB *fABFlags; //-> A information about the exact trigger position
37
38 Int_t fConnectedPixels; //!
39
40 void InitArrays(UShort_t numconnected=0, UShort_t maxid=0);
41 void DeleteArrays();
42
43 Int_t GetNumBytes() const;
44
45public:
46 MRawEvtData(const char *name=NULL, const char *title=NULL);
47 ~MRawEvtData();
48
49 void InitRead(MRawRunHeader *rh)
50 {
51 //
52 // you have to set this before you can read information
53 // from a magic binary file
54 //
55 fRunHeader = rh;
56 }
57
58 void Clear(Option_t * = NULL);
59 void Print(Option_t * = NULL) const;
60 void Draw (Option_t * = NULL);
61
62 void ResetPixels(UShort_t npix, UShort_t maxid);
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 ReadPixel(istream &fin, Int_t npix, Bool_t ab);
70 //void ReadEvt(istream &fin, Int_t posinarray);
71 void SkipEvt(istream &fin);
72
73 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
74 void DrawPixelContent(Int_t num) const
75 {
76 TString s("HIST");
77 s += num;
78 const_cast<MRawEvtData*>(this)->Draw(s);
79 }
80
81 void Copy(TObject &named)
82#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
83 const
84#endif
85 ;
86
87 ClassDef(MRawEvtData, 5) //Container to store the raw Event Data
88};
89
90#endif
Note: See TracBrowser for help on using the repository browser.