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