1 #ifndef ALIESDINPUTHANDLER_H
2 #define ALIESDINPUTHANDLER_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //-------------------------------------------------------------------------
9 // ESD Input Handler realisation of the AliVEventHandler interface
10 // Author: Andreas Morsch, CERN
11 //-------------------------------------------------------------------------
13 #include "AliInputEventHandler.h"
14 #include "AliESDEvent.h"
26 class AliESDInputHandler : public AliInputEventHandler {
30 AliESDInputHandler(const char* name, const char* title);
31 virtual ~AliESDInputHandler();
32 virtual Bool_t Init(Option_t* opt) {return AliInputEventHandler::Init(opt);}
33 virtual Bool_t Init(TTree* tree, Option_t* opt);
34 virtual Bool_t BeginEvent(Long64_t entry);
35 virtual Bool_t Notify() { return AliInputEventHandler::Notify(); };
36 virtual Bool_t Notify(const char* path);
37 virtual Bool_t FinishEvent();
38 void CheckSelectionMask();
39 AliESDEvent *GetEvent() const {return fEvent;}
40 Option_t *GetAnalysisType() const {return fAnalysisType;}
41 Option_t *GetDataType() const;
42 // Tag cut summary analysis
43 Int_t GetNEventAcceptedInFile();
44 Int_t GetNEventRejectedInFile();
45 Bool_t GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected);
46 Int_t GetNFilesEmpty();
48 AliESDEvent *GetHLTEvent() const {return fHLTEvent;}
49 TTree *GetHLTTree() const {return fHLTTree;}
50 void SetReadHLT() {fUseHLT = kTRUE;}
52 AliESDfriend *GetESDfriend() const {return fFriend;}
53 void SetReadFriends(Bool_t flag) {fReadFriends = flag;}
54 void SetFriendFileName(const char *fname) {fFriendFileName = fname;}
56 void SetReadTags() {fUseTags = kTRUE;}
57 AliRunTag *GetRunTag() const {return fRunTag;}
58 const AliEventTag *GetEventTag() const {return fEventTag;}
59 // Get the statistics object (currently TH2). Option can be BIN0.
60 virtual TObject *GetStatistics(Option_t *option="") const;
63 virtual AliPIDResponse* GetPIDResponse() {return (AliPIDResponse*)fESDpid;}
64 virtual void CreatePIDResponse(Bool_t isMC=kFALSE);
65 AliESDpid *GetESDpid() const {return fESDpid;}
66 void SetESDpid(AliESDpid* pid) {fESDpid = pid;}
69 AliESDInputHandler(const AliESDInputHandler& handler);
70 AliESDInputHandler& operator=(const AliESDInputHandler& handler);
73 AliESDEvent *fEvent; //! Pointer to the event
74 AliESDfriend *fFriend; //! Pointer to the esd friend
75 AliESDpid *fESDpid; //! Pointer to PID information
76 Option_t *fAnalysisType; //! local, proof, grid
77 Int_t fNEvents; //! Number of events in the current tree
79 AliESDEvent *fHLTEvent; //! Pointer to the HLT Event (if present)
80 TTree *fHLTTree; //! Pointer to the HLT Event (if present)
81 Bool_t fUseHLT; // Flag to access HLT Events
82 // ESD Tag Cut Summary
83 TMap *fTagCutSumm; //! Tag cut summary map
84 // ESD Tags (optional)
85 Bool_t fUseTags; // Flag to use tags
86 TChain *fChainT; //! File with event tags
87 TTree *fTreeT; //! Tree of tags
88 AliRunTag *fRunTag; //! Pointer to the run tag
89 const AliEventTag *fEventTag; //! Current event tag
91 Bool_t fReadFriends; // Flag for friends reading
92 TString fFriendFileName;// Name of the file containing the frien tree (branch)
93 ClassDef(AliESDInputHandler, 6);