]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/AliCopyHeaderTask.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliCopyHeaderTask.h
index 696f955bcf8cba279d59904680167478b6dc96b6..fcf342d07cec94c0f2e7d11d26fc8ba350aaabce 100644 (file)
@@ -10,6 +10,7 @@
  * @ingroup pwglf_forward_tasks 
  */
 #include <AliAnalysisTaskSE.h>
+class AliESDVertex;
 
 /**
  * Task to copy header from ESD to AOD 
 class AliCopyHeaderTask : public AliAnalysisTaskSE
 {
 public:
+  /** 
+   * Constructor
+   * 
+   * @param name Name
+   */
   AliCopyHeaderTask(const char* name="header") 
     : AliAnalysisTaskSE(name)
-  {}
+  {
+    fBranchNames = "ESD:AliESDHeader.,AliESDRun.";
+  }
+  /** 
+   * Copy constructor 
+   * 
+   * @param other Object to copy from 
+   */
   AliCopyHeaderTask(const AliCopyHeaderTask& other) 
     : AliAnalysisTaskSE(other)
   {}
+  /** 
+   * Destructor
+   */
   virtual ~AliCopyHeaderTask() {}
+  /** 
+   * Assignmen operator 
+   * 
+   * @param other Object to assing from 
+   * 
+   * @return Reference to this object 
+   */
   AliCopyHeaderTask& operator=(const AliCopyHeaderTask& other) 
   {
     AliAnalysisTaskSE::operator=(other);
@@ -42,8 +65,17 @@ public:
   virtual void   UserExec(Option_t *option);
   virtual void   Terminate(Option_t *option);
   /* @} */
+protected:
+  /** 
+   * Copy an ESD primary vertex to the AOD 
+   * 
+   * @param aod   Where to copy to
+   * @param vtx   Vertex (if any) to copy to
+   * @param type  Type of vertex 
+   */
+  void CopyVertex(AliAODEvent& aod, const AliESDVertex* vtx, Int_t type); 
 
-  ClassDef(AliCopyHeaderTask,1);
+  ClassDef(AliCopyHeaderTask,1); // Task to copy header from ESD to AOD
 };
 
 #endif