]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsegmentation.cxx
Changes needed by the following commit: coding convention for type (_t) and access...
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentation.cxx
1 ////////////////////////////////////////////////
2 //  Segmentation class for set:ITS            //
3 //  All methods implemented in the derived    //
4 //  classes are set = 0 in the header file    //
5 //  so this class cannot be instantiated      //
6 //  methods implemented in a part of the      //
7 // derived classes are implemented here as    //
8 // TObject::MayNotUse                         // 
9 ////////////////////////////////////////////////
10
11 #include <TF1.h>
12 #include "AliITSsegmentation.h"
13
14 ClassImp(AliITSsegmentation)
15
16 //_____________________________________________________________
17 AliITSsegmentation::AliITSsegmentation():
18 fDx(0),
19 fDz(0),
20 fDy(0),
21 fCorr(0){
22   // Default constructor
23  
24 }
25 //_____________________________________________________________
26 AliITSsegmentation::AliITSsegmentation(AliITSgeom* geom):
27 fDx(0),
28 fDz(0),
29 fDy(0),
30 fCorr(0){
31   // Default constructor
32   AliWarning(Form("AliITSgeom (%X) no longer needed in ITS segmentation. Use default constructor\n",geom))
33 }
34
35
36 //_____________________________________________________________
37 AliITSsegmentation::~AliITSsegmentation(){
38   // destructor
39   if(fCorr)delete fCorr;
40 }
41
42 //_____________________________________________________________
43 void AliITSsegmentation::Copy(TObject &obj) const {
44   // copy this to obj
45   ((AliITSsegmentation& ) obj).fDz      = fDz;
46   ((AliITSsegmentation& ) obj).fDx      = fDx;
47   ((AliITSsegmentation& ) obj).fDy      = fDy;
48   if(fCorr){
49     ((AliITSsegmentation& ) obj).fCorr    = new TF1(*fCorr); // make a proper copy
50   }
51   else {
52     ((AliITSsegmentation& ) obj).fCorr = 0;
53   }
54 }
55 //______________________________________________________________________
56 AliITSsegmentation& AliITSsegmentation::operator=(
57                         const AliITSsegmentation &source){
58 // Operator =
59   if(this != &source){
60     source.Copy(*this);
61   }
62   return *this;
63 }
64 //______________________________________________________________________
65 AliITSsegmentation::AliITSsegmentation(const AliITSsegmentation &source):
66     TObject(source),
67 fDx(0),
68 fDz(0),
69 fDy(0),
70 fCorr(0){
71     // copy constructor
72   source.Copy(*this);
73 }