]>
Commit | Line | Data |
---|---|---|
6bc03c45 | 1 | #ifndef ALIVEVENTHANDLER_H |
2 | #define ALIVEVENTHANDLER_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // Event Handler base class | |
10 | // Author: Andreas Morsch, CERN | |
11 | //------------------------------------------------------------------------- | |
12 | ||
13 | #include <TNamed.h> | |
14 | ||
933fd60f | 15 | class TTree; |
afdb0e0d | 16 | class TObjArray; |
17 | class AliVEvent; | |
949fa831 | 18 | class AliESDfriend; |
6bc03c45 | 19 | |
20 | class AliVEventHandler : public TNamed { | |
21 | ||
22 | public: | |
59e0dcd5 | 23 | enum EEventHandlerFlags { |
24 | kHandlerLocked = BIT(14) | |
25 | }; | |
6bc03c45 | 26 | AliVEventHandler(); |
27 | AliVEventHandler(const char* name, const char* title); | |
28 | virtual ~AliVEventHandler(); | |
7970f4ac | 29 | // Handled tree |
11326411 | 30 | virtual TTree *GetTree() const { return NULL; } |
c2b6979d | 31 | virtual Option_t *GetDataType() const { return NULL; } |
6be131bd | 32 | virtual Bool_t GetFillAOD() const {return kTRUE;} |
33 | virtual Bool_t GetFillExtension() const {return kTRUE;} | |
5b173801 | 34 | virtual void SetFillAOD(Bool_t) {} |
307b6330 | 35 | virtual void SetFillExtension(Bool_t) {} |
fdbaa4ce | 36 | // Input |
37 | virtual void SetInputFileName(const char*) {} | |
38 | virtual const char* GetInputFileName() const {return 0;} | |
933fd60f | 39 | // Output |
0931e76a | 40 | virtual void SetOutputFileName(const char* fname) = 0; |
fdbaa4ce | 41 | virtual const char* GetOutputFileName() const = 0; |
90d50a8c | 42 | // Extra outputs as a string separated by commas |
f6eaa73b | 43 | virtual const char* GetExtraOutputs(Bool_t merge=kFALSE) const; |
933fd60f | 44 | // Input |
300d5701 | 45 | virtual void SetInputTree(TTree* tree) = 0; |
933fd60f | 46 | // Steering |
300d5701 | 47 | virtual Bool_t Init(Option_t* opt) = 0; |
48 | virtual Bool_t Init(TTree* tree, Option_t* opt) = 0; | |
49 | virtual Bool_t BeginEvent(Long64_t entry) = 0; | |
0d6a82a5 | 50 | virtual Bool_t GetEntry() = 0; |
300d5701 | 51 | virtual Bool_t Notify(const char *path) = 0; |
52 | virtual Bool_t FinishEvent() = 0; | |
53 | virtual Bool_t Terminate() = 0; | |
54 | virtual Bool_t TerminateIO() = 0; | |
55 | // | |
276be602 | 56 | virtual Bool_t Notify() { return TNamed::Notify(); }; |
59e0dcd5 | 57 | // Security |
58 | Bool_t IsLocked() const {return TObject::TestBit(kHandlerLocked);} | |
59 | void Lock(); | |
60 | void UnLock(); | |
61 | void Changed(); | |
43072535 | 62 | virtual void SetCacheSize(Long64_t) {} |
4cf1e5f2 | 63 | virtual TList *GetUserInfo() const {return 0x0;}; |
afdb0e0d | 64 | |
949fa831 | 65 | // HLT |
66 | virtual Bool_t InitTaskInputData(AliVEvent* /*event*/, AliESDfriend* /*esdFriend*/, TObjArray* /*arrTasks*/) {printf("OOOOPS!!!\n"); return kTRUE;}; | |
67 | virtual AliVEvent* GetEvent() const {return 0x0;}; | |
68 | virtual AliESDfriend* GetFriendEvent() const {return 0x0;}; | |
afdb0e0d | 69 | |
6bc03c45 | 70 | private : |
300d5701 | 71 | ClassDef(AliVEventHandler, 1); |
6bc03c45 | 72 | }; |
73 | ||
74 | #endif |