]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliHeader.h
Fixing memory leaks
[u/mrichter/AliRoot.git] / STEER / AliHeader.h
CommitLineData
8918e700 1#ifndef ALIHEADER_H
2#define ALIHEADER_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
fe4da5cc 7
0742d588 8//-----------------------------------------------------------------------
9// Simulation event header class
10// Collaborates with AliRun, AliStack, and AliGenReaderTreeK classes
11// Many other classes depend on it
12//-----------------------------------------------------------------------
13
02a02c36 14#include <TObject.h>
e2afb3b6 15
9e1a0ddb 16class AliStack;
17class AliGenEventHeader;
fe4da5cc 18
19class AliHeader : public TObject {
fe4da5cc 20public:
21 AliHeader();
e2afb3b6 22 AliHeader(const AliHeader& head);
fe4da5cc 23 AliHeader(Int_t run, Int_t event);
eef4b160 24 AliHeader(Int_t run, Int_t eventSerialNr, Int_t evNrInRun);
8918e700 25 virtual ~AliHeader() {}
fe4da5cc 26
27 virtual void Reset(Int_t run, Int_t event);
eef4b160 28 virtual void Reset(Int_t run, Int_t eventSerialNr, Int_t evNrInRun);
fe4da5cc 29
30 virtual void SetRun(Int_t run) {fRun = run;}
31 virtual Int_t GetRun() const {return fRun;}
32
33 virtual void SetNprimary(Int_t nprimary) {fNprimary = nprimary;}
a41d61a9 34 virtual Int_t GetNprimary() const {return fNprimary;}
35 virtual Int_t GetNsecondary() const {return fNtrack-fNprimary;}
fe4da5cc 36
37 virtual void SetNvertex(Int_t vertex) {fNvertex = vertex;}
38 virtual Int_t GetNvertex() const {return fNvertex;}
39
40 virtual void SetNtrack(Int_t ntrack) {fNtrack = ntrack;}
41 virtual Int_t GetNtrack() const {return fNtrack;}
42
43 virtual void SetEvent(Int_t event) {fEvent = event;}
44 virtual Int_t GetEvent() const {return fEvent;}
eef4b160 45
46 virtual void SetEventNrInRun(Int_t event) {fEventNrInRun = event;}
47 virtual Int_t GetEventNrInRun() const {return fEventNrInRun;}
48
9e1a0ddb 49 virtual AliStack* Stack() const;
50 virtual void SetStack(AliStack* stack);
fe4da5cc 51
9e1a0ddb 52 virtual void SetGenEventHeader(AliGenEventHeader* header);
53 virtual AliGenEventHeader* GenEventHeader() const;
02a02c36 54
e2afb3b6 55 virtual void Print(const char *opt=0) const;
56
5d8718b8 57 AliHeader& operator=(const AliHeader& head)
e2afb3b6 58 {head.Copy(*this); return *this;}
fe4da5cc 59
8918e700 60protected:
e2afb3b6 61
6c4904c2 62 void Copy(TObject& head) const;
e2afb3b6 63
8918e700 64 Int_t fRun; //Run number
65 Int_t fNvertex; //Number of vertices
66 Int_t fNprimary; //Number of primary tracks
67 Int_t fNtrack; //Number of tracks
eef4b160 68 Int_t fEvent; //Event number (serial in the file)
69 Int_t fEventNrInRun; //Unique Event number within the run
9e1a0ddb 70 AliStack *fStack; //Pointer to stack
71 AliGenEventHeader* fGenHeader; //Event Header for Generator
72
eef4b160 73 ClassDef(AliHeader,2) //Alice event header
fe4da5cc 74};
75
76#endif