1 | // $Id: EHeader.hh 2648 2006-03-31 16:04:00Z thea $ |
---|
2 | // Author: M.Pallavicini |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: EHeader * |
---|
8 | * Package: SimuEvent * |
---|
9 | * Coordinator: Alessandro.Thea * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __EHEADER_HH__ |
---|
14 | #define __EHEADER_HH__ |
---|
15 | |
---|
16 | #include "TObject.h" |
---|
17 | #include "TRandom.h" |
---|
18 | |
---|
19 | //////////////////////////////////////////////////////////////////////////////// |
---|
20 | // // |
---|
21 | // EHeader // |
---|
22 | // // |
---|
23 | //////////////////////////////////////////////////////////////////////////////// |
---|
24 | |
---|
25 | |
---|
26 | class EHeader : public TObject { |
---|
27 | public: |
---|
28 | EHeader(); |
---|
29 | // ctor |
---|
30 | |
---|
31 | EHeader(const EHeader&); |
---|
32 | // copy ctor |
---|
33 | |
---|
34 | virtual ~EHeader(); |
---|
35 | // dtor |
---|
36 | |
---|
37 | virtual void Clear( Option_t* = "" ); |
---|
38 | // clear object |
---|
39 | |
---|
40 | virtual void Copy( TObject& ) const; |
---|
41 | // copy from an existing object |
---|
42 | |
---|
43 | inline Int_t GetNum() const { return fNum; } |
---|
44 | inline Int_t GetRun() const { return fRun; } |
---|
45 | const char* GetRunName() const { return fRunName.Data(); } |
---|
46 | const TRandom* GetRandom() const { return fRandom; } |
---|
47 | inline UInt_t GetStatus() const { return fStatus; } |
---|
48 | inline const char* GetStatusMsg() const { return fStatusMsg.Data(); } |
---|
49 | |
---|
50 | inline void SetNum( Int_t v ) { fNum=v; } |
---|
51 | inline void SetRun( Int_t v ) { fRun=v; } |
---|
52 | void SetRandom( const TRandom* ); |
---|
53 | inline void SetRunName( const char* name ) { fRunName = name ? name : ""; } |
---|
54 | inline void SetStatus( UInt_t s ) { fStatus=s; } |
---|
55 | inline void SetStatus( UInt_t s, const char* msg ) { fStatus=s; SetStatusMsg(msg); } |
---|
56 | inline void SetStatusMsg( const char* msg ) { fStatusMsg = msg ? msg : ""; } |
---|
57 | |
---|
58 | enum EStatus { |
---|
59 | kOK = 0, |
---|
60 | kFailed = 1 |
---|
61 | }; |
---|
62 | |
---|
63 | ClassDef(EHeader,3) |
---|
64 | |
---|
65 | private: |
---|
66 | Int_t fNum; // event number |
---|
67 | Int_t fRun; // run number |
---|
68 | TString fRunName; // run name |
---|
69 | TRandom* fRandom; // random number generator |
---|
70 | UInt_t fStatus; // status code [success (0), failure (code)] |
---|
71 | TString fStatusMsg; |
---|
72 | |
---|
73 | // trigger infos may go here or in EusoTree; tbd |
---|
74 | }; |
---|
75 | |
---|
76 | #endif /* __EHEADER_HH__ */ |
---|
77 | |
---|