]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliHeader.cxx
Updated a bit with:
[u/mrichter/AliRoot.git] / STEER / AliHeader.cxx
CommitLineData
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$
e2afb3b6 18Revision 1.10 2001/10/09 18:00:35 hristov
19Temporary fix to provide unique event number in the simulation (J.Chudoba)
20
eef4b160 21Revision 1.9 2001/05/23 08:54:53 hristov
22Typo corrected
23
5d34b719 24Revision 1.8 2001/05/23 08:50:01 hristov
25Weird inline removed
26
bdbd0f7a 27Revision 1.7 2001/05/16 14:57:22 alibrary
28New files for folders and Stack
29
02a02c36 30Revision 1.4 2000/10/02 21:28:14 fca
31Removal of useless dependecies via forward declarations
32
94de3818 33Revision 1.3 2000/07/12 08:56:25 fca
34Coding convention correction and warning removal
35
8918e700 36Revision 1.2 1999/09/29 09:24:29 fca
37Introduction of the Copyright and cvs Log
38
4c039060 39*/
40
fe4da5cc 41#include "AliHeader.h"
02a02c36 42#include <stdio.h>
fe4da5cc 43
44ClassImp(AliHeader)
45
e2afb3b6 46//_______________________________________________________________________
47AliHeader::AliHeader():
48 fRun(0),
49 fNvertex(0),
50 fNprimary(0),
51 fNtrack(0),
52 fEvent(0),
53 fEventNrInRun(0),
54 fStack(0),
55 fGenHeader(0)
fe4da5cc 56{
8918e700 57 //
58 // Default constructor
59 //
fe4da5cc 60}
61
e2afb3b6 62//_______________________________________________________________________
63AliHeader::AliHeader(const AliHeader& head):
64 TObject(head),
65 fRun(0),
66 fNvertex(0),
67 fNprimary(0),
68 fNtrack(0),
69 fEvent(0),
70 fEventNrInRun(0),
71 fStack(0),
72 fGenHeader(0)
fe4da5cc 73{
8918e700 74 //
e2afb3b6 75 // Copy constructor
8918e700 76 //
e2afb3b6 77 head.Copy(*this);
fe4da5cc 78}
79
e2afb3b6 80//_______________________________________________________________________
81AliHeader::AliHeader(Int_t run, Int_t event):
82 fRun(run),
83 fNvertex(0),
84 fNprimary(0),
85 fNtrack(0),
86 fEvent(event),
87 fEventNrInRun(0),
88 fStack(0),
89 fGenHeader(0)
eef4b160 90{
91 //
92 // Standard constructor
93 //
eef4b160 94}
95
e2afb3b6 96//_______________________________________________________________________
97AliHeader::AliHeader(Int_t run, Int_t event, Int_t evNumber):
98 fRun(run),
99 fNvertex(0),
100 fNprimary(0),
101 fNtrack(0),
102 fEvent(event),
103 fEventNrInRun(evNumber),
104 fStack(0),
105 fGenHeader(0)
106{
107 //
108 // Standard constructor
109 //
110}
eef4b160 111
e2afb3b6 112//_______________________________________________________________________
fe4da5cc 113void AliHeader::Reset(Int_t run, Int_t event)
114{
8918e700 115 //
116 // Resets the header with new run and event number
117 //
fe4da5cc 118 fRun=run;
119 fNvertex=0;
120 fNprimary=0;
121 fNtrack=0;
122 fEvent=event;
123}
124
e2afb3b6 125//_______________________________________________________________________
eef4b160 126void AliHeader::Reset(Int_t run, Int_t event, Int_t evNumber)
127{
128 //
129 // Resets the header with new run and event number
130 //
131 fRun=run;
132 fNvertex=0;
133 fNprimary=0;
134 fNtrack=0;
135 fEvent=event;
136 fEventNrInRun=evNumber;
137}
138
e2afb3b6 139//_______________________________________________________________________
140void AliHeader::Print(const char*) const
fe4da5cc 141{
8918e700 142 //
143 // Dumps header content
144 //
fe4da5cc 145 printf(
146"\n=========== Header for run %d Event %d = beginning ======================================\n",
147 fRun,fEvent);
148 printf(" Number of Vertex %d\n",fNvertex);
149 printf(" Number of Primary %d\n",fNprimary);
150 printf(" Number of Tracks %d\n",fNtrack);
151 printf(
152 "=========== Header for run %d Event %d = end ============================================\n\n",
153 fRun,fEvent);
9e1a0ddb 154
155}
156
e2afb3b6 157//_______________________________________________________________________
bdbd0f7a 158AliStack* AliHeader::Stack() const
9e1a0ddb 159{
160// Return pointer to stack
161 return fStack;
162}
163
e2afb3b6 164//_______________________________________________________________________
bdbd0f7a 165void AliHeader::SetStack(AliStack* stack)
9e1a0ddb 166{
167// Set pointer to stack
168 fStack = stack;
169}
170
e2afb3b6 171//_______________________________________________________________________
bdbd0f7a 172void AliHeader::SetGenEventHeader(AliGenEventHeader* header)
9e1a0ddb 173{
174// Set pointer to header for generated event
175 fGenHeader = header;
176}
177
e2afb3b6 178//_______________________________________________________________________
5d34b719 179AliGenEventHeader* AliHeader::GenEventHeader() const
9e1a0ddb 180{
181// Get pointer to header for generated event
182 return fGenHeader;
fe4da5cc 183}
bdbd0f7a 184
e2afb3b6 185//_______________________________________________________________________
186void AliHeader::Copy(AliHeader&) const
187{
188 Fatal("Copy","Not implemented\n");
189}
bdbd0f7a 190
191
192