]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliHeader.cxx
macro for loading the basic steering libraries
[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 "AliLog.h"
28 #include "AliHeader.h"
29  
30 ClassImp(AliHeader)
31
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)
42 {
43   //
44   // Default constructor
45   //
46 }
47
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)
59 {
60   //
61   // Copy constructor
62   //
63   head.Copy(*this);
64 }
65
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)
76 {
77   //
78   // Standard constructor
79   //
80 }
81
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 }
97
98 //_______________________________________________________________________
99 void AliHeader::Reset(Int_t run, Int_t event)
100 {
101   //
102   // Resets the header with new run and event number
103   //
104   fRun=run;     
105   fNvertex=0;
106   fNprimary=0;
107   fNtrack=0;
108   fEvent=event;
109 }
110
111 //_______________________________________________________________________
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
125 //_______________________________________________________________________
126 void AliHeader::Print(const char*) const
127 {
128   //
129   // Dumps header content
130   //
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);
140
141 }
142
143 //_______________________________________________________________________
144 AliStack* AliHeader::Stack() const
145 {
146 // Return pointer to stack
147     return fStack;
148 }
149
150 //_______________________________________________________________________
151 void AliHeader::SetStack(AliStack* stack)
152 {
153 // Set pointer to stack
154     fStack = stack;
155 }
156
157 //_______________________________________________________________________
158 void AliHeader::SetGenEventHeader(AliGenEventHeader* header)
159 {
160 // Set pointer to header for generated event
161     fGenHeader = header;
162 }
163
164 //_______________________________________________________________________
165 AliGenEventHeader*  AliHeader::GenEventHeader() const
166 {
167 // Get pointer to header for generated event
168     return fGenHeader;
169 }
170
171 //_______________________________________________________________________
172 void AliHeader::Copy(TObject&) const
173 {
174   AliFatal("Not implemented");
175 }
176
177
178