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
|
---|
17 | This 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 | #include "TROOT.h"
|
---|
27 | #include "TObject.h"
|
---|
28 |
|
---|
29 | #include <iostream.h>
|
---|
30 | #include <fstream.h>
|
---|
31 | #include <stdlib.h>
|
---|
32 | #include <math.h>
|
---|
33 |
|
---|
34 | #define MAXBUF 273 /* 39*7 */
|
---|
35 | #define NSUBBL 21
|
---|
36 | #define NPLONG 1041
|
---|
37 | // @endcode
|
---|
38 |
|
---|
39 | // @subsection Class {\em CORStatfile}: Definition
|
---|
40 |
|
---|
41 | // @code
|
---|
42 | class CORStatfile {
|
---|
43 |
|
---|
44 | public:
|
---|
45 | Int_t steps; // steps in the longitudinal distribution
|
---|
46 | Float_t *evth; // event header
|
---|
47 | Float_t *evte; // event end
|
---|
48 | Int_t *nproto; // number of protons
|
---|
49 | Int_t *nprotb; // number of anti-protons
|
---|
50 | Int_t *nneutr; // number of neutrons
|
---|
51 | Int_t *nneutb; // number of
|
---|
52 | Int_t *nphoto; // number of
|
---|
53 | Int_t *nelect; // number of
|
---|
54 | Int_t *nposit; // number of
|
---|
55 | Int_t *nnu; // number of
|
---|
56 | Int_t *nmum; // number of
|
---|
57 | Int_t *nmup; // number of
|
---|
58 | Int_t *npi0; // number of
|
---|
59 | Int_t *npim; // number of
|
---|
60 | Int_t *npip; // number of
|
---|
61 | Int_t *nk0l; // number of
|
---|
62 | Int_t *nk0s; // number of
|
---|
63 | Int_t *nkmi; // number of
|
---|
64 | Int_t *nkpl; // number of
|
---|
65 | Int_t *nhyp; // number of
|
---|
66 | Int_t *ndeut; // number of
|
---|
67 | Int_t *ntrit; // number of
|
---|
68 | Int_t *nalpha; // number of
|
---|
69 | Int_t *nother; // number of
|
---|
70 | Int_t ifinnu, ifinpi, ifinet, ifinka, ifinhy, cerele, cerhad;
|
---|
71 | Int_t lpct1, nstep;
|
---|
72 | Float_t thstep;
|
---|
73 | Float_t **plong, **aplong;
|
---|
74 | Float_t bunch;
|
---|
75 | Float_t timefirst, timelast;
|
---|
76 | ifstream input_file;
|
---|
77 | Int_t opened;
|
---|
78 |
|
---|
79 | protected:
|
---|
80 | void init( Int_t n );
|
---|
81 |
|
---|
82 | public:
|
---|
83 | CORStatfile ( void ); // constructor
|
---|
84 | CORStatfile ( Int_t n ); // overloaded constructor
|
---|
85 | ~CORStatfile ( void ); // destructor
|
---|
86 | // copy constructor defaults
|
---|
87 |
|
---|
88 | inline void set_bunch ( Float_t b ) { bunch = b; };
|
---|
89 | void read (); // reads data from input file
|
---|
90 | void write(ofstream &output_file); // writes data to given output file
|
---|
91 | Int_t openfile ( char *fname ); // sets and opens new sta* file
|
---|
92 | void closefile (); // sets and opens new sta* file
|
---|
93 | inline Float_t get_tfirst() { return ( timefirst ); }
|
---|
94 | inline Float_t get_tlast() { return ( timelast ); }
|
---|
95 |
|
---|
96 | };
|
---|
97 |
|
---|
98 | // @endcode
|
---|
99 |
|
---|
100 | #endif // not defined CORStatfile_Class
|
---|
101 |
|
---|