]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDInputHandler.h
Next round of fixes (Jochen)
[u/mrichter/AliRoot.git] / STEER / AliESDInputHandler.h
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 TMap;
19 class AliESDfriend;
20 class AliESDpid;
21
22
23 class AliESDInputHandler : public AliInputEventHandler {
24
25  public:
26     AliESDInputHandler();
27     AliESDInputHandler(const char* name, const char* title);
28     virtual ~AliESDInputHandler();
29     virtual Bool_t       Init(Option_t* opt) {return AliInputEventHandler::Notify(opt);}
30     virtual Bool_t       Init(TTree* tree, Option_t* opt);
31     virtual Bool_t       BeginEvent(Long64_t entry);
32     virtual Bool_t       Notify() { return AliInputEventHandler::Notify(); };
33     virtual Bool_t       Notify(const char* path);
34     virtual Bool_t       FinishEvent();
35     void                 CheckSelectionMask();
36     AliESDEvent         *GetEvent()        const {return fEvent;}
37     Option_t            *GetAnalysisType() const {return fAnalysisType;}
38     Option_t            *GetDataType() const;
39     // Tag cut summary analysis
40     Int_t                GetNEventAcceptedInFile();
41     Int_t                GetNEventRejectedInFile();
42     Bool_t               GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected);
43     Int_t                GetNFilesEmpty();
44     // HLT  analysis
45     AliESDEvent         *GetHLTEvent()     const {return fHLTEvent;}
46     TTree               *GetHLTTree()      const {return fHLTTree;}    
47     void                SetReadHLT()             {fUseHLT = kTRUE;}
48     // Friends&Co
49     AliESDfriend        *GetESDfriend()    const {return fFriend;}
50     AliESDpid           *GetESDpid()       const {return fESDpid;}
51     void                 SetESDpid(AliESDpid* pid)     {fESDpid = pid;}
52     void                 SetReadFriends(Bool_t flag)   {fReadFriends = flag;}
53     void                 SetFriendFileName(const char *fname)  {fFriendFileName = fname;}
54     // Tag analysis
55     void SetReadTags() {fUseTags = kTRUE;}
56     AliRunTag           *GetRunTag() const {return fRunTag;}
57     // Get the statistics object (currently TH2). Option can be BIN0.
58     virtual TObject     *GetStatistics(Option_t *option="") const;
59  private:
60     AliESDInputHandler(const AliESDInputHandler& handler);             
61     AliESDInputHandler& operator=(const AliESDInputHandler& handler);  
62  protected:
63     // ESD event
64     AliESDEvent    *fEvent;         //! Pointer to the event
65     AliESDfriend   *fFriend;        //! Pointer to the esd friend
66     AliESDpid      *fESDpid;        //! Pointer to PID information
67     Option_t       *fAnalysisType;  //! local, proof, grid
68     Int_t           fNEvents;       //! Number of events in the current tree
69     // HLT event
70     AliESDEvent    *fHLTEvent;      //! Pointer to the HLT Event (if present)
71     TTree          *fHLTTree;       //! Pointer to the HLT Event (if present)
72     Bool_t          fUseHLT;        //  Flag to access HLT Events
73     // ESD Tag Cut Summary
74     TMap           *fTagCutSumm;    //! Tag cut summary map
75     // ESD Tags (optional)
76     Bool_t          fUseTags;       //  Flag to use tags
77     TChain         *fChainT;        //! File with event tags
78     TTree          *fTreeT;         //! Tree of tags
79     AliRunTag      *fRunTag;        //! Pointer to the run tag
80     // Friends
81     Bool_t          fReadFriends;   //  Flag for friends reading 
82     TString         fFriendFileName;//  Name of the file containing the frien tree (branch)
83     ClassDef(AliESDInputHandler, 6);
84 };
85
86 #endif