]>
Commit | Line | Data |
---|---|---|
397596ed | 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 AOD input | |
20 | // Author: Andreas Morsch, CERN | |
21 | //------------------------------------------------------------------------- | |
22 | ||
933fd60f | 23 | #include <TTree.h> |
397596ed | 24 | |
25 | #include "AliAODInputHandler.h" | |
26 | #include "AliAODEvent.h" | |
27 | ||
28 | ClassImp(AliAODInputHandler) | |
29 | ||
30 | //______________________________________________________________________________ | |
31 | AliAODInputHandler::AliAODInputHandler() : | |
90e04a88 | 32 | AliInputEventHandler(), |
33 | fEvent(0) | |
397596ed | 34 | { |
35 | // default constructor | |
36 | } | |
37 | ||
38 | //______________________________________________________________________________ | |
39 | AliAODInputHandler::~AliAODInputHandler() | |
40 | { | |
41 | // destructor | |
42 | } | |
43 | ||
44 | //______________________________________________________________________________ | |
45 | AliAODInputHandler::AliAODInputHandler(const char* name, const char* title): | |
0cd61c1d | 46 | AliInputEventHandler(name, title), |
47 | fEvent(0) | |
397596ed | 48 | { |
49 | } | |
50 | ||
300d5701 | 51 | Bool_t AliAODInputHandler::Init(TTree* tree, Option_t* /*opt*/) |
397596ed | 52 | { |
300d5701 | 53 | // Initialisation necessary for each new tree |
54 | fTree = tree; | |
55 | if (!fTree) return kFALSE; | |
397596ed | 56 | // Get pointer to AOD event |
300d5701 | 57 | if (fEvent) { |
58 | delete fEvent; | |
59 | fEvent = 0; | |
60 | } | |
397596ed | 61 | fEvent = new AliAODEvent(); |
300d5701 | 62 | |
933fd60f | 63 | fEvent->ReadFromTree(fTree); |
397596ed | 64 | return kTRUE; |
65 | } | |
66 |