]>
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 | ||
16 | /* | |
17 | $Log$ | |
eef4b160 | 18 | Revision 1.9 2001/05/23 08:54:53 hristov |
19 | Typo corrected | |
20 | ||
5d34b719 | 21 | Revision 1.8 2001/05/23 08:50:01 hristov |
22 | Weird inline removed | |
23 | ||
bdbd0f7a | 24 | Revision 1.7 2001/05/16 14:57:22 alibrary |
25 | New files for folders and Stack | |
26 | ||
02a02c36 | 27 | Revision 1.4 2000/10/02 21:28:14 fca |
28 | Removal of useless dependecies via forward declarations | |
29 | ||
94de3818 | 30 | Revision 1.3 2000/07/12 08:56:25 fca |
31 | Coding convention correction and warning removal | |
32 | ||
8918e700 | 33 | Revision 1.2 1999/09/29 09:24:29 fca |
34 | Introduction of the Copyright and cvs Log | |
35 | ||
4c039060 | 36 | */ |
37 | ||
fe4da5cc | 38 | #include "AliHeader.h" |
02a02c36 | 39 | #include <stdio.h> |
fe4da5cc | 40 | |
41 | ClassImp(AliHeader) | |
42 | ||
43 | AliHeader::AliHeader() | |
44 | { | |
8918e700 | 45 | // |
46 | // Default constructor | |
47 | // | |
fe4da5cc | 48 | fRun=0; |
49 | fNvertex=0; | |
50 | fNprimary=0; | |
51 | fNtrack=0; | |
52 | fEvent=0; | |
9e1a0ddb | 53 | fStack=0; |
54 | fGenHeader = 0; | |
eef4b160 | 55 | fEventNrInRun=0; |
fe4da5cc | 56 | } |
57 | ||
58 | AliHeader::AliHeader(Int_t run, Int_t event) | |
59 | { | |
8918e700 | 60 | // |
61 | // Standard constructor | |
62 | // | |
fe4da5cc | 63 | fRun=run; |
64 | fNvertex=0; | |
65 | fNprimary=0; | |
66 | fNtrack=0; | |
67 | fEvent=event; | |
9e1a0ddb | 68 | fStack=0; |
69 | fGenHeader = 0; | |
fe4da5cc | 70 | } |
71 | ||
eef4b160 | 72 | AliHeader::AliHeader(Int_t run, Int_t event, Int_t evNumber) |
73 | { | |
74 | // | |
75 | // Standard constructor | |
76 | // | |
77 | fRun=run; | |
78 | fNvertex=0; | |
79 | fNprimary=0; | |
80 | fNtrack=0; | |
81 | fEvent=event; | |
82 | fEventNrInRun=evNumber; | |
83 | fStack=0; | |
84 | fGenHeader = 0; | |
85 | } | |
86 | ||
87 | ||
fe4da5cc | 88 | void AliHeader::Reset(Int_t run, Int_t event) |
89 | { | |
8918e700 | 90 | // |
91 | // Resets the header with new run and event number | |
92 | // | |
fe4da5cc | 93 | fRun=run; |
94 | fNvertex=0; | |
95 | fNprimary=0; | |
96 | fNtrack=0; | |
97 | fEvent=event; | |
98 | } | |
99 | ||
eef4b160 | 100 | void AliHeader::Reset(Int_t run, Int_t event, Int_t evNumber) |
101 | { | |
102 | // | |
103 | // Resets the header with new run and event number | |
104 | // | |
105 | fRun=run; | |
106 | fNvertex=0; | |
107 | fNprimary=0; | |
108 | fNtrack=0; | |
109 | fEvent=event; | |
110 | fEventNrInRun=evNumber; | |
111 | } | |
112 | ||
02a02c36 | 113 | void AliHeader::Print(const char* option) |
fe4da5cc | 114 | { |
8918e700 | 115 | // |
116 | // Dumps header content | |
117 | // | |
fe4da5cc | 118 | printf( |
119 | "\n=========== Header for run %d Event %d = beginning ======================================\n", | |
120 | fRun,fEvent); | |
121 | printf(" Number of Vertex %d\n",fNvertex); | |
122 | printf(" Number of Primary %d\n",fNprimary); | |
123 | printf(" Number of Tracks %d\n",fNtrack); | |
124 | printf( | |
125 | "=========== Header for run %d Event %d = end ============================================\n\n", | |
126 | fRun,fEvent); | |
9e1a0ddb | 127 | |
128 | } | |
129 | ||
bdbd0f7a | 130 | AliStack* AliHeader::Stack() const |
9e1a0ddb | 131 | { |
132 | // Return pointer to stack | |
133 | return fStack; | |
134 | } | |
135 | ||
bdbd0f7a | 136 | void AliHeader::SetStack(AliStack* stack) |
9e1a0ddb | 137 | { |
138 | // Set pointer to stack | |
139 | fStack = stack; | |
140 | } | |
141 | ||
bdbd0f7a | 142 | void AliHeader::SetGenEventHeader(AliGenEventHeader* header) |
9e1a0ddb | 143 | { |
144 | // Set pointer to header for generated event | |
145 | fGenHeader = header; | |
146 | } | |
147 | ||
5d34b719 | 148 | AliGenEventHeader* AliHeader::GenEventHeader() const |
9e1a0ddb | 149 | { |
150 | // Get pointer to header for generated event | |
151 | return fGenHeader; | |
fe4da5cc | 152 | } |
bdbd0f7a | 153 | |
154 | ||
155 | ||
156 |