]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSDetType.cxx
Boost method added.
[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.10  2002/10/14 14:57:00  hristov
19  Merging the VirtualMC branch to the main development branch (HEAD)
20
21  Revision 1.8.8.1  2002/06/10 17:51:14  hristov
22  Merged with v3-08-02
23
24  Revision 1.9  2002/05/05 21:10:10  nilsen
25  In Distructor, delete fResponse. Since AliITSDetType is supposed to own it
26  it should delete it.
27
28  Revision 1.8  2001/10/04 22:40:15  nilsen
29  Cosmetic changes.
30
31  Revision 1.7  2001/09/07 14:43:15  hristov
32  Destructor reverted after a temporary fix
33
34  Revision 1.6  2001/09/07 08:44:43  hristov
35  Deletion commented out because AliITSDetType was not the owner
36
37  Revision 1.5  2001/05/31 06:58:38  fca
38  Patch problem with destructor
39
40  Revision 1.4  2001/05/01 14:47:45  nilsen
41  Fixed destructor so that it destroyes the pointers fSegmentation, fResponse,
42  fSimulation, and fReconst if they have been allocated. The two TStrings
43  fDigClassName and fClustClassName shoud be destroyed automaticaly. This should
44  fix a small memory leak associated with digitization and reconstruction.
45
46 */
47 ////////////////////////////////////////////////////////////////////////
48 // This Class owns the classes needed to to detector simulations and
49 // reconstruction. This includes the detector segmentation classes,
50 // the detector responce classes, the detector simulatin classes, and
51 // the detector reconstruction (clustering) classes for all of the ITS
52 // detectors.
53 ////////////////////////////////////////////////////////////////////////
54 #include "AliITSDetType.h"
55 #include "AliITSClusterFinder.h"
56 #include "AliITSsimulation.h"
57
58
59 ClassImp(AliITSDetType)  
60
61 //______________________________________________________________________
62 AliITSDetType::AliITSDetType(){
63     // constructor
64
65     fSegmentation = 0;
66     fResponse     = 0;
67     fSimulation   = 0;
68     fReconst      = 0;
69 }
70 //----------------------------------------------------------------------
71 AliITSDetType::~AliITSDetType(){
72     // destructor
73
74     if(fSegmentation!=0) delete fSegmentation; fSegmentation = 0;
75     if(fResponse!=0)     delete fResponse;     fResponse     = 0;
76     if(fSimulation!=0)   delete fSimulation;   fSimulation   = 0;
77     if(fReconst!=0)      delete fReconst;      fReconst      = 0;
78 }
79 //______________________________________________________________________
80 AliITSDetType::AliITSDetType(const AliITSDetType &source){
81   //     Copy Constructor 
82
83   if(&source == this) return;
84   this->fReconst        = source.fReconst;
85   this->fSimulation     = source.fSimulation;
86   this->fResponse       = source.fResponse;
87   this->fSegmentation   = source.fSegmentation;
88   this->fDigClassName   = source.fDigClassName;
89   this->fClustClassName = source.fClustClassName;
90   return;
91 }
92 //______________________________________________________________________
93 AliITSDetType& AliITSDetType::operator=(const AliITSDetType &source){
94   //    Assignment operator
95
96   if(&source == this) return *this;
97   this->fReconst        = source.fReconst;
98   this->fSimulation     = source.fSimulation;
99   this->fResponse       = source.fResponse;
100   this->fSegmentation   = source.fSegmentation;
101   this->fDigClassName   = source.fDigClassName;
102   this->fClustClassName = source.fClustClassName;
103   return *this;  
104 }