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"
23 class AliESDInputHandler : public AliInputEventHandler {
27 AliESDInputHandler(const char* name, const char* title);
28 virtual ~AliESDInputHandler();
29 virtual Bool_t Init(Option_t* /*opt*/) {return kTRUE;}
30 virtual Bool_t Init(TTree* tree, Option_t* opt);
31 virtual Bool_t BeginEvent(Long64_t entry);
32 virtual Bool_t Notify() { return AliVEventHandler::Notify(); };
33 virtual Bool_t Notify(const char* path);
34 virtual Bool_t FinishEvent();
35 AliESDEvent *GetEvent() const {return fEvent;}
36 Option_t *GetAnalysisType() const {return fAnalysisType;}
37 Option_t *GetDataType() const;
38 // Tag cut summary analysis
39 Int_t GetNEventAcceptedInFile();
40 Int_t GetNEventRejectedInFile();
41 Bool_t GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected);
42 Int_t GetNFilesEmpty();
44 AliESDEvent *GetHLTEvent() const {return fHLTEvent;}
45 TTree *GetHLTTree() const {return fHLTTree;}
46 void SetReadHLT() {fUseHLT = kTRUE;}
48 AliESDfriend *GetESDfriend() const {return fFriend;}
49 AliESDpid *GetESDpid() const {return fESDpid;}
50 void SetESDpid(AliESDpid* pid) {fESDpid = pid;}
51 void SetReadFriends(Bool_t flag) {fReadFriends = flag;}
52 void SetFriendFileName(const char *fname) {fFriendFileName = fname;}
54 void SetReadTags() {fUseTags = kTRUE;}
55 AliRunTag *GetRunTag() const {return fRunTag;}
58 AliESDInputHandler(const AliESDInputHandler& handler);
59 AliESDInputHandler& operator=(const AliESDInputHandler& handler);
62 AliESDEvent *fEvent; //! Pointer to the event
63 AliESDfriend *fFriend; //! Pointer to the esd friend
64 AliESDpid *fESDpid; //! Pointer to PID information
65 Option_t *fAnalysisType; //! local, proof, grid
66 Int_t fNEvents; //! Number of events in the current tree
68 AliESDEvent *fHLTEvent; //! Pointer to the HLT Event (if present)
69 TTree *fHLTTree; //! Pointer to the HLT Event (if present)
70 Bool_t fUseHLT; // Flag to access HLT Events
71 // ESD Tag Cut Summary
72 TMap *fTagCutSumm; //! Tag cut summary map
73 // ESD Tags (optional)
74 Bool_t fUseTags; // Flag to use tags
75 TChain *fChainT; //! File with event tags
76 TTree *fTreeT; //! Tree of tags
77 AliRunTag *fRunTag; //! Pointer to the run tag
79 Bool_t fReadFriends; // Flag for friends reading
80 TString fFriendFileName;// Name of the file containing the frien tree (branch)
83 ClassDef(AliESDInputHandler, 6);