source: trunk/MagicSoft/Simulation/Detector/include-CORSIKA/CORRunEnd.hxx@ 6215

Last change on this file since 6215 was 3046, checked in by blanch, 21 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1/////////////////////////////////////////////////////////////////
2//
3// CORRunEnd
4//
5// Created: Tue May 15 2001
6// Author: Carles Domingo
7// Purpose: Base class for RunEnd-classes
8// Notes:
9//
10/////////////////////////////////////////////////////////////////
11
12// @T \newpage
13
14// @section Source code of {\tt CORRunEnd.hxx}
15
16/* @text
17This section shows the include file {\tt CORRunEnd.hxx}
18@endtext */
19
20#ifndef CORRunEnd_Class
21#define CORRunEnd_Class
22
23// @subsection Include files
24
25// @code
26#include "TROOT.h"
27#include "TObject.h"
28
29#include <iostream.h>
30#include <iomanip.h>
31#include <fstream.h>
32#include <stdlib.h>
33#include <math.h>
34
35#include "COREventHeader.hxx"
36
37// @endcode
38
39// @subsection Class {\em CORRunEnd}: Definition
40
41// @code
42class CORRunEnd {
43
44public:
45
46 char RUNE[4];
47 Float_t RunNumber;
48 Float_t NumEvts;
49
50 Float_t dmmy[270];
51
52public:
53 CORRunEnd(void) {} // default constructor
54
55 virtual ~CORRunEnd(void) {} // default destructor
56
57 // reads RunEnd from binary input stream
58 Int_t read ( ifstream &is ) {
59 is.read ( (char *)this, sizeof( float ) * 273 );
60 return is.gcount();
61 }
62
63 // writes RunEnd to binary output stream
64 Int_t write ( ofstream &os ) {
65 os.write ( (char *)this, sizeof( float ) * 273 );
66 return 0;
67 }
68
69 // get information about the RunEnd
70
71 // print-out of the RUNE
72 void print(void);
73
74 // get the run number
75 inline Float_t get_runnumber ( void ) { return (RunNumber); }
76
77 // get the number of events
78 inline Float_t get_numberevents ( void ) { return ( NumEvts ); }
79
80 // fill Run Header
81 inline void fill ( Float_t theRunNumber,
82 Float_t theNumEvts) {
83
84 strcpy(RUNE,"RUNE");
85 RunNumber = theRunNumber;
86 NumEvts = theNumEvts;
87
88 for (Int_t i=0; i<270; i++){
89 dmmy[i]=0.;
90 }
91 return;
92 }
93
94};
95// @endcode
96
97#endif // not defined CORRunEnd_Class
Note: See TracBrowser for help on using the repository browser.