source: branches/start/MagicSoft/Simulation/Detector/include-CORSIKA/CORStatfile.hxx

Last change on this file was 294, checked in by harald, 25 years ago
This is a part of the development of Jose Carlos Gonzales. This directory contains some classes to read in the CORSIKA output of the mmcs program. This directory is needed by the reflector program. Now all is under CVS control and one has to take CVS for further developments.
File size: 2.7 KB
Line 
1/////////////////////////////////////////////////////////////////
2//
3// CORStatfile
4//
5// Created: Tue Apr 28 16:14:05 1998
6// Author: Jose Carlos Gonzales
7// Purpose: Base class for Statfiles
8// Notes:
9//
10/////////////////////////////////////////////////////////////////
11
12// @T \newpage
13
14// @section Source code of {\tt CORStatfile.hxx}
15
16/* @text
17This section shows the include file {\tt CORStatfile.hxx}
18@endtext */
19
20#ifndef CORStatfile_Class
21#define CORStatfile_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 <fstream.h>
35#include <stdlib.h>
36#include <math.h>
37
38#define MAXBUF 273 /* 39*7 */
39#define NSUBBL 21
40#define NPLONG 1041
41// @endcode
42
43// @subsection Class {\em CORStatfile}: Definition
44
45// @code
46class CORStatfile {
47
48public:
49 Int_t steps; // steps in the longitudinal distribution
50 Float_t *evth; // event header
51 Float_t *evte; // event end
52 Int_t *nproto; // number of protons
53 Int_t *nprotb; // number of anti-protons
54 Int_t *nneutr; // number of neutrons
55 Int_t *nneutb; // number of
56 Int_t *nphoto; // number of
57 Int_t *nelect; // number of
58 Int_t *nposit; // number of
59 Int_t *nnu; // number of
60 Int_t *nmum; // number of
61 Int_t *nmup; // number of
62 Int_t *npi0; // number of
63 Int_t *npim; // number of
64 Int_t *npip; // number of
65 Int_t *nk0l; // number of
66 Int_t *nk0s; // number of
67 Int_t *nkmi; // number of
68 Int_t *nkpl; // number of
69 Int_t *nhyp; // number of
70 Int_t *ndeut; // number of
71 Int_t *ntrit; // number of
72 Int_t *nalpha; // number of
73 Int_t *nother; // number of
74 Int_t ifinnu, ifinpi, ifinet, ifinka, ifinhy, cerele, cerhad;
75 Int_t lpct1, nstep;
76 Float_t thstep;
77 Float_t **plong, **aplong;
78 Float_t bunch;
79 Float_t timefirst, timelast;
80 ifstream input_file;
81 Int_t opened;
82
83protected:
84 void init( Int_t n );
85
86public:
87 CORStatfile ( void ); // constructor
88 CORStatfile ( Int_t n ); // overloaded constructor
89 ~CORStatfile ( void ); // destructor
90 // copy constructor defaults
91
92 inline void set_bunch ( Float_t b ) { bunch = b; };
93 void read (); // reads data from input file
94 void write(ofstream &output_file); // writes data to given output file
95 Int_t openfile ( char *fname ); // sets and opens new sta* file
96 void closefile (); // sets and opens new sta* file
97 inline Float_t get_tfirst() { return ( timefirst ); }
98 inline Float_t get_tlast() { return ( timelast ); }
99
100};
101
102// @endcode
103
104#endif // not defined CORStatfile_Class
105
Note: See TracBrowser for help on using the repository browser.