]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODInputHandler.h
Put 0.1 as minimal value of the gas gain (Raphaelle)
[u/mrichter/AliRoot.git] / STEER / AliAODInputHandler.h
1 #ifndef ALIAODINPUTHANDLER_H
2 #define ALIAODINPUTHANDLER_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 //     AOD Input Handler realisation of the AliVEventHandler interface
10 //     Author: Andreas Morsch, CERN
11 //-------------------------------------------------------------------------
12
13 #include "AliInputEventHandler.h"
14 #include "AliAODEvent.h"
15 #include "AliMCEvent.h"
16
17 class TList;
18 class AliMCEvent;
19 class TH2F;
20
21 class AliAODInputHandler : public AliInputEventHandler {
22
23  public:
24     AliAODInputHandler();
25     AliAODInputHandler(const char* name, const char* title);
26     virtual ~AliAODInputHandler();
27     virtual Bool_t       Init(Option_t* /*opt*/) {return kTRUE;}
28     virtual Bool_t       Init(TTree* tree, Option_t* opt);
29     AliAODEvent         *GetEvent() const {return fEvent;}
30     AliMCEvent          *MCEvent()  const {return fMCEvent;}
31     virtual void         AddFriend(char* filename);
32     virtual Bool_t       BeginEvent(Long64_t entry);
33     virtual Bool_t       Notify() { return AliVEventHandler::Notify();};
34     virtual Bool_t       Notify(const char* path);
35     virtual Bool_t       FinishEvent();
36     Option_t            *GetDataType() const;
37     // Get the statistics object (currently TH2). Option can be BIN0.
38     virtual TObject     *GetStatistics(Option_t *option="") const;
39     // Provisions for event merging
40     void                 SetMergeEvents(Bool_t flag) {fMergeEvents = flag;}
41     Bool_t               GetMergeEvents() const {return fMergeEvents;}
42     AliAODEvent*         GetEventToMerge() {return fAODEventToMerge;}
43     void                 SetMergeOffset(Int_t ioff) {fMergeOffset = ioff;}
44  private:
45     AliAODInputHandler(const AliAODInputHandler& handler);             
46     AliAODInputHandler& operator=(const AliAODInputHandler& handler);  
47  private:
48     AliAODEvent    *fEvent;   //! Pointer to the event
49     AliMCEvent     *fMCEvent; //! Pointer to the MCEvent
50     TList          *fFriends; //  List of friend trees 
51 // Support for merged events
52     Bool_t          fMergeEvents;     // Flag for event merging
53     TFile          *fFileToMerge;     //! File for merging
54     TTree          *fTreeToMerge;     //! Tree for merging
55     AliAODEvent    *fAODEventToMerge; //! Event for merging
56     Int_t           fMergeOffset;     //! Event offset for merging
57     TH2F*           fHistStatistics[2]; //! how many events are cut away why {all,bin 0}
58     ClassDef(AliAODInputHandler, 2);
59 };
60
61 #endif