]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODInputHandler.h
Coding rule violations corrected
[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 class TList;
16 class AliMCEvent;
17 class TH2F;
18 class AliMCEvent;
19
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     void ConnectFriends();
46     AliAODInputHandler(const AliAODInputHandler& handler);             
47     AliAODInputHandler& operator=(const AliAODInputHandler& handler);  
48  private:
49     AliAODEvent    *fEvent;   //! Pointer to the event
50     AliMCEvent     *fMCEvent; //! Pointer to the MCEvent
51     TList          *fFriends; //  List of friend trees 
52 // Support for merged events
53     Bool_t          fMergeEvents;     // Flag for event merging
54     Bool_t          fFriendsConnected;// Friends are connected
55     TFile          *fFileToMerge;     //! File for merging
56     TTree          *fTreeToMerge;     //! Tree for merging
57     AliAODEvent    *fAODEventToMerge; //! Event for merging
58     Int_t           fMergeOffset;     //! Event offset for merging
59     TH2F*           fHistStatistics[2]; //! how many events are cut away why {all,bin 0}
60     ClassDef(AliAODInputHandler, 3);
61 };
62
63 #endif