]>
Commit | Line | Data |
---|---|---|
397596ed | 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" | |
fedd7a0d | 14 | #include "AliAODEvent.h" |
ddf019ae | 15 | #include "AliMCEvent.h" |
26772015 | 16 | class TList; |
04a79fa0 | 17 | class AliMCEvent; |
70908d05 | 18 | class TH2F; |
5e6a3170 | 19 | class AliMCEvent; |
9006fe9c | 20 | class AliAODpidUtil; |
21 | class AliPIDResponse; | |
5e6a3170 | 22 | |
26772015 | 23 | |
397596ed | 24 | class AliAODInputHandler : public AliInputEventHandler { |
25 | ||
26 | public: | |
27 | AliAODInputHandler(); | |
28 | AliAODInputHandler(const char* name, const char* title); | |
29 | virtual ~AliAODInputHandler(); | |
300d5701 | 30 | virtual Bool_t Init(Option_t* /*opt*/) {return kTRUE;} |
31 | virtual Bool_t Init(TTree* tree, Option_t* opt); | |
87d395bd | 32 | AliAODEvent *GetEvent() const {return fEvent;} |
04a79fa0 | 33 | AliMCEvent *MCEvent() const {return fMCEvent;} |
fbb264e0 | 34 | virtual void AddFriend(char* filename); |
35 | virtual Bool_t BeginEvent(Long64_t entry); | |
b890a10d | 36 | virtual Bool_t Notify() { return AliVEventHandler::Notify();}; |
37 | virtual Bool_t Notify(const char* path); | |
38 | virtual Bool_t FinishEvent(); | |
c2b6979d | 39 | Option_t *GetDataType() const; |
70908d05 | 40 | // Get the statistics object (currently TH2). Option can be BIN0. |
41 | virtual TObject *GetStatistics(Option_t *option="") const; | |
1f842495 | 42 | // Provisions for event merging |
43 | void SetMergeEvents(Bool_t flag) {fMergeEvents = flag;} | |
44 | Bool_t GetMergeEvents() const {return fMergeEvents;} | |
45 | AliAODEvent* GetEventToMerge() {return fAODEventToMerge;} | |
04daa8bf | 46 | void SetMergeOffset(Int_t ioff) {fMergeOffset = ioff;} |
9006fe9c | 47 | |
48 | //PID response | |
49 | virtual AliPIDResponse* GetPIDResponse() {return (AliPIDResponse*)fAODpidUtil;} | |
50 | virtual void CreatePIDResponse(Bool_t isMC=kFALSE); | |
51 | AliAODpidUtil *GetAODpidUtil() const { return fAODpidUtil; } | |
52 | ||
87d395bd | 53 | private: |
25c90fa8 | 54 | void ConnectFriends(); |
87d395bd | 55 | AliAODInputHandler(const AliAODInputHandler& handler); |
56 | AliAODInputHandler& operator=(const AliAODInputHandler& handler); | |
fedd7a0d | 57 | private: |
4195c9c9 | 58 | AliAODEvent *fEvent; //! Pointer to the event |
04a79fa0 | 59 | AliMCEvent *fMCEvent; //! Pointer to the MCEvent |
9006fe9c | 60 | TList *fFriends; // List of friend trees |
61 | AliAODpidUtil *fAODpidUtil; //! Pointer to PID information | |
62 | ||
1f842495 | 63 | // Support for merged events |
64 | Bool_t fMergeEvents; // Flag for event merging | |
25c90fa8 | 65 | Bool_t fFriendsConnected;// Friends are connected |
1f842495 | 66 | TFile *fFileToMerge; //! File for merging |
67 | TTree *fTreeToMerge; //! Tree for merging | |
68 | AliAODEvent *fAODEventToMerge; //! Event for merging | |
04daa8bf | 69 | Int_t fMergeOffset; //! Event offset for merging |
70908d05 | 70 | TH2F* fHistStatistics[2]; //! how many events are cut away why {all,bin 0} |
57459102 | 71 | ClassDef(AliAODInputHandler, 3); |
397596ed | 72 | }; |
73 | ||
74 | #endif |