]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEERBase/AliVEventHandler.h
Patch allowing to run analysis on a chain with file names different than AliESDs...
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliVEventHandler.h
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
15 class TTree;
16
17 class AliVEventHandler : public TNamed {
18
19  public:
20 enum EEventHandlerFlags {
21    kHandlerLocked       = BIT(14)
22 };
23     AliVEventHandler();
24     AliVEventHandler(const char* name, const char* title);
25     virtual ~AliVEventHandler();
26     // Handled tree
27     virtual TTree       *GetTree() const { return NULL; }
28     virtual Option_t    *GetDataType() const { return NULL; }
29     virtual void         SetFillAOD(Bool_t) {}
30     virtual void         SetFillExtension(Bool_t) {}
31     // Input
32     virtual void         SetInputFileName(const char*) {}
33     virtual const char*  GetInputFileName() const {return 0;}
34     // Output
35     virtual void         SetOutputFileName(const char* fname)   = 0;
36     virtual const char*  GetOutputFileName() const        = 0;
37     // Extra outputs as a string separated by commas
38     virtual const char*  GetExtraOutputs() const {return NULL;}
39     // Input
40     virtual void         SetInputTree(TTree* tree)        = 0;
41     // Steering 
42     virtual Bool_t       Init(Option_t* opt)              = 0;
43     virtual Bool_t       Init(TTree* tree, Option_t* opt) = 0;
44     virtual Bool_t       BeginEvent(Long64_t entry)       = 0;
45     virtual Bool_t       GetEntry()                       = 0;
46     virtual Bool_t       Notify(const char *path)         = 0;
47     virtual Bool_t       FinishEvent()                    = 0;
48     virtual Bool_t       Terminate()                      = 0;
49     virtual Bool_t       TerminateIO()                    = 0;
50     //
51     virtual Bool_t       Notify() { return TNamed::Notify(); };
52     // Security
53     Bool_t               IsLocked() const {return TObject::TestBit(kHandlerLocked);}
54     void                 Lock();
55     void                 UnLock();
56     void                 Changed();
57     virtual void         SetCacheSize(Long64_t) {}
58     virtual TList        *GetUserInfo() const {return 0x0;};
59  private :
60   ClassDef(AliVEventHandler, 1);
61 };
62
63 #endif