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