]>
Commit | Line | Data |
---|---|---|
b9f1d917 | 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 | //------------------------------------------------------------------------- | |
17 | // Event handler for reconstruction | |
18 | // Author: Andrei Gheata, CERN | |
19 | //------------------------------------------------------------------------- | |
20 | ||
21 | #include "AliHLTTestInputHandler.h" | |
22 | #include "AliVCuts.h" | |
afdb0e0d | 23 | #include "AliVEvent.h" |
24 | #include "TObjArray.h" | |
25 | #include "AliAnalysisTask.h" | |
b9f1d917 | 26 | |
27 | ClassImp(AliHLTTestInputHandler) | |
28 | ||
29 | //______________________________________________________________________________ | |
30 | AliHLTTestInputHandler::AliHLTTestInputHandler(const char* name, const char* title) | |
afdb0e0d | 31 | : AliVEventHandler(name,title) |
b9f1d917 | 32 | { |
33 | // Named constructor | |
34 | } | |
35 | ||
36 | //______________________________________________________________________________ | |
a453390d | 37 | Bool_t AliHLTTestInputHandler::Init(TTree* /*tree*/, Option_t* /*opt*/) |
b9f1d917 | 38 | { |
39 | // Initialisation necessary for each new tree. In reco case this is once. | |
afdb0e0d | 40 | Printf("----> AliHLTTestInputHandler::Init"); |
41 | Printf("<---- AliHLTTestInputHandler::Init"); | |
42 | ||
b9f1d917 | 43 | return kTRUE; |
44 | } | |
45 | //______________________________________________________________________________ | |
46 | Bool_t AliHLTTestInputHandler::BeginEvent(Long64_t) | |
47 | { | |
48 | // Called at the beginning of every event | |
afdb0e0d | 49 | |
50 | Printf("----> HLTTestInputHandler: BeginEvent: now fEvent is %p", fEvent); | |
51 | ||
52 | Printf("----> HLTTestInputHandler: at the end of BeginEvent: now fEvent is %p", fEvent); | |
b9f1d917 | 53 | return kTRUE; |
54 | } | |
afdb0e0d | 55 | |
56 | //______________________________________________________________________________ | |
a453390d | 57 | Bool_t AliHLTTestInputHandler::InitTaskInputData(AliVVevent* esdEvent, AliVVfriendEvent* friendEvent, TObjArray* arrTasks) { |
afdb0e0d | 58 | |
59 | // Method to propagte to all the connected tasks the HLT event. | |
60 | // The method gets the list of tasks from the manager | |
61 | ||
62 | Printf("----> AliHLTTestInputHandler::InitTaskInpuData: Setting the event..."); | |
a453390d | 63 | SetVVEvent(esdEvent); |
64 | SetVVFriendEvent(friendEvent); | |
afdb0e0d | 65 | // set transient pointer to event inside tracks |
66 | fEvent->ConnectTracks(); | |
67 | Printf("----> AliHLTTestInputHandler::InitTaskInpuData: ...Event set"); | |
68 | for (Int_t i = 0; i < arrTasks->GetEntries(); i++){ | |
69 | AliAnalysisTask* t = (AliAnalysisTask*)(arrTasks->At(i)); | |
70 | t->ConnectInputData(""); | |
71 | } | |
72 | return kTRUE; | |
73 | } |