]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliHeader.cxx
SetCaller() calls added to identify the routine that calls stpping. (E. Futo)
[u/mrichter/AliRoot.git] / STEER / AliHeader.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 //-----------------------------------------------------------------------
19 //     Simulation event header class
20 //     Collaborates with AliRun, AliStack, and AliGenReaderTreeK classes
21 //     Many other classes depend on it
22 //     Author:
23 //-----------------------------------------------------------------------
24
25 #include <stdio.h>
26
27 #include "AliHeader.h"
28  
29 ClassImp(AliHeader)
30
31 //_______________________________________________________________________
32 AliHeader::AliHeader():
33   fRun(0),
34   fNvertex(0),
35   fNprimary(0),
36   fNtrack(0),
37   fEvent(0),
38   fEventNrInRun(0),
39   fStack(0),
40   fGenHeader(0)
41 {
42   //
43   // Default constructor
44   //
45 }
46
47 //_______________________________________________________________________
48 AliHeader::AliHeader(const AliHeader& head):
49   TObject(head),
50   fRun(0),
51   fNvertex(0),
52   fNprimary(0),
53   fNtrack(0),
54   fEvent(0),
55   fEventNrInRun(0),
56   fStack(0),
57   fGenHeader(0)
58 {
59   //
60   // Copy constructor
61   //
62   head.Copy(*this);
63 }
64
65 //_______________________________________________________________________
66 AliHeader::AliHeader(Int_t run, Int_t event):
67   fRun(run),
68   fNvertex(0),
69   fNprimary(0),
70   fNtrack(0),
71   fEvent(event),
72   fEventNrInRun(0),
73   fStack(0),
74   fGenHeader(0)
75 {
76   //
77   // Standard constructor
78   //
79 }
80
81 //_______________________________________________________________________
82 AliHeader::AliHeader(Int_t run, Int_t event, Int_t evNumber):
83   fRun(run),
84   fNvertex(0),
85   fNprimary(0),
86   fNtrack(0),
87   fEvent(event),
88   fEventNrInRun(evNumber),
89   fStack(0),
90   fGenHeader(0)
91 {
92   //
93   // Standard constructor
94   //
95 }
96
97 //_______________________________________________________________________
98 void AliHeader::Reset(Int_t run, Int_t event)
99 {
100   //
101   // Resets the header with new run and event number
102   //
103   fRun=run;     
104   fNvertex=0;
105   fNprimary=0;
106   fNtrack=0;
107   fEvent=event;
108 }
109
110 //_______________________________________________________________________
111 void AliHeader::Reset(Int_t run, Int_t event, Int_t evNumber)
112 {
113   //
114   // Resets the header with new run and event number
115   //
116   fRun=run;     
117   fNvertex=0;
118   fNprimary=0;
119   fNtrack=0;
120   fEvent=event;
121   fEventNrInRun=evNumber;
122 }
123
124 //_______________________________________________________________________
125 void AliHeader::Print(const char*) const
126 {
127   //
128   // Dumps header content
129   //
130   printf(
131 "\n=========== Header for run %d Event %d = beginning ======================================\n",
132   fRun,fEvent);
133   printf("              Number of Vertex %d\n",fNvertex);
134   printf("              Number of Primary %d\n",fNprimary);
135   printf("              Number of Tracks %d\n",fNtrack);
136   printf(
137   "=========== Header for run %d Event %d = end ============================================\n\n",
138   fRun,fEvent);
139
140 }
141
142 //_______________________________________________________________________
143 AliStack* AliHeader::Stack() const
144 {
145 // Return pointer to stack
146     return fStack;
147 }
148
149 //_______________________________________________________________________
150 void AliHeader::SetStack(AliStack* stack)
151 {
152 // Set pointer to stack
153     fStack = stack;
154 }
155
156 //_______________________________________________________________________
157 void AliHeader::SetGenEventHeader(AliGenEventHeader* header)
158 {
159 // Set pointer to header for generated event
160     fGenHeader = header;
161 }
162
163 //_______________________________________________________________________
164 AliGenEventHeader*  AliHeader::GenEventHeader() const
165 {
166 // Get pointer to header for generated event
167     return fGenHeader;
168 }
169
170 //_______________________________________________________________________
171 void AliHeader::Copy(AliHeader&) const
172 {
173   Fatal("Copy","Not implemented\n");
174 }
175
176
177