]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDInputHandler.h
Do not load the Trigger every time
[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
21 class AliESDInputHandler : public AliInputEventHandler {
22
23  public:
24     AliESDInputHandler();
25     AliESDInputHandler(const char* name, const char* title);
26     virtual ~AliESDInputHandler();
27     virtual Bool_t       Init(Option_t* /*opt*/) {return kTRUE;}
28     virtual Bool_t       Init(TTree* tree, Option_t* opt);
29     virtual Bool_t       BeginEvent(Long64_t entry);
30     virtual Bool_t       Notify() { return AliVEventHandler::Notify(); };
31     virtual Bool_t       Notify(const char* path);
32     virtual Bool_t       FinishEvent();
33     AliESDEvent         *GetEvent()        const {return fEvent;}
34     Option_t            *GetAnalysisType() const {return fAnalysisType;}
35     Option_t            *GetDataType() const;
36     // Tag cut summary analysis
37     Int_t                GetNEventAcceptedInFile();
38     Int_t                GetNEventRejectedInFile();
39     Bool_t               GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected);
40     Int_t                GetNFilesEmpty();
41     // HLT analysis
42     AliESDfriend        *GetESDfriend()    const {return fFriend;}
43     AliESDEvent         *GetHLTEvent()     const {return fHLTEvent;}
44     TTree               *GetHLTTree()      const {return fHLTTree;}    
45     void                SetReadHLT()             {fUseHLT = kTRUE;}
46     // Tag analysis
47     void SetReadTags() {fUseTags = kTRUE;}
48     AliRunTag           *GetRunTag() const {return fRunTag;}
49             
50  private:
51     AliESDInputHandler(const AliESDInputHandler& handler);             
52     AliESDInputHandler& operator=(const AliESDInputHandler& handler);  
53  protected:
54     // ESD event
55     AliESDEvent    *fEvent;        //! Pointer to the event
56     AliESDfriend   *fFriend;       //! Pointer to the esd friend
57     Option_t       *fAnalysisType; //! local, proof, grid
58     Int_t           fNEvents;      //! Number of events in the current tree
59     // HLT event
60     AliESDEvent    *fHLTEvent;     //! Pointer to the HLT Event (if present)
61     TTree          *fHLTTree;      //! Pointer to the HLT Event (if present)
62     Bool_t          fUseHLT;       //  Flag to access HLT Events
63     // ESD Tag Cut Summary
64     TMap           *fTagCutSumm;   //! Tag cut summary map
65     // ESD Tags (optional)
66     Bool_t          fUseTags;    //  Flag to use tags
67     TChain         *fChainT;     //! File with event tags
68     TTree          *fTreeT;      //! Tree of tags
69     AliRunTag      *fRunTag;     //! Pointer to the run tag
70     ClassDef(AliESDInputHandler, 4);
71 };
72
73 #endif