1 #ifndef ALICOPYHEADERTASK_H
2 #define ALICOPYHEADERTASK_H
4 * @file AliCopyHeaderTask.h
5 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
6 * @date Tue Jul 12 10:56:38 2011
8 * @brief A task to copy the ESD header to AOD
10 * @ingroup pwglf_forward_tasks
12 #include <AliAnalysisTaskSE.h>
16 * Task to copy header from ESD to AOD
18 * @ingroup pwglf_forward_scripts_tasks
19 * @ingroup pwglf_forward_aod
21 class AliCopyHeaderTask : public AliAnalysisTaskSE
29 AliCopyHeaderTask(const char* name="header")
30 : AliAnalysisTaskSE(name)
32 fBranchNames = "ESD:AliESDHeader.,AliESDRun.";
37 * @param other Object to copy from
39 AliCopyHeaderTask(const AliCopyHeaderTask& other)
40 : AliAnalysisTaskSE(other)
45 virtual ~AliCopyHeaderTask() {}
49 * @param other Object to assing from
51 * @return Reference to this object
53 AliCopyHeaderTask& operator=(const AliCopyHeaderTask& other)
55 AliAnalysisTaskSE::operator=(other);
60 * @name Implementation of interface methods
62 virtual void UserCreateOutputObjects() {}
63 virtual void Init() {}
64 virtual void LocalInit() {Init();}
65 virtual void UserExec(Option_t *option);
66 virtual void Terminate(Option_t *option);
70 * Copy an ESD primary vertex to the AOD
72 * @param aod Where to copy to
73 * @param vtx Vertex (if any) to copy to
74 * @param type Type of vertex
76 void CopyVertex(AliAODEvent& aod, const AliESDVertex* vtx, Int_t type);
78 ClassDef(AliCopyHeaderTask,1); // Task to copy header from ESD to AOD