]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/AliAnalysisTaskCopyESD.cxx
Coding rule violation corrected.
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskCopyESD.cxx
CommitLineData
6d3a7bbf 1/**************************************************************************
2* Copyright(c) 1998-1999, 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//
20// Task to Copy ESDs
21//
22////////////////////////////////////////////////////////////////////////
23
24
25#include <TTree.h>
26
27#include "AliAnalysisTaskFilter.h"
28#include "AliAnalysisTaskCopyESD.h"
29#include "AliESDEvent.h"
30#include "AliLog.h"
31#include "AliESDfriend.h"
32
33ClassImp(AliAnalysisTaskCopyESD)
34
35////////////////////////////////////////////////////////////////////////
36
37AliAnalysisTaskCopyESD::AliAnalysisTaskCopyESD():
38 AliAnalysisTaskFilter(),
39 fESDEvent(0x0),
40 fESDfriend(0x0)
41{
42 // Default constructor
43 //DefineInput(0, TChain::Class());
44 // Output slot #0 writes into a TTree
45 //DefineOutput(0,TTree::Class()); //My private output
46}
47//-------------------------------------------------------------------------------
48AliAnalysisTaskCopyESD::AliAnalysisTaskCopyESD(const char* name):
49 AliAnalysisTaskFilter(name),
50 fESDEvent(0x0),
51 fESDfriend(0x0)
52{
53 // Constructor
54}
55
56//-------------------------------------------------------------------------------
57void AliAnalysisTaskCopyESD::UserCreateOutputObjects()
58{
59 // Create the output container
60 AliInfo("In UserCreateOuptputObject");
61}
62
63//-------------------------------------------------------------------------------
64void AliAnalysisTaskCopyESD::Init()
65{
66 // Initialization
67 if (fDebug > 1) AliInfo("Init() \n");
68}
69
70
71//-------------------------------------------------------------------------------
72void AliAnalysisTaskCopyESD::UserExec(Option_t */*option*/)
73{
74 // Execute analysis for current event
75 //
76
6d3a7bbf 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);
82
83 // releasing tracks to avoid copying them
84 // for (Int_t i = 0; i<fESDEvent->GetNumberOfTracks(); i++){
85 // fESDEvent->GetTrack(i)->ReleaseESDfriendTrack();
86 //}
87}
88
89
90//-------------------------------------------------------------------------------
91void AliAnalysisTaskCopyESD::Terminate(Option_t */*option*/)
92{
93 // Terminate analysis
94 //
95 if (fDebug > 1) printf("AnalysisCopyESD: Terminate() \n");
96}
97