source: trunk/MagicSoft/Simulation/Detector/include-CORSIKA/CORRunHeader.hxx@ 801

Last change on this file since 801 was 791, checked in by domingo, 24 years ago
New classes needed for MaxiSingle
File size: 4.3 KB
Line 
1/////////////////////////////////////////////////////////////////
2//
3// CORRunHeader
4//
5// Created: Tue Apr 15 16:27:14 2001
6// Author: Carles Domingo
7// Purpose: Base class for RunHeader-classes
8// Notes:
9//
10/////////////////////////////////////////////////////////////////
11
12// @T \newpage
13
14// @section Source code of {\tt CORRunHeader.hxx}
15
16/* @text
17This section shows the include file {\tt CORRunHeader.hxx}
18@endtext */
19
20#ifndef CORRunHeader_Class
21#define CORRunHeader_Class
22
23// @subsection Include files
24
25// @code
26#ifdef __ROOT__
27#include "TROOT.h"
28#include "TObject.h"
29#else // not __ROOT__
30#include "Rtypes.h"
31#endif
32
33#include <iostream.h>
34#include <iomanip.h>
35#include <fstream.h>
36#include <stdlib.h>
37#include <math.h>
38
39#include "COREventHeader.hxx"
40
41// @endcode
42
43// @subsection Class {\em CORRunHeader}: Definition
44
45// @code
46class CORRunHeader {
47
48public:
49
50 char RUNH[4];
51 Float_t RunNumber;
52 Float_t DateRun;
53 Float_t VersionPGM;
54
55 Float_t NumObsLev;
56 Float_t HeightLev[10];
57
58 Float_t SlopeSpec;
59 Float_t ELowLim;
60 Float_t EUppLim;
61
62 Float_t EGS4yn;
63 Float_t NKGyn;
64
65 Float_t Ecutoffh;
66 Float_t Ecutoffm;
67 Float_t Ecutoffe;
68 Float_t Ecutoffg;
69
70 Float_t C[50];
71 Float_t dmmy1[20];
72 Float_t CKA[40];
73 Float_t CETA[5];
74 Float_t CSTRBA[11];
75 Float_t dmmy2[104];
76 Float_t AATM[5];
77 Float_t BATM[5];
78 Float_t CATM[5];
79 Float_t NFLAIN;
80 Float_t NFLDIF;
81 Float_t NFLPI0_PIF;
82 Float_t NFLCHE_AGM;
83
84public:
85 CORRunHeader(void) {} // default constructor
86
87 virtual ~CORRunHeader(void) {} // default destructor
88
89 // reads RunHeader from binary input stream
90 Int_t read ( ifstream &is ) {
91 is.read ( (char *)this, sizeof( float ) * 273 );
92 return is.gcount();
93 }
94
95 // writes RunHeader to binary output stream
96 Int_t write ( ofstream &os ) {
97 os.write ( (char *)this, sizeof( float ) * 273 );
98 return 0;
99 }
100
101 // get information about the RunHeader
102
103 // print-out of the RUNH
104 void print(void);
105
106 // get the run number
107 inline Float_t get_number ( void ) { return (RunNumber); }
108
109 // get the spectrum slope
110 inline Float_t get_slope ( void ) { return ( SlopeSpec ); }
111
112 // get the energy range of this run
113 inline void get_energy_range ( Float_t *elow, Float_t *eup ) {
114 *elow = ELowLim;
115 *eup = EUppLim;
116 }
117
118 // fill Run Header
119 inline void fill ( Float_t theRunNumber,
120 Float_t theDateRun,
121 Float_t theVersionPGM,
122 Float_t theNumObsLev,
123 Float_t theHeightLev1,
124 Float_t theHeightLev2,
125 Float_t theHeightLev3,
126 Float_t theHeightLev4,
127 Float_t theHeightLev5,
128 Float_t theHeightLev6,
129 Float_t theHeightLev7,
130 Float_t theHeightLev8,
131 Float_t theHeightLev9,
132 Float_t theHeightLev10,
133 Float_t theSlopeSpec,
134 Float_t theELowLim,
135 Float_t theEUppLim,
136 Float_t theEGS4yn,
137 Float_t theNKGyn,
138 Float_t theEcutoffh,
139 Float_t theEcutoffm,
140 Float_t theEcutoffe,
141 Float_t theEcutoffg) {
142
143 strcpy(RUNH,"RUNH");
144 RunNumber = theRunNumber;
145 DateRun = theDateRun;
146 VersionPGM = theVersionPGM;
147 NumObsLev = theNumObsLev;
148 HeightLev[0] = theHeightLev1;
149 HeightLev[1] = theHeightLev2;
150 HeightLev[2] = theHeightLev3;
151 HeightLev[3] = theHeightLev4;
152 HeightLev[4] = theHeightLev5;
153 HeightLev[5] = theHeightLev6;
154 HeightLev[6] = theHeightLev7;
155 HeightLev[7] = theHeightLev8;
156 HeightLev[8] = theHeightLev9;
157 HeightLev[9] = theHeightLev10;
158 SlopeSpec = theSlopeSpec;
159 ELowLim = theELowLim;
160 EUppLim = theEUppLim;
161 EGS4yn = theEGS4yn;
162 NKGyn = theNKGyn;
163 Ecutoffh = theEcutoffh;
164 Ecutoffm = theEcutoffm;
165 Ecutoffe = theEcutoffe;
166 Ecutoffg = theEcutoffg;
167
168 return;
169 }
170
171 // transport from COREventHeader to CORRunHeader
172 void transport ( COREventHeader *e );
173
174 // Reset CORRunHeader
175 void reset ( void );
176
177};
178// @endcode
179
180#endif // not defined CORRunHeader_Class
Note: See TracBrowser for help on using the repository browser.