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

Last change on this file since 5032 was 4845, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.5 KB
Line 
1#ifndef MARS_MRawEvtHeader
2#define MARS_MRawEvtHeader
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8// gcc 3.2
9//class ifstream;
10#include <iosfwd>
11
12class MTime;
13class MArrayB;
14class MRawRunHeader;
15
16class MRawEvtHeader : public MParContainer
17{
18public:
19 //
20 // Trigger Type (TT)
21 //
22 enum {
23 kTTEvent = 0,
24 kTTPedestal = 1,
25 kTTCalibration = 2
26 };
27/*
28 enum CalibCol_t {
29 kColRed = BIT(0),
30 kColAmber = BIT(1),
31 kColGreen = BIT(2),
32 kColBlue = BIT(3),
33 kColUV = BIT(4)
34 };
35 */
36private:
37 MTime *fTime; //! object to store the time in (ReadEvt)
38
39 UInt_t fDAQEvtNumber; // Number of Event
40
41 UInt_t fNumTrigLvl1; // Number of 1st level tiggers between 2 events
42 UInt_t fNumTrigLvl2; // Number of 2nd level tiggers between 2 events
43 UInt_t fTrigPattern[2]; // Trigger configuration
44
45 UShort_t fNumLoGainOn; // Indicating if no pixel has a neglegible
46 // low gain signal (0), else it is the number
47 // of pixels with lo gain on
48
49 //
50 // Informations only needed to read the raw file correctly
51 //
52 UShort_t fTrigType; //! Trigger Type of this event
53 MArrayB *fPixLoGainOn; //! Array which tell you which pixels have lo gain on
54
55 Bool_t DecodeTime(UInt_t abstime[2]) const;
56
57 Int_t GetNumBytes() const;
58
59public:
60 MRawEvtHeader(const char *name=NULL, const char *title=NULL);
61 ~MRawEvtHeader();
62
63 void InitRead(MRawRunHeader *rh, MTime *t);
64
65 void Clear(Option_t * = NULL);
66 void Print(Option_t * = NULL) const;
67
68 void FillHeader(UInt_t, Float_t=0);
69
70 UShort_t GetTrigType() const { return fTrigType; }
71 UInt_t GetNumTrigLvl1() const { return fNumTrigLvl1; }
72 UInt_t GetNumTrigLvl2() const { return fNumTrigLvl2; }
73 UInt_t GetDAQEvtNumber() const { return fDAQEvtNumber; }
74
75 UInt_t GetTriggerID() const;
76 UInt_t GetCalibrationPattern() const;
77
78 void SetCalibrationPattern(UInt_t pat) { fTrigPattern[1] = pat; } // USE THIS FUNCTION WITH EXTREME CARE -- IT IS A WORKAROUND!
79/*
80 UShort_t GetPulserSlotPattern() const;
81 Byte_t GetPowerOfContLight() const;
82 CalibCol_t GetContLedColor() const;
83 */
84 Int_t ReadEvt(istream& fin, UShort_t ver);
85 void SkipEvt(istream& fin, UShort_t ver);
86
87 ClassDef(MRawEvtHeader, 1) // Parameter Conatiner for raw EVENT HEADER
88};
89
90#endif
Note: See TracBrowser for help on using the repository browser.