]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliInputEventHandler.h
fix compilation warning
[u/mrichter/AliRoot.git] / STEER / AliInputEventHandler.h
CommitLineData
76147823 1#ifndef ALIINPUTEVENTHANDLER_H
2#define ALIINPUTEVENTHANDLER_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// Input Handler realisation of the AliVEventHandler interface
10// Author: Andreas Morsch, CERN
11//-------------------------------------------------------------------------
12
13#include "AliVEventHandler.h"
97acfdbe 14#include <TTree.h>
15
76147823 16
76147823 17class AliVEvent;
b2af62ab 18class AliVCuts;
1aa09fd1 19class AliRunTag;
76147823 20
b2af62ab 21
76147823 22class AliInputEventHandler : public AliVEventHandler {
23
24 public:
aaf2d706 25 enum EInputHandlerFlags {
26 kUserCallSelectionMask = BIT(14) // Watch out for defining base class bits
27 };
76147823 28 AliInputEventHandler();
29 AliInputEventHandler(const char* name, const char* title);
30 virtual ~AliInputEventHandler();
0931e76a 31 virtual void SetOutputFileName(const char* /*fname*/) {;}
32 virtual const char *GetOutputFileName() {return 0;}
300d5701 33 virtual Bool_t Init(Option_t* /*opt*/) {return kTRUE;}
87d395bd 34 virtual Bool_t Init(TTree* /*tree*/, Option_t* /*opt*/) {return kTRUE;}
300d5701 35 virtual Bool_t BeginEvent(Long64_t /*entry*/) {return kTRUE;}
7b2a359f 36 virtual Bool_t GetEntry() {return kTRUE;}
f0ee78b0 37 virtual Bool_t Notify() { return AliVEventHandler::Notify();}
300d5701 38 virtual Bool_t Notify(const char */*path*/) {return kTRUE;}
39 virtual Bool_t FinishEvent() {return kTRUE;}
40 virtual Bool_t Terminate() {return kTRUE;}
41 virtual Bool_t TerminateIO() {return kTRUE;}
76147823 42 // Setters
300d5701 43 virtual void SetInputTree(TTree* tree) {fTree = tree;}
b2af62ab 44 virtual void SetEventSelection(AliVCuts* cuts) {fEventCuts = cuts;}
aaf2d706 45 virtual void SetUserCallSelectionMask(Bool_t flag=kTRUE) {TObject::SetBit(kUserCallSelectionMask,flag);}
f16ba708 46 //
47 void SetInactiveBranches(const char* branches) {fBranches = branches;}
48 void SetActiveBranches (const char* branches) {fBranchesOn = branches;}
fedd7a0d 49 // Getters
1aa09fd1 50 virtual AliVEvent *GetEvent() const {return 0;}
51 virtual AliRunTag *GetRunTag() const {return 0;}
52 virtual Option_t *GetAnalysisType() const {return 0;}
53 virtual TTree *GetTree( ) const {return fTree;}
2af85599 54 virtual AliVCuts *GetEventSelection() const {return fEventCuts;}
f0ee78b0 55 virtual Long64_t GetReadEntry() const;
aaf2d706 56 virtual Bool_t IsUserCallSelectionMask() const {return TObject::TestBit(kUserCallSelectionMask);}
f0ee78b0 57 virtual Bool_t NewEvent()
58 {Bool_t ne = fNewEvent; fNewEvent = kFALSE; return ne;}
0c6c629b 59 virtual UInt_t IsEventSelected()
60 {return fIsSelectedResult;}
8ed10396 61 // Mixing
62 void SetMixingHandler(AliInputEventHandler* mixing)
63 {fMixingHandler = mixing;}
64 AliInputEventHandler* MixingHandler()
65 {return fMixingHandler;}
66
f16ba708 67 protected:
68 void SwitchOffBranches() const;
69 void SwitchOnBranches() const;
87d395bd 70 private:
71 AliInputEventHandler(const AliInputEventHandler& handler);
72 AliInputEventHandler& operator=(const AliInputEventHandler& handler);
76147823 73 protected:
f16ba708 74 TTree *fTree; //! Pointer to the tree
75 TString fBranches; // List of branches to be switched off (separated by space)
76 TString fBranchesOn; // List of branches to be switched on (separated by space)
f0ee78b0 77 Bool_t fNewEvent; // New event flag
b2af62ab 78 AliVCuts* fEventCuts; // Cuts on the event level
0c6c629b 79 UInt_t fIsSelectedResult; // Selection result
b890a10d 80 AliInputEventHandler* fMixingHandler; // Optionla plugin for mixing
21679a94 81 ClassDef(AliInputEventHandler, 5);
76147823 82};
83
84#endif