AliRoot Core  edcc906 (edcc906)
AliESDInputHandler.h
Go to the documentation of this file.
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 */
5 
6 /* $Id$ */
7 
8 //-------------------------------------------------------------------------
9 // ESD Input Handler realisation of the AliVEventHandler interface
10 // Author: Andreas Morsch, CERN
11 //-------------------------------------------------------------------------
12 
13 #include "AliInputEventHandler.h"
14 #include "AliESDEvent.h"
15 class TChain;
16 class TTree;
17 class AliRunTag;
18 class AliEventTag;
19 class TMap;
20 class AliESDfriend;
21 class AliESDpid;
22 class AliESDEvent;
23 class AliPIDResponse;
24 
25 
27 
28  public:
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  AliVEvent *GetEvent() const {return (AliVEvent*)fEvent;}
40  Option_t *GetAnalysisType() const {return fAnalysisType;}
41  Option_t *GetDataType() const;
42  // Tag cut summary analysis
45  Bool_t GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected);
46  Int_t GetNFilesEmpty();
47  // HLT analysis
48  AliESDEvent *GetHLTEvent() const {return fHLTEvent;}
49  TTree *GetHLTTree() const {return fHLTTree;}
50  void SetReadHLT() {Changed(); fUseHLT = kTRUE;}
51  Bool_t GetReadHLT() const {return fUseHLT;}
52  // Friends&Co
53  AliESDfriend *GetESDfriend() const {return fFriend;}
54  void SetReadFriends(Bool_t flag) {Changed(); fReadFriends = flag;}
55  Bool_t GetReadFriends() const {return fReadFriends;}
57  const char *GetFriendFileName() const {return fFriendFileName;}
58  // Tag analysis
59  void SetReadTags() {Changed(); fUseTags = kTRUE;}
60  AliRunTag *GetRunTag() const {return fRunTag;}
61  const AliEventTag *GetEventTag() const {return fEventTag;}
62  // Get the statistics object (currently TH2). Option can be BIN0.
63  virtual TObject *GetStatistics(Option_t *option="") const;
64 
65  //PID response
67  virtual void CreatePIDResponse(Bool_t isMC=kFALSE);
68  AliESDpid *GetESDpid() const {return fESDpid;}
70 
71  //HLT
72  virtual AliVfriendEvent* GetVfriendEvent() const {return fFriend;};
73 
74  private:
75  AliESDInputHandler(const AliESDInputHandler& handler);
77  void ConnectFriends();
78  protected:
79  // ESD event
83  Option_t *fAnalysisType;
84  Int_t fNEvents;
85  // HLT event
87  TTree *fHLTTree;
88  Bool_t fUseHLT; // Flag to access HLT Events
89  // ESD Tag Cut Summary
90  TMap *fTagCutSumm;
91  // ESD Tags (optional)
92  Bool_t fUseTags; // Flag to use tags
93  TChain *fChainT;
94  TTree *fTreeT;
97  // Friends
98  Bool_t fReadFriends; // Flag for friends reading
99  TString fFriendFileName;// Name of the file containing the frien tree (branch)
100  ClassDef(AliESDInputHandler, 6);
101 };
102 
103 #endif
AliESDEvent * fHLTEvent
Number of events in the current tree.
AliTPCcalibPID * pid
Definition: CalibPID.C:69
TTree * fHLTTree
Pointer to the HLT Event (if present)
AliESDInputHandler & operator=(const AliESDInputHandler &handler)
const char * path
virtual Bool_t Init(Option_t *opt)
Option_t * fAnalysisType
Pointer to PID information.
void SetESDpid(AliESDpid *pid)
Option_t * GetAnalysisType() const
const AliEventTag * fEventTag
Pointer to the run tag.
AliESDpid * GetESDpid() const
Bool_t GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected)
TTree * tree
Bool_t fUseTags
Tag cut summary map.
Bool_t GetReadHLT() const
AliESDfriend * GetESDfriend() const
void SetFriendFileName(const char *fname)
virtual AliPIDResponse * GetPIDResponse()
Option_t * GetDataType() const
TTree * fTreeT
File with event tags.
virtual Bool_t BeginEvent(Long64_t entry)
AliRunTag * GetRunTag() const
const AliEventTag * GetEventTag() const
virtual AliVfriendEvent * GetVfriendEvent() const
virtual Bool_t Notify()
virtual Bool_t Init(Option_t *opt)
void SetReadFriends(Bool_t flag)
TTree * GetHLTTree() const
AliRunTag * fRunTag
Tree of tags.
virtual void CreatePIDResponse(Bool_t isMC=kFALSE)
AliESDpid * fESDpid
Pointer to the esd friend.
AliVEvent * GetEvent() const
virtual TObject * GetStatistics(Option_t *option="") const
AliESDfriend * fFriend
Pointer to the event.
Int_t fNEvents
local, proof, grid
AliESDEvent * GetHLTEvent() const
const char * GetFriendFileName() const
char * fname
Bool_t fUseHLT
Pointer to the HLT Event (if present)
Bool_t fReadFriends
Current event tag.
virtual Bool_t FinishEvent()
Bool_t GetReadFriends() const