]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSPID.cxx
Corrected copy constructor and assignment operator, fixed memory leaks (Christian)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPID.cxx
index b7958b7d897cf8dc9c849345e1fd4747b7376754..870471a085b5ec8fc79f1ba77b2e711a4d8e766e 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// To identify the type of particle detected in PHOS with or without the help 
-// from other detectors
-//*-- Author : Yves Schutz  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  Algorithm class for the identification of particles detected in PHOS        
+//  base  class  of identified particle  
+//  Why should I put meaningless comments
+//  just to satisfy
+//  the code checker                
+                         
+//                  
+//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko
 
-// --- ROOT system ---
 
+// --- ROOT system ---
 
 // --- Standard library ---
 
-
-
 // --- AliRoot header files ---
-
+#include "AliConfig.h"
 #include "AliPHOSPID.h"
+#include "AliPHOSGetter.h"
+#include "AliPHOSQualAssDataMaker.h" 
 
 ClassImp(AliPHOSPID)
 
 //____________________________________________________________________________
-AliPHOSPID::AliPHOSPID()
+AliPHOSPID::AliPHOSPID():
+  TTask("",""),
+  fEventFolderName(""),
+  fFirstEvent(0),
+  fLastEvent(-1),
+  fESD(0x0), 
+  fQADM(0x0)
+{
+  // ctor
+}
+
+
+//____________________________________________________________________________
+AliPHOSPID::AliPHOSPID(const TString alirunFileName, const TString eventFolderName):
+  TTask("PHOS"+AliConfig::Instance()->GetPIDTaskName(), alirunFileName), 
+  fEventFolderName(eventFolderName),
+  fFirstEvent(0),
+  fLastEvent(-1), 
+  fESD(0x0), 
+  fQADM(0x0)
 {
   // ctor
+  fQADM = new  AliPHOSQualAssDataMaker() ; //!Quality Assurance Data Maker
+  GetQualAssDataMaker()->Init(AliQualAss::kRECPARTICLES) ;    
 }
 
+//____________________________________________________________________________
+AliPHOSPID::AliPHOSPID(const AliPHOSPID & pid) :
+  TTask(pid),fEventFolderName(pid.GetEventFolderName()),
+  fFirstEvent(pid.GetFirstEvent()),fLastEvent(pid.GetLastEvent()), 
+  fESD(pid.fESD), 
+  fQADM(pid.fQADM)
+{
+  // Copy constructor
+}
 //____________________________________________________________________________
 AliPHOSPID::~AliPHOSPID()
 {
   // dtor
+ //Remove this from the parental task before destroying
+  if(AliPHOSGetter::Instance()->PhosLoader())
+    AliPHOSGetter::Instance()->PhosLoader()->CleanPIDTask();
+  delete fQADM ; 
 }
+