]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDInputHandler.h
Adding directory with the production requests
[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
19
20 class AliESDInputHandler : public AliInputEventHandler {
21
22  public:
23     AliESDInputHandler();
24     AliESDInputHandler(const char* name, const char* title);
25     virtual ~AliESDInputHandler();
26     virtual Bool_t       Init(Option_t* /*opt*/) {return kTRUE;}
27     virtual Bool_t       Init(TTree* tree, Option_t* opt);
28     virtual Bool_t       BeginEvent(Long64_t entry);
29     virtual Bool_t       Notify() { return AliVEventHandler::Notify(); };
30     virtual Bool_t       Notify(const char* path);
31     virtual Bool_t       FinishEvent();
32     AliESDEvent         *GetEvent()        const {return fEvent;}
33     Option_t            *GetAnalysisType() const {return fAnalysisType;}
34     //
35     void SetInactiveBranches(const char* branches) {fBranches   = branches;}
36     void SetActiveBranches  (const char* branches) {fBranchesOn = branches;}
37     // Tag analysis
38     void SetReadTags() {fUseTags = kTRUE;}
39     AliRunTag           *GetRunTag() const {return fRunTag;}
40             
41  private:
42     void SwitchOffBranches() const;
43     void SwitchOnBranches()  const;
44     AliESDInputHandler(const AliESDInputHandler& handler);             
45     AliESDInputHandler& operator=(const AliESDInputHandler& handler);  
46  protected:
47     // ESD event
48     AliESDEvent    *fEvent;        //! Pointer to the event
49     TString         fBranches;     //  List of branches to be switched off (separated by space)
50     TString         fBranchesOn;   //  List of branches to be switched on  (separated by space)
51     Option_t       *fAnalysisType; //! local, proof, grid
52     Int_t           fNEvents;      //! Number of events in the current tree 
53     
54     // ESD Tags (optional)
55     Bool_t          fUseTags;    //  Flag to use tags
56     TChain         *fChainT;     //! File with event tags
57     TTree          *fTreeT;      //! Tree of tags
58     AliRunTag      *fRunTag;     //! Pointer to the run tag
59     ClassDef(AliESDInputHandler, 3);
60 };
61
62 #endif