ROOT logo
/**************************************************************************
 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

//-------------------------------------------------------------------------
//     Event handler for reconstruction
//     Author: Andrei Gheata, CERN
//-------------------------------------------------------------------------

#include "AliHLTTestInputHandler.h"
#include "AliVCuts.h"
#include "AliVEvent.h"
#include "TObjArray.h"
#include "AliAnalysisTask.h"

ClassImp(AliHLTTestInputHandler)

//______________________________________________________________________________
AliHLTTestInputHandler::AliHLTTestInputHandler() 
  : AliVEventHandler()
  , fEvent(NULL)
  , fFriendEvent(NULL)
{
// default constructor
}

//______________________________________________________________________________
AliHLTTestInputHandler::AliHLTTestInputHandler(const char* name, const char* title) 
  : AliVEventHandler(name,title)
  , fEvent(NULL)
  , fFriendEvent(NULL)
{
// Named constructor
}

//______________________________________________________________________________
AliHLTTestInputHandler::AliHLTTestInputHandler(AliHLTTestInputHandler& that) 
  : AliVEventHandler(that)
  , fEvent(that.fEvent)
  , fFriendEvent(that.fFriendEvent)
{
// dummy cpy constructor
}

//______________________________________________________________________________
Bool_t AliHLTTestInputHandler::Init(TTree* /*tree*/,  Option_t* /*opt*/)
{
// Initialisation necessary for each new tree. In reco case this is once.
  Printf("----> AliHLTTestInputHandler::Init"); 
  Printf("<---- AliHLTTestInputHandler::Init"); 

   return kTRUE;
}  
//______________________________________________________________________________
Bool_t AliHLTTestInputHandler::BeginEvent(Long64_t)
{
// Called at the beginning of every event   

  Printf("----> HLTTestInputHandler: BeginEvent: now fEvent is %p", fEvent);

  Printf("----> HLTTestInputHandler: at the end of BeginEvent: now fEvent is %p", fEvent);
  return kTRUE;
}     

//______________________________________________________________________________
Bool_t AliHLTTestInputHandler::InitTaskInputData(AliVEvent* esdEvent, AliVfriendEvent* friendEvent, TObjArray* arrTasks) {

// Method to propagte to all the connected tasks the HLT event.
// The method gets the list of tasks from the manager

  Printf("----> AliHLTTestInputHandler::InitTaskInpuData: Setting the event...");
  SetEvent(esdEvent);
  SetVFriendEvent(friendEvent);
  // set transient pointer to event inside tracks
  fEvent->ConnectTracks();
  Printf("----> AliHLTTestInputHandler::InitTaskInpuData: ...Event set: fEvent = %p; friend = %p", fEvent, friendEvent);
  for (Int_t i = 0; i < arrTasks->GetEntries(); i++){
    AliAnalysisTask* t = (AliAnalysisTask*)(arrTasks->At(i));
    t->ConnectInputData("");
  }
  return kTRUE;
}
 AliHLTTestInputHandler.cxx:1
 AliHLTTestInputHandler.cxx:2
 AliHLTTestInputHandler.cxx:3
 AliHLTTestInputHandler.cxx:4
 AliHLTTestInputHandler.cxx:5
 AliHLTTestInputHandler.cxx:6
 AliHLTTestInputHandler.cxx:7
 AliHLTTestInputHandler.cxx:8
 AliHLTTestInputHandler.cxx:9
 AliHLTTestInputHandler.cxx:10
 AliHLTTestInputHandler.cxx:11
 AliHLTTestInputHandler.cxx:12
 AliHLTTestInputHandler.cxx:13
 AliHLTTestInputHandler.cxx:14
 AliHLTTestInputHandler.cxx:15
 AliHLTTestInputHandler.cxx:16
 AliHLTTestInputHandler.cxx:17
 AliHLTTestInputHandler.cxx:18
 AliHLTTestInputHandler.cxx:19
 AliHLTTestInputHandler.cxx:20
 AliHLTTestInputHandler.cxx:21
 AliHLTTestInputHandler.cxx:22
 AliHLTTestInputHandler.cxx:23
 AliHLTTestInputHandler.cxx:24
 AliHLTTestInputHandler.cxx:25
 AliHLTTestInputHandler.cxx:26
 AliHLTTestInputHandler.cxx:27
 AliHLTTestInputHandler.cxx:28
 AliHLTTestInputHandler.cxx:29
 AliHLTTestInputHandler.cxx:30
 AliHLTTestInputHandler.cxx:31
 AliHLTTestInputHandler.cxx:32
 AliHLTTestInputHandler.cxx:33
 AliHLTTestInputHandler.cxx:34
 AliHLTTestInputHandler.cxx:35
 AliHLTTestInputHandler.cxx:36
 AliHLTTestInputHandler.cxx:37
 AliHLTTestInputHandler.cxx:38
 AliHLTTestInputHandler.cxx:39
 AliHLTTestInputHandler.cxx:40
 AliHLTTestInputHandler.cxx:41
 AliHLTTestInputHandler.cxx:42
 AliHLTTestInputHandler.cxx:43
 AliHLTTestInputHandler.cxx:44
 AliHLTTestInputHandler.cxx:45
 AliHLTTestInputHandler.cxx:46
 AliHLTTestInputHandler.cxx:47
 AliHLTTestInputHandler.cxx:48
 AliHLTTestInputHandler.cxx:49
 AliHLTTestInputHandler.cxx:50
 AliHLTTestInputHandler.cxx:51
 AliHLTTestInputHandler.cxx:52
 AliHLTTestInputHandler.cxx:53
 AliHLTTestInputHandler.cxx:54
 AliHLTTestInputHandler.cxx:55
 AliHLTTestInputHandler.cxx:56
 AliHLTTestInputHandler.cxx:57
 AliHLTTestInputHandler.cxx:58
 AliHLTTestInputHandler.cxx:59
 AliHLTTestInputHandler.cxx:60
 AliHLTTestInputHandler.cxx:61
 AliHLTTestInputHandler.cxx:62
 AliHLTTestInputHandler.cxx:63
 AliHLTTestInputHandler.cxx:64
 AliHLTTestInputHandler.cxx:65
 AliHLTTestInputHandler.cxx:66
 AliHLTTestInputHandler.cxx:67
 AliHLTTestInputHandler.cxx:68
 AliHLTTestInputHandler.cxx:69
 AliHLTTestInputHandler.cxx:70
 AliHLTTestInputHandler.cxx:71
 AliHLTTestInputHandler.cxx:72
 AliHLTTestInputHandler.cxx:73
 AliHLTTestInputHandler.cxx:74
 AliHLTTestInputHandler.cxx:75
 AliHLTTestInputHandler.cxx:76
 AliHLTTestInputHandler.cxx:77
 AliHLTTestInputHandler.cxx:78
 AliHLTTestInputHandler.cxx:79
 AliHLTTestInputHandler.cxx:80
 AliHLTTestInputHandler.cxx:81
 AliHLTTestInputHandler.cxx:82
 AliHLTTestInputHandler.cxx:83
 AliHLTTestInputHandler.cxx:84
 AliHLTTestInputHandler.cxx:85
 AliHLTTestInputHandler.cxx:86
 AliHLTTestInputHandler.cxx:87
 AliHLTTestInputHandler.cxx:88
 AliHLTTestInputHandler.cxx:89
 AliHLTTestInputHandler.cxx:90
 AliHLTTestInputHandler.cxx:91
 AliHLTTestInputHandler.cxx:92
 AliHLTTestInputHandler.cxx:93