]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSDetType.cxx
04e86ce6f206625b5489130ef29afdf573aa32b2
[u/mrichter/AliRoot.git] / ITS / AliITSDetType.cxx
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
16 /*
17  $Log$
18  Revision 1.5  2001/05/31 06:58:38  fca
19  Patch problem with destructor
20
21  Revision 1.4  2001/05/01 14:47:45  nilsen
22  Fixed destructor so that it destroyes the pointers fSegmentation, fResponse,
23  fSimulation, and fReconst if they have been allocated. The two TStrings
24  fDigClassName and fClustClassName shoud be destroyed automaticaly. This should
25  fix a small memory leak associated with digitization and reconstruction.
26
27 */
28
29 #include "AliITSDetType.h"
30 #include "AliITSClusterFinder.h"
31 #include "AliITSsimulation.h"
32
33 ClassImp(AliITSDetType)  
34
35 AliITSDetType::AliITSDetType(){
36     // constructor
37
38     fSegmentation = 0;
39     fResponse     = 0;
40     fSimulation   = 0;
41     fReconst      = 0;
42 }
43 //----------------------------------------------------------------------
44 AliITSDetType::~AliITSDetType(){
45     // destructor
46   /* PH Commented because AliITSDetType is not the owner
47     if(fSegmentation!=0) delete fSegmentation; fSegmentation = 0;
48     //    if(fResponse!=0)     delete fResponse;     fResponse     = 0;
49     if(fSimulation!=0)   delete fSimulation;   fSimulation   = 0;
50     if(fReconst!=0)      delete fReconst;      fReconst      = 0;
51   */
52 }
53 //______________________________________________________________________
54 AliITSDetType::AliITSDetType(const AliITSDetType &source){
55   //     Copy Constructor 
56
57   if(&source == this) return;
58   this->fReconst        = source.fReconst;
59   this->fSimulation     = source.fSimulation;
60   this->fResponse       = source.fResponse;
61   this->fSegmentation   = source.fSegmentation;
62   this->fDigClassName   = source.fDigClassName;
63   this->fClustClassName = source.fClustClassName;
64   return;
65 }
66 //______________________________________________________________________
67 AliITSDetType& AliITSDetType::operator=(const AliITSDetType &source){
68   //    Assignment operator
69
70   if(&source == this) return *this;
71   this->fReconst        = source.fReconst;
72   this->fSimulation     = source.fSimulation;
73   this->fResponse       = source.fResponse;
74   this->fSegmentation   = source.fSegmentation;
75   this->fDigClassName   = source.fDigClassName;
76   this->fClustClassName = source.fClustClassName;
77   return *this;  
78 }