source: trunk/MagicSoft/include-Classes/MRawFormat/MRawRunHeader.h@ 5138

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