]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUON1DMap.cxx
Remove TClonesArray deletions (Diego)
[u/mrichter/AliRoot.git] / MUON / AliMUON1DMap.cxx
index 07599e620b2e16011628c311dfe69ad4c07de93d..f61c6ba517950bb325478153207e94748faa6bb1 100644 (file)
@@ -16,8 +16,8 @@
 // $Id$
 
 #include "AliMUON1DMap.h"
-#include "AliMUON1DMapIterator.h"
 #include "AliMpExMap.h"
+#include "AliMpExMapIterator.h"
 
 #include "AliLog.h"
 
 ClassImp(AliMUON1DMap)
 /// \endcond
 
+//_____________________________________________________________________________
+AliMUON1DMap::AliMUON1DMap(TRootIOCtor*)
+: AliMUONVStore(),
+fMap(0x0)
+{
+  /// I/O ctor
+  
+}
+
 //_____________________________________________________________________________
 AliMUON1DMap::AliMUON1DMap(Int_t theSize)
 : AliMUONVStore(),
-  fMap(new AliMpExMap(kTRUE))
+  fMap(new AliMpExMap)
 {
 /// Default ctor
 
-  if ( theSize ) 
+  if ( theSize > 0
   {
     fMap->SetSize(theSize);
   }
-    fMap->SetOwner(kTRUE);
+  fMap->SetOwner(kTRUE);
 }
 
 //_____________________________________________________________________________
@@ -105,13 +114,24 @@ AliMUON1DMap::FindObject(UInt_t i) const
   return fMap->GetValue(i);
 }
 
+//_____________________________________________________________________________
+TObject* 
+AliMUON1DMap::FindObject(Int_t i, Int_t j) const
+{
+  /// Get the object located at index (i,j), if it exists, and if i,j is correct.
+  
+  UInt_t uid = ( ( ( j & 0xFFFF ) << 16 ) | ( i & 0xFFFF ) );
+  
+  return fMap->GetValue(uid);
+}
+
 //_____________________________________________________________________________
 TIterator*
 AliMUON1DMap::CreateIterator() const
 {
   /// Create and return an iterator on this map
   /// Returned iterator must be deleted by user.
-  return new AliMUON1DMapIterator(*fMap);
+  return fMap->CreateIterator();
 }
 
 //_____________________________________________________________________________