]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDUShortMap.cxx
Fixes
[u/mrichter/AliRoot.git] / FMD / AliFMDUShortMap.cxx
index 9a4ff2306ff70eef4f8c4beb20877652b9347249..b688651c947ae5bc29c8e4f0d4839f1e5f0a06ce 100644 (file)
@@ -38,22 +38,24 @@ ClassImp(AliFMDUShortMap)
 AliFMDUShortMap::AliFMDUShortMap(const AliFMDUShortMap& other)
   : AliFMDMap(other.fMaxDetectors, other.fMaxRings, other.fMaxSectors, 
              other.fMaxStrips), 
+    fTotal(0),
     fData(0)
 {
   // CTOR
   fTotal = fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips;
   fData  = new UShort_t[fTotal];
-  for (size_t i = 0; i < fTotal; i++) fData[i] = other.fData[i];
+  for (Int_t i = 0; i < fTotal; i++) fData[i] = other.fData[i];
 }
 
   
 
 //____________________________________________________________________
-AliFMDUShortMap::AliFMDUShortMap(size_t maxDet, 
-                                size_t maxRing, 
-                                size_t maxSec, 
-                                size_t maxStr)
+AliFMDUShortMap::AliFMDUShortMap(UShort_t maxDet, 
+                                UShort_t maxRing, 
+                                UShort_t maxSec, 
+                                UShort_t maxStr)
   : AliFMDMap(maxDet, maxRing, maxSec, maxStr), 
+    fTotal(fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips),
     fData(0)
 {
   // Construct a map
@@ -63,10 +65,22 @@ AliFMDUShortMap::AliFMDUShortMap(size_t maxDet,
   //     maxRinf      Maximum # of rings
   //     maxSec       Maximum # of sectors
   //     maxStr       Maximum # of strips
-  fTotal = fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips;
+  if (fTotal == 0) fTotal = 51200;
   fData  = new UShort_t[fTotal];
 }
 
+//____________________________________________________________________
+AliFMDUShortMap::AliFMDUShortMap()
+  : AliFMDMap(), 
+    fTotal(0),
+    fData(0)
+{
+  // Construct a map
+  //
+  // Parameters:
+  //     None
+}
+
 //____________________________________________________________________
 AliFMDUShortMap&
 AliFMDUShortMap::operator=(const AliFMDUShortMap& other) 
@@ -79,7 +93,7 @@ AliFMDUShortMap::operator=(const AliFMDUShortMap& other)
   if (fData) delete [] fData;
   fTotal = fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips;
   fData  = new UShort_t[fTotal];
-  for (size_t i = 0; i < fTotal; i++) fData[i] = other.fData[i];
+  for (Int_t i = 0; i < fTotal; i++) fData[i] = other.fData[i];
   return *this;
 }
 
@@ -88,7 +102,7 @@ void
 AliFMDUShortMap::Reset(const UShort_t& val) 
 {
   // Reset to val
-  for (size_t i = 0; i < fTotal; i++) fData[i] = val;
+  for (Int_t i = 0; i < fTotal; i++) fData[i] = val;
 }
 
 //____________________________________________________________________