1 /**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-------------------------------------------------------------------------
17 // Event handler for reconstruction
18 // Author: Andrei Gheata, CERN
19 //-------------------------------------------------------------------------
21 #include "AliHLTTestInputHandler.h"
23 #include "AliVEvent.h"
24 #include "TObjArray.h"
25 #include "AliAnalysisTask.h"
27 ClassImp(AliHLTTestInputHandler)
29 //______________________________________________________________________________
30 AliHLTTestInputHandler::AliHLTTestInputHandler()
35 // default constructor
38 //______________________________________________________________________________
39 AliHLTTestInputHandler::AliHLTTestInputHandler(const char* name, const char* title)
40 : AliVEventHandler(name,title)
47 //______________________________________________________________________________
48 AliHLTTestInputHandler::AliHLTTestInputHandler(AliHLTTestInputHandler& that)
49 : AliVEventHandler(that)
51 , fFriendEvent(that.fFriendEvent)
53 // dummy cpy constructor
56 //______________________________________________________________________________
57 Bool_t AliHLTTestInputHandler::Init(TTree* /*tree*/, Option_t* /*opt*/)
59 // Initialisation necessary for each new tree. In reco case this is once.
60 Printf("----> AliHLTTestInputHandler::Init");
61 Printf("<---- AliHLTTestInputHandler::Init");
65 //______________________________________________________________________________
66 Bool_t AliHLTTestInputHandler::BeginEvent(Long64_t)
68 // Called at the beginning of every event
70 Printf("----> HLTTestInputHandler: BeginEvent: now fEvent is %p", fEvent);
72 Printf("----> HLTTestInputHandler: at the end of BeginEvent: now fEvent is %p", fEvent);
76 //______________________________________________________________________________
77 Bool_t AliHLTTestInputHandler::InitTaskInputData(AliVEvent* esdEvent, AliVfriendEvent* friendEvent, TObjArray* arrTasks) {
79 // Method to propagte to all the connected tasks the HLT event.
80 // The method gets the list of tasks from the manager
82 Printf("----> AliHLTTestInputHandler::InitTaskInpuData: Setting the event...");
84 SetVFriendEvent(friendEvent);
85 // set transient pointer to event inside tracks
86 fEvent->ConnectTracks();
87 Printf("----> AliHLTTestInputHandler::InitTaskInpuData: ...Event set: fEvent = %p; friend = %p", fEvent, friendEvent);
88 for (Int_t i = 0; i < arrTasks->GetEntries(); i++){
89 AliAnalysisTask* t = (AliAnalysisTask*)(arrTasks->At(i));
90 t->ConnectInputData("");