source: trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h@ 8672

Last change on this file since 8672 was 6306, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 3.0 KB
Line 
1#ifndef MARS_MRawEvtHeader
2#define MARS_MRawEvtHeader
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef MARS_MCalibrationCam
9#include "MCalibrationCam.h"
10#endif
11
12// gcc 3.2
13//class ifstream;
14#include <iosfwd>
15
16class MTime;
17class MArrayB;
18class MRawRunHeader;
19
20class MRawEvtHeader : public MParContainer
21{
22public:
23 //
24 // Trigger Type (TT)
25 //
26 enum {
27 kTTEvent = 0,
28 kTTPedestal = 1,
29 kTTCalibration = 2,
30 kTTPinDiode = 3
31 };
32
33 enum CLColor_t
34 {
35 kCLUV = BIT(0),
36 kCLGreen = BIT(1),
37 kCLAmber = BIT(2),
38 kCLRed = BIT(3),
39 kCLRedAmber = kCLRed & kCLAmber,
40 kCLRedGreen = kCLRed & kCLGreen,
41 kCLRedUV = kCLRed & kCLUV ,
42 kCLAmberGreen = kCLAmber & kCLGreen,
43 kCLAmberUV = kCLAmber & kCLUV ,
44 kCLGreenUV = kCLGreen & kCLUV ,
45 kCLRedAmberGreen = kCLRedAmber & kCLGreen,
46 kCLRedGreenUV = kCLRedGreen & kCLUV,
47 kCLAmberGreenUV = kCLAmberGreen & kCLUV,
48 kCLAll = kCLRedAmberGreen & kCLUV
49 };
50
51
52private:
53 MTime *fTime; //! object to store the time in (ReadEvt)
54
55 UInt_t fDAQEvtNumber; // Number of Event
56
57 UInt_t fNumTrigLvl1; // Number of 1st level tiggers between 2 events
58 UInt_t fNumTrigLvl2; // Number of 2nd level tiggers between 2 events
59 UInt_t fTrigPattern[2]; // Trigger configuration
60
61 UShort_t fNumLoGainOn; // Indicating if no pixel has a neglegible
62 // low gain signal (0), else it is the number
63 // of pixels with lo gain on
64
65 //
66 // Informations only needed to read the raw file correctly
67 //
68 UShort_t fTrigType; //! Trigger Type of this event
69 MArrayB *fPixLoGainOn; //! Array which tell you which pixels have lo gain on
70
71 Bool_t DecodeTime(UInt_t abstime[2], UShort_t ver) const;
72
73 Int_t GetNumBytes() const;
74
75public:
76 MRawEvtHeader(const char *name=NULL, const char *title=NULL);
77 ~MRawEvtHeader();
78
79 void InitRead(MRawRunHeader *rh, MTime *t);
80
81 void Clear(Option_t * = NULL);
82 void Print(Option_t * = NULL) const;
83
84 void FillHeader(UInt_t, Float_t=0);
85
86 UShort_t GetTrigType() const { return fTrigType; }
87 UInt_t GetNumTrigLvl1() const { return fNumTrigLvl1; }
88 UInt_t GetNumTrigLvl2() const { return fNumTrigLvl2; }
89 UInt_t GetDAQEvtNumber() const { return fDAQEvtNumber; }
90
91 UInt_t GetTriggerID() const;
92 UInt_t GetCalibrationPattern() const;
93 UInt_t GetPulserSlotPattern() const;
94
95 void SetTriggerPattern( const UInt_t pattern ) { fTrigPattern[0] = pattern; } // Only for MC!
96 void SetCalibrationPattern( const UInt_t pattern ) { fTrigPattern[1] = pattern; } // Only for MC!
97
98 Int_t ReadEvt(istream& fin, UShort_t ver);
99 void SkipEvt(istream& fin, UShort_t ver);
100
101 ClassDef(MRawEvtHeader, 1) // Parameter Conatiner for raw EVENT HEADER
102};
103
104#endif
Note: See TracBrowser for help on using the repository browser.