X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=STEER%2FAliInputEventHandler.h;h=65735cc726e86fefd1f6fdd83a72b9fe31576864;hb=e5be5f205211bfea286840cea457f6db7ba3ef57;hp=e0733d7b51c37218518346d957476e93ede2f61d;hpb=933fd60fd2396a634eed33cec40be157b792f427;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliInputEventHandler.h b/STEER/AliInputEventHandler.h index e0733d7b51c..65735cc726e 100644 --- a/STEER/AliInputEventHandler.h +++ b/STEER/AliInputEventHandler.h @@ -11,9 +11,13 @@ //------------------------------------------------------------------------- #include "AliVEventHandler.h" +#include + -class TChain; class AliVEvent; +class AliVCuts; +class AliRunTag; + class AliInputEventHandler : public AliVEventHandler { @@ -21,23 +25,47 @@ class AliInputEventHandler : public AliVEventHandler { AliInputEventHandler(); AliInputEventHandler(const char* name, const char* title); virtual ~AliInputEventHandler(); - virtual void SetOutputFileName(char* /*fname*/) {;} - virtual char *GetOutputFileName() {return 0;} - virtual Bool_t InitIO(Option_t* /*opt*/) {return kTRUE;} - virtual Bool_t BeginEvent() {return kTRUE;} - virtual Bool_t Notify(const char */*path*/) {return kTRUE;} - virtual Bool_t FinishEvent() {return kTRUE;} - virtual Bool_t Terminate() {return kTRUE;} - virtual Bool_t TerminateIO() {return kTRUE;} + virtual void SetOutputFileName(const char* /*fname*/) {;} + virtual const char *GetOutputFileName() {return 0;} + virtual Bool_t Init(Option_t* /*opt*/) {return kTRUE;} + virtual Bool_t Init(TTree* /*tree*/, Option_t* /*opt*/) {return kTRUE;} + virtual Bool_t BeginEvent(Long64_t /*entry*/) {return kTRUE;} + virtual Bool_t Notify() { return AliVEventHandler::Notify();} + virtual Bool_t Notify(const char */*path*/) {return kTRUE;} + virtual Bool_t FinishEvent() {return kTRUE;} + virtual Bool_t Terminate() {return kTRUE;} + virtual Bool_t TerminateIO() {return kTRUE;} // Setters - virtual void SetInputTree(TTree* tree) {fTree = tree;} - // Getters - virtual AliVEvent *GetEvent() const {return fEvent;} - virtual TTree *GetChain() const {return fTree;} + virtual void SetInputTree(TTree* tree) {fTree = tree;} + virtual void SetEventSelection(AliVCuts* cuts) {fEventCuts = cuts;} + // + void SetInactiveBranches(const char* branches) {fBranches = branches;} + void SetActiveBranches (const char* branches) {fBranchesOn = branches;} + // Getters + virtual AliVEvent *GetEvent() const {return 0;} + virtual AliRunTag *GetRunTag() const {return 0;} + virtual Option_t *GetAnalysisType() const {return 0;} + virtual TTree *GetTree( ) const {return fTree;} + virtual AliVCuts *GetEventSelection() const {return fEventCuts;} + virtual Long64_t GetReadEntry() const; + virtual Bool_t NewEvent() + {Bool_t ne = fNewEvent; fNewEvent = kFALSE; return ne;} + virtual Bool_t IsEventSelected() + {return fIsSelected;} + protected: + void SwitchOffBranches() const; + void SwitchOnBranches() const; + private: + AliInputEventHandler(const AliInputEventHandler& handler); + AliInputEventHandler& operator=(const AliInputEventHandler& handler); protected: - AliVEvent *fEvent; //! Pointer to the event - TTree *fTree; //! Pointer to the tree - ClassDef(AliInputEventHandler, 1); + TTree *fTree; //! Pointer to the tree + TString fBranches; // List of branches to be switched off (separated by space) + TString fBranchesOn; // List of branches to be switched on (separated by space) + Bool_t fNewEvent; // New event flag + AliVCuts* fEventCuts; // Cuts on the event level + Bool_t fIsSelected; // Selection result + ClassDef(AliInputEventHandler, 3); }; #endif