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