]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | ||
acd84897 | 16 | /* $Id$ */ |
e2afb3b6 | 17 | |
116cbefd | 18 | //----------------------------------------------------------------------- |
116cbefd | 19 | // Simulation event header class |
5d8718b8 | 20 | // Collaborates with AliRun, AliStack, and AliGenReaderTreeK classes |
21 | // Many other classes depend on it | |
22 | // Author: | |
116cbefd | 23 | //----------------------------------------------------------------------- |
24 | ||
fb17acd4 | 25 | #include <stdio.h> |
4c039060 | 26 | |
594d8990 | 27 | #include "AliLog.h" |
fe4da5cc | 28 | #include "AliHeader.h" |
fe4da5cc | 29 | |
30 | ClassImp(AliHeader) | |
31 | ||
e2afb3b6 | 32 | //_______________________________________________________________________ |
33 | AliHeader::AliHeader(): | |
34 | fRun(0), | |
35 | fNvertex(0), | |
36 | fNprimary(0), | |
37 | fNtrack(0), | |
38 | fEvent(0), | |
39 | fEventNrInRun(0), | |
40 | fStack(0), | |
41 | fGenHeader(0) | |
fe4da5cc | 42 | { |
8918e700 | 43 | // |
44 | // Default constructor | |
45 | // | |
fe4da5cc | 46 | } |
47 | ||
e2afb3b6 | 48 | //_______________________________________________________________________ |
49 | AliHeader::AliHeader(const AliHeader& head): | |
50 | TObject(head), | |
51 | fRun(0), | |
52 | fNvertex(0), | |
53 | fNprimary(0), | |
54 | fNtrack(0), | |
55 | fEvent(0), | |
56 | fEventNrInRun(0), | |
57 | fStack(0), | |
58 | fGenHeader(0) | |
fe4da5cc | 59 | { |
8918e700 | 60 | // |
e2afb3b6 | 61 | // Copy constructor |
8918e700 | 62 | // |
e2afb3b6 | 63 | head.Copy(*this); |
fe4da5cc | 64 | } |
65 | ||
e2afb3b6 | 66 | //_______________________________________________________________________ |
67 | AliHeader::AliHeader(Int_t run, Int_t event): | |
68 | fRun(run), | |
69 | fNvertex(0), | |
70 | fNprimary(0), | |
71 | fNtrack(0), | |
72 | fEvent(event), | |
73 | fEventNrInRun(0), | |
74 | fStack(0), | |
75 | fGenHeader(0) | |
eef4b160 | 76 | { |
77 | // | |
78 | // Standard constructor | |
79 | // | |
eef4b160 | 80 | } |
81 | ||
e2afb3b6 | 82 | //_______________________________________________________________________ |
83 | AliHeader::AliHeader(Int_t run, Int_t event, Int_t evNumber): | |
84 | fRun(run), | |
85 | fNvertex(0), | |
86 | fNprimary(0), | |
87 | fNtrack(0), | |
88 | fEvent(event), | |
89 | fEventNrInRun(evNumber), | |
90 | fStack(0), | |
91 | fGenHeader(0) | |
92 | { | |
93 | // | |
94 | // Standard constructor | |
95 | // | |
96 | } | |
eef4b160 | 97 | |
e2afb3b6 | 98 | //_______________________________________________________________________ |
fe4da5cc | 99 | void AliHeader::Reset(Int_t run, Int_t event) |
100 | { | |
8918e700 | 101 | // |
102 | // Resets the header with new run and event number | |
103 | // | |
fe4da5cc | 104 | fRun=run; |
105 | fNvertex=0; | |
106 | fNprimary=0; | |
107 | fNtrack=0; | |
108 | fEvent=event; | |
109 | } | |
110 | ||
e2afb3b6 | 111 | //_______________________________________________________________________ |
eef4b160 | 112 | void AliHeader::Reset(Int_t run, Int_t event, Int_t evNumber) |
113 | { | |
114 | // | |
115 | // Resets the header with new run and event number | |
116 | // | |
117 | fRun=run; | |
118 | fNvertex=0; | |
119 | fNprimary=0; | |
120 | fNtrack=0; | |
121 | fEvent=event; | |
122 | fEventNrInRun=evNumber; | |
123 | } | |
124 | ||
e2afb3b6 | 125 | //_______________________________________________________________________ |
126 | void AliHeader::Print(const char*) const | |
fe4da5cc | 127 | { |
8918e700 | 128 | // |
129 | // Dumps header content | |
130 | // | |
fe4da5cc | 131 | printf( |
132 | "\n=========== Header for run %d Event %d = beginning ======================================\n", | |
133 | fRun,fEvent); | |
134 | printf(" Number of Vertex %d\n",fNvertex); | |
135 | printf(" Number of Primary %d\n",fNprimary); | |
136 | printf(" Number of Tracks %d\n",fNtrack); | |
137 | printf( | |
138 | "=========== Header for run %d Event %d = end ============================================\n\n", | |
139 | fRun,fEvent); | |
9e1a0ddb | 140 | |
141 | } | |
142 | ||
e2afb3b6 | 143 | //_______________________________________________________________________ |
bdbd0f7a | 144 | AliStack* AliHeader::Stack() const |
9e1a0ddb | 145 | { |
146 | // Return pointer to stack | |
147 | return fStack; | |
148 | } | |
149 | ||
e2afb3b6 | 150 | //_______________________________________________________________________ |
bdbd0f7a | 151 | void AliHeader::SetStack(AliStack* stack) |
9e1a0ddb | 152 | { |
153 | // Set pointer to stack | |
154 | fStack = stack; | |
155 | } | |
156 | ||
e2afb3b6 | 157 | //_______________________________________________________________________ |
bdbd0f7a | 158 | void AliHeader::SetGenEventHeader(AliGenEventHeader* header) |
9e1a0ddb | 159 | { |
160 | // Set pointer to header for generated event | |
161 | fGenHeader = header; | |
162 | } | |
163 | ||
e2afb3b6 | 164 | //_______________________________________________________________________ |
5d34b719 | 165 | AliGenEventHeader* AliHeader::GenEventHeader() const |
9e1a0ddb | 166 | { |
167 | // Get pointer to header for generated event | |
168 | return fGenHeader; | |
fe4da5cc | 169 | } |
bdbd0f7a | 170 | |
e2afb3b6 | 171 | //_______________________________________________________________________ |
6c4904c2 | 172 | void AliHeader::Copy(TObject&) const |
e2afb3b6 | 173 | { |
594d8990 | 174 | AliFatal("Not implemented"); |
e2afb3b6 | 175 | } |
bdbd0f7a | 176 | |
177 | ||
178 |