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