]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliCopyHeaderTask.h
Fixed memory leak
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliCopyHeaderTask.h
1 #ifndef ALICOPYHEADERTASK_H
2 #define ALICOPYHEADERTASK_H
3 /**
4  * @file   AliCopyHeaderTask.h
5  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
6  * @date   Tue Jul 12 10:56:38 2011
7  * 
8  * @brief  A task to copy the ESD header to AOD
9  * 
10  * @ingroup pwglf_forward_tasks 
11  */
12 #include <AliAnalysisTaskSE.h>
13 class AliESDVertex;
14
15 /**
16  * Task to copy header from ESD to AOD 
17  * 
18  * @ingroup pwglf_forward_scripts_tasks
19  * @ingroup pwglf_forward_aod
20  */
21 class AliCopyHeaderTask : public AliAnalysisTaskSE
22 {
23 public:
24   /** 
25    * Constructor
26    * 
27    * @param name Name
28    */
29   AliCopyHeaderTask(const char* name="header") 
30     : AliAnalysisTaskSE(name)
31   {
32     fBranchNames = "ESD:AliESDHeader.,AliESDRun.";
33   }
34   /** 
35    * Copy constructor 
36    * 
37    * @param other Object to copy from 
38    */
39   AliCopyHeaderTask(const AliCopyHeaderTask& other) 
40     : AliAnalysisTaskSE(other)
41   {}
42   /** 
43    * Destructor
44    */
45   virtual ~AliCopyHeaderTask() {}
46   /** 
47    * Assignmen operator 
48    * 
49    * @param other Object to assing from 
50    * 
51    * @return Reference to this object 
52    */
53   AliCopyHeaderTask& operator=(const AliCopyHeaderTask& other) 
54   {
55     AliAnalysisTaskSE::operator=(other);
56     return *this;
57   }
58   /** 
59    * @{ 
60    * @name Implementation of interface methods
61    */
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);
67   /* @} */
68 protected:
69   /** 
70    * Copy an ESD primary vertex to the AOD 
71    * 
72    * @param aod   Where to copy to
73    * @param vtx   Vertex (if any) to copy to
74    * @param type  Type of vertex 
75    */
76   void CopyVertex(AliAODEvent& aod, const AliESDVertex* vtx, Int_t type); 
77
78   ClassDef(AliCopyHeaderTask,1); // Task to copy header from ESD to AOD
79 };
80
81 #endif
82 /* 
83  * Local Variables:
84  *  mode: C++ 
85  * End:
86  */