1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
18 /////////////////////////////////////////////////////////////////////////
22 ////////////////////////////////////////////////////////////////////////
27 #include "AliAnalysisTaskFilter.h"
28 #include "AliAnalysisTaskCopyESD.h"
29 #include "AliESDEvent.h"
31 #include "AliESDfriend.h"
33 ClassImp(AliAnalysisTaskCopyESD)
35 ////////////////////////////////////////////////////////////////////////
37 AliAnalysisTaskCopyESD::AliAnalysisTaskCopyESD():
38 AliAnalysisTaskFilter(),
42 // Default constructor
43 //DefineInput(0, TChain::Class());
44 // Output slot #0 writes into a TTree
45 //DefineOutput(0,TTree::Class()); //My private output
47 //-------------------------------------------------------------------------------
48 AliAnalysisTaskCopyESD::AliAnalysisTaskCopyESD(const char* name):
49 AliAnalysisTaskFilter(name),
56 //-------------------------------------------------------------------------------
57 void AliAnalysisTaskCopyESD::UserCreateOutputObjects()
59 // Create the output container
60 AliInfo("In UserCreateOuptputObject");
63 //-------------------------------------------------------------------------------
64 void AliAnalysisTaskCopyESD::Init()
67 if (fDebug > 1) AliInfo("Init() \n");
71 //-------------------------------------------------------------------------------
72 void AliAnalysisTaskCopyESD::UserExec(Option_t */*option*/)
74 // Execute analysis for current event
77 AliInfo("Copying event");
78 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(InputEvent());
79 fESDEvent = ESDEvent(); // get the output ESD
80 fESDfriend = ESDfriend(); // get the output friend
81 esd->Copy(*fESDEvent);
83 // releasing tracks to avoid copying them
84 // for (Int_t i = 0; i<fESDEvent->GetNumberOfTracks(); i++){
85 // fESDEvent->GetTrack(i)->ReleaseESDfriendTrack();
90 //-------------------------------------------------------------------------------
91 void AliAnalysisTaskCopyESD::Terminate(Option_t */*option*/)
95 if (fDebug > 1) printf("AnalysisCopyESD: Terminate() \n");