]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsegmentation.cxx
Upgraded possibility of DCS data size reduction (V. Pospisil)
[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 AliITSsegmentation::AliITSsegmentation(AliITSgeom* geom):
28 fDx(0),
29 fDz(0),
30 fDy(0),
31 fGeom(0),
32 fCorr(0){
33   // Default constructor
34    fGeom=geom;
35 }
36
37
38 //_____________________________________________________________
39 AliITSsegmentation::~AliITSsegmentation(){
40   // destructor
41   if(fCorr)delete fCorr;
42 }
43
44 //_____________________________________________________________
45 void AliITSsegmentation::Copy(TObject &obj) const {
46   // copy this to obj
47   ((AliITSsegmentation& ) obj).fDz      = fDz;
48   ((AliITSsegmentation& ) obj).fDx      = fDx;
49   ((AliITSsegmentation& ) obj).fDy      = fDy;
50   ((AliITSsegmentation& ) obj).fGeom    = fGeom; // copy only the pointer
51   if(fCorr){
52     ((AliITSsegmentation& ) obj).fCorr    = new TF1(*fCorr); // make a proper copy
53   }
54   else {
55     ((AliITSsegmentation& ) obj).fCorr = 0;
56   }
57 }
58 //______________________________________________________________________
59 AliITSsegmentation& AliITSsegmentation::operator=(
60                         const AliITSsegmentation &source){
61 // Operator =
62   if(this != &source){
63     source.Copy(*this);
64   }
65   return *this;
66 }
67 //______________________________________________________________________
68 AliITSsegmentation::AliITSsegmentation(const AliITSsegmentation &source):
69     TObject(source),
70 fDx(0),
71 fDz(0),
72 fDy(0),
73 fGeom(0),
74 fCorr(0){
75     // copy constructor
76   source.Copy(*this);
77 }