]>
Commit | Line | Data |
---|---|---|
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> |
f828ebed | 15 | #include <time.h> |
e2afb3b6 | 16 | |
9e1a0ddb | 17 | class AliStack; |
18 | class AliGenEventHeader; | |
b961264c | 19 | class AliDetectorEventHeader; |
20 | class TObjArray; | |
21 | ||
fe4da5cc | 22 | class AliHeader : public TObject { |
fe4da5cc | 23 | public: |
24 | AliHeader(); | |
e2afb3b6 | 25 | AliHeader(const AliHeader& head); |
fe4da5cc | 26 | AliHeader(Int_t run, Int_t event); |
eef4b160 | 27 | AliHeader(Int_t run, Int_t eventSerialNr, Int_t evNrInRun); |
b961264c | 28 | virtual ~AliHeader(); |
29 | ||
fe4da5cc | 30 | |
31 | virtual void Reset(Int_t run, Int_t event); | |
eef4b160 | 32 | virtual void Reset(Int_t run, Int_t eventSerialNr, Int_t evNrInRun); |
fe4da5cc | 33 | |
34 | virtual void SetRun(Int_t run) {fRun = run;} | |
35 | virtual Int_t GetRun() const {return fRun;} | |
36 | ||
37 | virtual void SetNprimary(Int_t nprimary) {fNprimary = nprimary;} | |
a41d61a9 | 38 | virtual Int_t GetNprimary() const {return fNprimary;} |
39 | virtual Int_t GetNsecondary() const {return fNtrack-fNprimary;} | |
fe4da5cc | 40 | |
41 | virtual void SetNvertex(Int_t vertex) {fNvertex = vertex;} | |
42 | virtual Int_t GetNvertex() const {return fNvertex;} | |
43 | ||
44 | virtual void SetNtrack(Int_t ntrack) {fNtrack = ntrack;} | |
45 | virtual Int_t GetNtrack() const {return fNtrack;} | |
46 | ||
47 | virtual void SetEvent(Int_t event) {fEvent = event;} | |
48 | virtual Int_t GetEvent() const {return fEvent;} | |
eef4b160 | 49 | |
50 | virtual void SetEventNrInRun(Int_t event) {fEventNrInRun = event;} | |
51 | virtual Int_t GetEventNrInRun() const {return fEventNrInRun;} | |
52 | ||
9e1a0ddb | 53 | virtual AliStack* Stack() const; |
54 | virtual void SetStack(AliStack* stack); | |
fe4da5cc | 55 | |
9e1a0ddb | 56 | virtual void SetGenEventHeader(AliGenEventHeader* header); |
57 | virtual AliGenEventHeader* GenEventHeader() const; | |
02a02c36 | 58 | |
b961264c | 59 | virtual void AddDetectorEventHeader(AliDetectorEventHeader* header); |
60 | virtual AliDetectorEventHeader* GetDetectorEventHeader(const char *name) const; | |
61 | ||
475baf89 | 62 | virtual void SetTimeStamp(time_t timeStamp) {fTimeStamp = timeStamp;} |
63 | virtual time_t GetTimeStamp() const {return fTimeStamp;} | |
b961264c | 64 | |
e2afb3b6 | 65 | virtual void Print(const char *opt=0) const; |
66 | ||
5d8718b8 | 67 | AliHeader& operator=(const AliHeader& head) |
e2afb3b6 | 68 | {head.Copy(*this); return *this;} |
fe4da5cc | 69 | |
8918e700 | 70 | protected: |
e2afb3b6 | 71 | |
6c4904c2 | 72 | void Copy(TObject& head) const; |
e2afb3b6 | 73 | |
b961264c | 74 | Int_t fRun; //Run number |
75 | Int_t fNvertex; //Number of vertices | |
76 | Int_t fNprimary; //Number of primary tracks | |
77 | Int_t fNtrack; //Number of tracks | |
78 | Int_t fEvent; //Event number (serial in the file) | |
79 | Int_t fEventNrInRun; //Unique Event number within the run | |
475baf89 | 80 | time_t fTimeStamp; //Event time-stamp |
b961264c | 81 | AliStack *fStack; //Pointer to stack |
82 | AliGenEventHeader* fGenHeader; //Event Header for Generator | |
83 | TObjArray* fDetHeaders; //Event Headers for detector specific information | |
84 | ||
475baf89 | 85 | ClassDef(AliHeader,4) //Alice event header |
fe4da5cc | 86 | }; |
87 | ||
88 | #endif |