1 | #ifndef MRAWRUNHEADER_H
|
---|
2 | #define MRAWRUNHEADER_H
|
---|
3 | ///////////////////////////////////////////////////////////////////////
|
---|
4 | // //
|
---|
5 | // MRunHeader //
|
---|
6 | // //
|
---|
7 | ///////////////////////////////////////////////////////////////////////
|
---|
8 |
|
---|
9 | #ifndef MPARCONTAINER_H
|
---|
10 | #include "MParContainer.h"
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | class TBuffer;
|
---|
14 | class ifstream;
|
---|
15 | class MArrayS;
|
---|
16 |
|
---|
17 | //
|
---|
18 | // Magic number to detect the magic file type
|
---|
19 | //
|
---|
20 | const UShort_t kMagicNumber = 0xc0c0;
|
---|
21 |
|
---|
22 | class MRawRunHeader : public MParContainer
|
---|
23 | {
|
---|
24 | private:
|
---|
25 | /* ---- Run Header Informations ---- */
|
---|
26 | UShort_t fMagicNumber;
|
---|
27 | UShort_t fFormatVersion;
|
---|
28 | UShort_t fSoftVersion;
|
---|
29 | UShort_t fRunType;
|
---|
30 | UInt_t fRunNumber;
|
---|
31 | Char_t fProjectName[22];
|
---|
32 | Char_t fSourceName[12];
|
---|
33 | //Float_t fSourceRA;
|
---|
34 | //Float_t fSourceDEC;
|
---|
35 | Char_t fSourceEpochChar[2];
|
---|
36 | UShort_t fSourceEpochDate;
|
---|
37 | Float_t fMJD;
|
---|
38 | UShort_t fDateYear;
|
---|
39 | UShort_t fDateMonth;
|
---|
40 | UShort_t fDateDay;
|
---|
41 | UShort_t fNumCrates;
|
---|
42 | UShort_t fNumPixInCrate;
|
---|
43 | UShort_t fNumSamplesLoGain;
|
---|
44 | UShort_t fNumSamplesHiGain;
|
---|
45 | UInt_t fNumEvents;
|
---|
46 | MArrayS *fPixAssignment;
|
---|
47 |
|
---|
48 | public:
|
---|
49 | MRawRunHeader(const char *name=NULL, const char *title=NULL);
|
---|
50 | ~MRawRunHeader();
|
---|
51 |
|
---|
52 | UShort_t GetMagicNumber() const { return fMagicNumber; }
|
---|
53 | UShort_t GetFormatversion() const { return fFormatVersion; }
|
---|
54 | UShort_t GetSoftVersion() const { return fSoftVersion; }
|
---|
55 | UShort_t GetRunType() const { return fRunType; }
|
---|
56 | UInt_t GetRunNumber() const { return fRunNumber; }
|
---|
57 | const Char_t *GetProjectName() const { return fProjectName; }
|
---|
58 | const Char_t *GetSourceName() const { return fSourceName; }
|
---|
59 | //Float_t GetSourceRa() const { return fSourceRA; }
|
---|
60 | //Float_t GetSourceDec() const { return fSourceDEC; }
|
---|
61 | const Char_t *GetSourceEpocheChar() const { return fSourceEpochChar; }
|
---|
62 | UShort_t GetSourceEpocheDate() const { return fSourceEpochDate; }
|
---|
63 | Float_t GetMJD() const { return fMJD; }
|
---|
64 | UShort_t GetDateYear() const { return fDateYear; }
|
---|
65 | Byte_t GetDateMonth() const { return fDateMonth; }
|
---|
66 | Byte_t GetDateDay() const { return fDateDay; }
|
---|
67 | UShort_t GetNumCrates() const { return fNumCrates; }
|
---|
68 | UShort_t GetNumPixInCrate() const { return fNumPixInCrate; }
|
---|
69 | UShort_t GetNumSamplesLoGain() const { return fNumSamplesLoGain; }
|
---|
70 | UShort_t GetNumSamplesHiGain() const { return fNumSamplesHiGain; }
|
---|
71 | UShort_t GetNumEvents() const { return fNumEvents; }
|
---|
72 | UShort_t GetPixAssignment(UShort_t i) const;
|
---|
73 |
|
---|
74 | UInt_t GetNumSamplesPerCrate() const
|
---|
75 | {
|
---|
76 | return fNumPixInCrate*(fNumSamplesLoGain+fNumSamplesHiGain);
|
---|
77 | }
|
---|
78 |
|
---|
79 | UShort_t GetNumPixel() const;
|
---|
80 |
|
---|
81 | void Print(Option_t *t=NULL);
|
---|
82 |
|
---|
83 | void ReadEvt(istream& fin);
|
---|
84 |
|
---|
85 | ClassDef(MRawRunHeader, 1) // storage container for general info
|
---|
86 | };
|
---|
87 | #endif
|
---|