Introducing Header instead of Log
[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
fb17acd4 16/* $Header$ */
e2afb3b6 17
fb17acd4 18#include <stdio.h>
4c039060 19
fe4da5cc 20#include "AliHeader.h"
fe4da5cc 21
22ClassImp(AliHeader)
23
e2afb3b6 24//_______________________________________________________________________
25AliHeader::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)
fe4da5cc 34{
8918e700 35 //
36 // Default constructor
37 //
fe4da5cc 38}
39
e2afb3b6 40//_______________________________________________________________________
41AliHeader::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)
fe4da5cc 51{
8918e700 52 //
e2afb3b6 53 // Copy constructor
8918e700 54 //
e2afb3b6 55 head.Copy(*this);
fe4da5cc 56}
57
e2afb3b6 58//_______________________________________________________________________
59AliHeader::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)
eef4b160 68{
69 //
70 // Standard constructor
71 //
eef4b160 72}
73
e2afb3b6 74//_______________________________________________________________________
75AliHeader::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}
eef4b160 89
e2afb3b6 90//_______________________________________________________________________
fe4da5cc 91void AliHeader::Reset(Int_t run, Int_t event)
92{
8918e700 93 //
94 // Resets the header with new run and event number
95 //
fe4da5cc 96 fRun=run;
97 fNvertex=0;
98 fNprimary=0;
99 fNtrack=0;
100 fEvent=event;
101}
102
e2afb3b6 103//_______________________________________________________________________
eef4b160 104void 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
e2afb3b6 117//_______________________________________________________________________
118void AliHeader::Print(const char*) const
fe4da5cc 119{
8918e700 120 //
121 // Dumps header content
122 //
fe4da5cc 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);
9e1a0ddb 132
133}
134
e2afb3b6 135//_______________________________________________________________________
bdbd0f7a 136AliStack* AliHeader::Stack() const
9e1a0ddb 137{
138// Return pointer to stack
139 return fStack;
140}
141
e2afb3b6 142//_______________________________________________________________________
bdbd0f7a 143void AliHeader::SetStack(AliStack* stack)
9e1a0ddb 144{
145// Set pointer to stack
146 fStack = stack;
147}
148
e2afb3b6 149//_______________________________________________________________________
bdbd0f7a 150void AliHeader::SetGenEventHeader(AliGenEventHeader* header)
9e1a0ddb 151{
152// Set pointer to header for generated event
153 fGenHeader = header;
154}
155
e2afb3b6 156//_______________________________________________________________________
5d34b719 157AliGenEventHeader* AliHeader::GenEventHeader() const
9e1a0ddb 158{
159// Get pointer to header for generated event
160 return fGenHeader;
fe4da5cc 161}
bdbd0f7a 162
e2afb3b6 163//_______________________________________________________________________
164void AliHeader::Copy(AliHeader&) const
165{
166 Fatal("Copy","Not implemented\n");
167}
bdbd0f7a 168
169
170