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

Last change on this file since 4678 was 4648, checked in by tbretz, 20 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 MArrayB *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
46 Int_t GetNumBytes() const;
47
48public:
49 MRawEvtData(const char *name=NULL, const char *title=NULL);
50 ~MRawEvtData();
51
52 void InitRead(MRawRunHeader *rh, MRawCrateArray *arr)
53 {
54 //
55 // you have to set this before you can read information
56 // from a magic binary file
57 //
58 fRunHeader = rh;
59 fCrateArray = arr;
60 }
61
62 void Clear(Option_t * = NULL);
63 void Print(Option_t * = NULL) const;
64 void Draw (Option_t * = NULL);
65
66 void DeletePixels(Bool_t flag=kFALSE);
67 void ResetPixels() { DeletePixels(kTRUE); }
68 void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
69
70 Byte_t GetNumHiGainSamples() const;
71 Byte_t GetNumLoGainSamples() const;
72 UShort_t GetNumPixels() const;
73
74 void ReadEvt(istream &fin);
75 void SkipEvt(istream &fin);
76
77 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
78 void DrawPixelContent(Int_t num) const
79 {
80 TString s("HIST");
81 s += num;
82 const_cast<MRawEvtData*>(this)->Draw(s);
83 }
84
85 void Copy(TObject &named)
86#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
87 const
88#endif
89 ;
90
91 ClassDef(MRawEvtData, 5) //Container to store the raw Event Data
92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.