source: trunk/MagicSoft/Mars/mraw/MRawRunHeader.h@ 656

Last change on this file since 656 was 654, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 3.0 KB
Line 
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
13class TBuffer;
14class ifstream;
15class MArrayS;
16
17const UShort_t kMagicNumber = 0xc0c0;
18
19class MRawRunHeader : public MParContainer
20{
21private:
22 /* ---- Run Header Informations ---- */
23 UShort_t fMagicNumber;
24 UShort_t fFormatVersion;
25 UShort_t fSoftVersion;
26 UShort_t fRunType;
27 UInt_t fRunNumber;
28 Char_t fProjectName[22];
29 Char_t fSourceName[12];
30 //Float_t fSourceRA;
31 //Float_t fSourceDEC;
32 Char_t fSourceEpochChar[2];
33 UShort_t fSourceEpochDate;
34 Float_t fMJD;
35 UShort_t fDateYear;
36 UShort_t fDateMonth;
37 UShort_t fDateDay;
38 UShort_t fNumCrates;
39 UShort_t fNumPixInCrate;
40 UShort_t fNumSamplesLoGain;
41 UShort_t fNumSamplesHiGain;
42 UInt_t fNumEvents;
43 MArrayS *fPixAssignment;
44
45public:
46 MRawRunHeader(const char *name=NULL, const char *title=NULL);
47 ~MRawRunHeader();
48
49 UShort_t GetMagicNumber() const { return fMagicNumber; }
50 UShort_t GetFormatversion() const { return fFormatVersion; }
51 UShort_t GetSoftVersion() const { return fSoftVersion; }
52 UShort_t GetRunType() const { return fRunType; }
53 UInt_t GetRunNumber() const { return fRunNumber; }
54 const Char_t *GetProjectName() const { return fProjectName; }
55 const Char_t *GetSourceName() const { return fSourceName; }
56 //Float_t GetSourceRa() const { return fSourceRA; }
57 //Float_t GetSourceDec() const { return fSourceDEC; }
58 const Char_t *GetSourceEpocheChar() const { return fSourceEpochChar; }
59 UShort_t GetSourceEpocheDate() const { return fSourceEpochDate; }
60 Float_t GetMJD() const { return fMJD; }
61 UShort_t GetDateYear() const { return fDateYear; }
62 Byte_t GetDateMonth() const { return fDateMonth; }
63 Byte_t GetDateDay() const { return fDateDay; }
64 UShort_t GetNumCrates() const { return fNumCrates; }
65 UShort_t GetNumPixInCrate() const { return fNumPixInCrate; }
66 UShort_t GetNumSamplesLoGain() const { return fNumSamplesLoGain; }
67 UShort_t GetNumSamplesHiGain() const { return fNumSamplesHiGain; }
68 UShort_t GetNumEvents() const { return fNumEvents; }
69 UShort_t GetPixAssignment(UShort_t i) const;
70
71 UInt_t GetNumSamplesPerCrate() const
72 {
73 return fNumPixInCrate*(fNumSamplesLoGain+fNumSamplesHiGain);
74 }
75
76 UShort_t GetNumPixel() const;
77
78 void Print(Option_t *t=NULL);
79
80 void ReadEvt(istream& fin);
81
82 ClassDef(MRawRunHeader, 1) // storage container for general info
83};
84#endif
Note: See TracBrowser for help on using the repository browser.