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

Last change on this file since 8408 was 8353, checked in by tbretz, 18 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
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);
64
65 UShort_t GetNumHiGainSamples() const;
66 UShort_t GetNumLoGainSamples() const;
67 UInt_t GetNumSamples() const { return GetNumHiGainSamples()+GetNumLoGainSamples(); }
68 UShort_t GetNumPixels() const;
69
70 void ReadPixel(istream &fin, Int_t npix);
71 void SetABFlag(Int_t npix, Bool_t ab);
72 void SkipEvt(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, 6) //Container to store the raw Event Data
89};
90
91#endif
Note: See TracBrowser for help on using the repository browser.