]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliInputEventHandler.cxx
Avoid change of wd in Notify()
[u/mrichter/AliRoot.git] / STEER / AliInputEventHandler.cxx
CommitLineData
76147823 1/**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18//-------------------------------------------------------------------------
19// Event handler for event input
20// Author: Andreas Morsch, CERN
21//-------------------------------------------------------------------------
22
76147823 23
24#include "AliInputEventHandler.h"
25#include "AliVEvent.h"
f16ba708 26#include "AliLog.h"
76147823 27
28ClassImp(AliInputEventHandler)
29
30//______________________________________________________________________________
31AliInputEventHandler::AliInputEventHandler() :
13054f41 32 AliVEventHandler(),
f16ba708 33 fTree(0),
34 fBranches(""),
f0ee78b0 35 fBranchesOn(""),
36 fNewEvent(kTRUE)
76147823 37{
38 // default constructor
39}
40
41//______________________________________________________________________________
42AliInputEventHandler::~AliInputEventHandler()
43{
44// destructor
45}
46
47//______________________________________________________________________________
48AliInputEventHandler::AliInputEventHandler(const char* name, const char* title):
0cd61c1d 49 AliVEventHandler(name, title),
f16ba708 50 fTree(0),
51 fBranches(""),
f0ee78b0 52 fBranchesOn(""),
53 fNewEvent(kTRUE)
76147823 54{
55}
56
f16ba708 57void AliInputEventHandler::SwitchOffBranches() const {
58 //
59 // Switch of branches on user request
60 TObjArray * tokens = fBranches.Tokenize(" ");
61 Int_t ntok = tokens->GetEntries();
62 for (Int_t i = 0; i < ntok; i++) {
63 TString str = ((TObjString*) tokens->At(i))->GetString();
64 if (str.Length() == 0)
65 continue;
66 fTree->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 0);
67 AliInfo(Form("Branch %s switched off \n", str.Data()));
68 }
69}
70
71void AliInputEventHandler::SwitchOnBranches() const {
72 //
73 // Switch of branches on user request
74 TObjArray * tokens = fBranchesOn.Tokenize(" ");
75 Int_t ntok = tokens->GetEntries();
76
77 for (Int_t i = 0; i < ntok; i++) {
78 TString str = ((TObjString*) tokens->At(i))->GetString();
79 if (str.Length() == 0)
80 continue;
81 fTree->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 1);
82 AliInfo(Form("Branch %s switched on \n", str.Data()));
83 }
84}
f0ee78b0 85
86
87
88Long64_t AliInputEventHandler::GetReadEntry() const
89{return fTree->GetReadEntry();}