Moving required CMake version from 2.8.4 to 2.8.8
[u/mrichter/AliRoot.git] / ITS / AliITSMapA1.cxx
index 588dd05..1c42d84 100644 (file)
 
 ClassImp(AliITSMapA1)
 //______________________________________________________________________
-AliITSMapA1::AliITSMapA1(){
+AliITSMapA1::AliITSMapA1():
+fSegmentation(0),
+fNpx(0),
+fNpz(0),
+fObjects(0),
+fNobjects(0),
+fMaxIndex(0),
+fMapThresholdArr(0),
+fHitMap(0),
+fMapThreshold(0){
     // default constructor
 
-    fSegmentation = 0;
-    fNpz          = 0;
-    fNpx          = 0;
-    fMaxIndex     = 0;
-    fHitMap       = 0;
-    fObjects      = 0;
-    fNobjects     = 0;
-    fMapThreshold = 0;
-    fMapThresholdArr = 0;
 }
 //______________________________________________________________________
-AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg){
+AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg):
+fSegmentation(seg),
+fNpx(0),
+fNpz(0),
+fObjects(0),
+fNobjects(0),
+fMaxIndex(0),
+fMapThresholdArr(0),
+fHitMap(0),
+fMapThreshold(0){
     //constructor
 
-    fSegmentation = seg;
     fNpz          = fSegmentation->Npz();
     fNpx          = fSegmentation->Npx();
     fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
     fHitMap       = new Int_t[fMaxIndex];
-    fObjects      = 0;
-    fNobjects     = 0;
-    fMapThreshold = 0;
-    fMapThresholdArr = 0;
     ClearMap();
 }
 //______________________________________________________________________
-AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg, TObjArray *obj){
+AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg, TObjArray *obj):
+fSegmentation(seg),
+fNpx(0),
+fNpz(0),
+fObjects(obj),
+fNobjects(0),
+fMaxIndex(0),
+fMapThresholdArr(0),
+fHitMap(0),
+fMapThreshold(0){
     //constructor
 
-    fNobjects     = 0;
-    fSegmentation = seg;
-    fNpz          = fSegmentation->Npz();
-    fNpx          = fSegmentation->Npx();
-    fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
-    fHitMap       = new Int_t[fMaxIndex];
-    fObjects      =  obj;
-    if(fObjects) fNobjects = fObjects->GetEntriesFast();
-    fMapThreshold = 0;
-    fMapThresholdArr = 0;
-    ClearMap();
-}
-//______________________________________________________________________
-AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg, TObjArray *obj, Int_t thr){
+  fNpz          = fSegmentation->Npz();
+  fNpx          = fSegmentation->Npx();
+  fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
+  fHitMap       = new Int_t[fMaxIndex];
+  if(fObjects) fNobjects = fObjects->GetEntriesFast();
+  ClearMap();
+}
+//______________________________________________________________________
+AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg, TObjArray *obj, Int_t thr):
+fSegmentation(seg),
+fNpx(0),
+fNpz(0),
+fObjects(obj),
+fNobjects(0),
+fMaxIndex(0),
+fMapThresholdArr(0),
+fHitMap(0),
+fMapThreshold(thr){
     //constructor
 
-    fNobjects     = 0;
-    fSegmentation = seg;
-    fNpz          = fSegmentation->Npz();
-    fNpx          = fSegmentation->Npx();
-    fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
-    fHitMap       = new Int_t[fMaxIndex];
-    fObjects      =  obj;
-    if(fObjects) fNobjects = fObjects->GetEntriesFast();
-    fMapThreshold = thr;
-    ClearMap();
-}
-//______________________________________________________________________
-AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg, TObjArray *obj, TArrayI thr){
+  fNpz          = fSegmentation->Npz();
+  fNpx          = fSegmentation->Npx();
+  fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
+  fHitMap       = new Int_t[fMaxIndex];
+  if(fObjects) fNobjects = fObjects->GetEntriesFast();
+  ClearMap();
+}
+//______________________________________________________________________
+AliITSMapA1::AliITSMapA1(AliITSsegmentation *seg, TObjArray *obj, TArrayI thr):
+fSegmentation(seg),
+fNpx(0),
+fNpz(0),
+fObjects(obj),
+fNobjects(0),
+fMaxIndex(0),
+fMapThresholdArr(thr),
+fHitMap(0),
+fMapThreshold(0){
     //constructor
 
-    fNobjects     = 0;
-    fSegmentation = seg;
-    fNpz          = fSegmentation->Npz();
-    fNpx          = fSegmentation->Npx();
-    fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
-    fHitMap       = new Int_t[fMaxIndex];
-    fObjects      =  obj;
-    if(fObjects) fNobjects = fObjects->GetEntriesFast();
-    fMapThreshold = 0;
-    fMapThresholdArr = thr;
-    ClearMap();
+  fNpz          = fSegmentation->Npz();
+  fNpx          = fSegmentation->Npx();
+  fMaxIndex     = fNpz*fNpx+fNpx;             // 2 halves of detector
+  fHitMap       = new Int_t[fMaxIndex];
+  if(fObjects) fNobjects = fObjects->GetEntriesFast();
+  ClearMap();
 }
 
 //______________________________________________________________________
@@ -109,28 +126,7 @@ AliITSMapA1::~AliITSMapA1(){
 
     if(fHitMap) delete[] fHitMap;
 }
-//_________________________________________________________________________
-AliITSMapA1& AliITSMapA1::operator=(const AliITSMapA1 &source) {
-    //    Assignment operator
-
-    if(&source == this) return *this;
-
-    this->fNpx          = source.fNpx;
-    this->fNpz          = source.fNpz;
-    this->fObjects      = source.fObjects;
-    this->fNobjects     = source.fNobjects;
-    this->fMaxIndex     = source.fMaxIndex;
-    this->fHitMap       = source.fHitMap;
-    this->fMapThreshold = source.fMapThreshold;
-    this->fMapThresholdArr = source.fMapThresholdArr;
-    return *this;
-}
-//______________________________________________________________________
-AliITSMapA1::AliITSMapA1(const AliITSMapA1 &source) : AliITSMap(source){
-    //     Copy Constructor
 
-    *this = source;
-}
 //______________________________________________________________________
 void AliITSMapA1::ClearMap(){
     //clear array
@@ -233,17 +229,17 @@ Double_t AliITSMapA1::GetSignal(Int_t iz, Int_t ix) const{
     return signal;
 }
 //______________________________________________________________________
-FlagType AliITSMapA1::TestHit(Int_t iz, Int_t ix)  {
+FlagTypeITS AliITSMapA1::TestHit(Int_t iz, Int_t ix)  {
     // check whether the digit has already been flagged
 
-    if (CheckedIndex(iz, ix) < 0) return kEmpty;
+    if (CheckedIndex(iz, ix) < 0) return kEmptyITS;
     Int_t inf=fHitMap[CheckedIndex(iz, ix)]; 
     if (inf < 0) {
-       return kUsed;
+       return kUsedITS;
     } else if (inf == 0) {
-       return kEmpty;
+       return kEmptyITS;
     } else {
-       return kUnused;
+       return kUnusedITS;
     } // end if inf
 }