]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsegmentation.cxx
Runloader is updated when moving to next file (quick fix).
[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 fGeom(0),
22 fCorr(0){
23   // Default constructor
24  
25 }
26
27 //_____________________________________________________________
28 AliITSsegmentation::~AliITSsegmentation(){
29   // destructor
30   if(fCorr)delete fCorr;
31 }
32
33 //_____________________________________________________________
34 void AliITSsegmentation::Copy(TObject &obj) const {
35   // copy this to obj
36   ((AliITSsegmentation& ) obj).fDz      = fDz;
37   ((AliITSsegmentation& ) obj).fDx      = fDx;
38   ((AliITSsegmentation& ) obj).fDy      = fDy;
39   ((AliITSsegmentation& ) obj).fGeom    = fGeom; // copy only the pointer
40   if(fCorr){
41     ((AliITSsegmentation& ) obj).fCorr    = new TF1(*fCorr); // make a proper copy
42   }
43   else {
44     ((AliITSsegmentation& ) obj).fCorr = 0;
45   }
46 }
47 //______________________________________________________________________
48 AliITSsegmentation& AliITSsegmentation::operator=(
49                         const AliITSsegmentation &source){
50 // Operator =
51   if(this != &source){
52     source.Copy(*this);
53   }
54   return *this;
55 }
56 //______________________________________________________________________
57 AliITSsegmentation::AliITSsegmentation(const AliITSsegmentation &source):
58     TObject(source),
59 fDx(0),
60 fDz(0),
61 fDy(0),
62 fGeom(0),
63 fCorr(0){
64     // copy constructor
65   source.Copy(*this);
66 }