LCOV - code coverage report
Current view: top level - PHOS/PHOSbase - AliPHOSTrackSegmentMaker.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 29 49 59.2 %
Date: 2016-06-14 17:26:59 Functions: 4 8 50.0 %

          Line data    Source code
       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             : /* $Id$ */
      16             : 
      17             : /* History of cvs commits:
      18             :  *
      19             :  * $Log$
      20             :  * Revision 1.29  2007/08/28 12:55:08  policheh
      21             :  * Loaders removed from the reconstruction code (C.Cheshkov)
      22             :  *
      23             :  * Revision 1.28  2007/08/07 14:12:03  kharlov
      24             :  * Quality assurance added (Yves Schutz)
      25             :  *
      26             :  * Revision 1.27  2006/08/25 16:56:30  kharlov
      27             :  * Compliance with Effective C++
      28             :  *
      29             :  * Revision 1.26  2006/08/25 16:00:53  kharlov
      30             :  * Compliance with Effective C++AliPHOSHit.cxx
      31             :  *
      32             :  * Revision 1.25  2005/05/28 14:19:05  schutz
      33             :  * Compilation warnings fixed by T.P.
      34             :  *
      35             :  */
      36             : 
      37             : //_________________________________________________________________________
      38             : // Algorithm Base class to construct PHOS track segments
      39             : // Associates EMC and PPSD clusters
      40             : // Unfolds the EMC cluster   
      41             : //*-- 
      42             : //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
      43             : 
      44             : 
      45             : // --- ROOT system ---
      46             : #include "TTree.h"
      47             : 
      48             : // --- Standard library ---
      49             : 
      50             : // --- AliRoot header files ---
      51             : #include "AliPHOSTrackSegmentMaker.h"
      52             : #include "AliLog.h"
      53             : 
      54          22 : ClassImp( AliPHOSTrackSegmentMaker) 
      55             : 
      56             : 
      57             : //____________________________________________________________________________
      58             : AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : 
      59           0 :   TObject(),
      60           0 :   fESD(0), 
      61           0 :   fGeom(0),
      62           0 :   fEMCRecPoints(0),
      63           0 :   fCPVRecPoints(0)
      64           0 : {
      65             :  // ctor
      66           0 :   fEMCRecPoints = new TObjArray(100) ;
      67           0 :   fCPVRecPoints = new TObjArray(100) ;
      68           0 : }
      69             : 
      70             : //____________________________________________________________________________
      71             : AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(AliPHOSGeometry *geom):
      72           2 :   TObject(),
      73           2 :   fESD(0), 
      74           2 :   fGeom(geom),
      75           2 :   fEMCRecPoints(0),
      76           2 :   fCPVRecPoints(0)
      77           6 : {
      78             :   // ctor
      79           6 :   fEMCRecPoints = new TObjArray(100) ;
      80           6 :   fCPVRecPoints = new TObjArray(100) ;
      81           2 : }
      82             : 
      83             : //____________________________________________________________________________
      84             : AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const AliPHOSTrackSegmentMaker & tsmaker) :
      85           0 :   TObject(tsmaker),
      86           0 :   fESD(tsmaker.GetESD()), 
      87           0 :   fGeom(tsmaker.fGeom),
      88           0 :   fEMCRecPoints(tsmaker.fEMCRecPoints),
      89           0 :   fCPVRecPoints(tsmaker.fCPVRecPoints)
      90           0 : {
      91             :   //Copy constructor
      92           0 : } 
      93             : 
      94             : //____________________________________________________________________________
      95             : AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker()
      96           4 : {
      97             :   //Remove this from the parental task before destroying
      98           2 :   if (fEMCRecPoints) {
      99           2 :     fEMCRecPoints->Delete();
     100           4 :     delete fEMCRecPoints;
     101             :   }
     102           2 :   if (fCPVRecPoints) {
     103           2 :     fCPVRecPoints->Delete();
     104           4 :     delete fCPVRecPoints;
     105             :   }
     106           2 : }
     107             : 
     108             : //____________________________________________________________________________
     109             : void AliPHOSTrackSegmentMaker::SetInput(TTree *clustersTree)
     110             : {
     111             :   // Read the clusters tree and set addresses to the
     112             :   // arrays with the EMC and CPV clusters
     113             : 
     114          16 :   TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
     115           8 :   if (!emcbranch) { 
     116           0 :     AliError("can't get the branch with the PHOS EMC clusters !");
     117           0 :     return;
     118             :   }
     119           8 :   emcbranch->SetAddress(&fEMCRecPoints);
     120           8 :   fEMCRecPoints->Delete();
     121           8 :   emcbranch->GetEntry(0);
     122             : 
     123           8 :   TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
     124           8 :   if (!cpvbranch) { 
     125           0 :     AliError("can't get the branch with the PHOS CPV clusters !");
     126           0 :     return;
     127             :   }
     128           8 :   cpvbranch->SetAddress(&fCPVRecPoints);
     129           8 :   fCPVRecPoints->Delete();
     130           8 :   cpvbranch->GetEntry(0);
     131          16 : }

Generated by: LCOV version 1.11