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