]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changed the interface to AliMUONVStore one (Laurent)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 17 Jun 2007 20:39:46 +0000 (20:39 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 17 Jun 2007 20:39:46 +0000 (20:39 +0000)
MUON/AliMUON1DArray.cxx
MUON/AliMUON1DArray.h
MUON/AliMUON1DMap.cxx
MUON/AliMUON1DMap.h
MUON/AliMUON2DMap.cxx
MUON/AliMUON2DMap.h

index a5b2ee496aca19573b31c8e5587a20585d544995..738e49a0acd6970dc3fe0ea1426023b614fb7986 100644 (file)
@@ -18,8 +18,9 @@
 #include "AliMUON1DArray.h"
 
 #include "AliLog.h"
-#include "TObjArray.h"
-
+#include <TClass.h>
+#include <TObjArray.h>
+#include <Riostream.h>
 ///
 /// \class AliMUON1DArray
 /// This class is simply a wrapper to a TObjArray, offering in addition a
@@ -34,24 +35,25 @@ ClassImp(AliMUON1DArray)
 
 //_____________________________________________________________________________
 AliMUON1DArray::AliMUON1DArray(Int_t theSize)
-: AliMUONV1DStore(),
+: AliMUONVStore(),
   fArray(0x0)
 {
-/// Default ctor
+    /// Default ctor
 
-  if ( theSize ) 
-  {
-    fArray = new TObjArray(theSize);
-  }
+  if (theSize<=0) theSize=16;
+        
+  fArray = new TObjArray(theSize);
+  fArray->SetOwner(kTRUE);
 }
 
 //_____________________________________________________________________________
 AliMUON1DArray::AliMUON1DArray(const AliMUON1DArray& other)
-: AliMUONV1DStore(),
+: AliMUONVStore(),
   fArray(0x0)
 {
 /// Copy constructor
 
+    AliDebug(1,Form("this=%p copy ctor",this));
   other.CopyTo(*this);
 }
 
@@ -68,11 +70,38 @@ AliMUON1DArray::operator=(const AliMUON1DArray& other)
 //_____________________________________________________________________________
 AliMUON1DArray::~AliMUON1DArray()
 {
-/// dtor, we're the owner of our internal array.
+  /// dtor, we're the owner of our internal array.
 
+  AliDebug(1,Form("this=%p",this));
   delete fArray;
 }
 
+//_____________________________________________________________________________
+Bool_t
+AliMUON1DArray::Add(TObject* object)
+{
+  /// Add an object to this, if its uniqueID is below maxsize
+  if (!object) return kFALSE;
+  
+  Int_t i = (Int_t)object->GetUniqueID();
+  if ( i >= fArray->GetSize() ) 
+  {
+    AliError(Form("Index out of bounds %u (max is %u)",i,fArray->GetSize()));
+    return kFALSE;
+  }
+
+  Set(object->GetUniqueID(),object,kFALSE);
+  return kTRUE;
+}
+
+//_____________________________________________________________________________
+void
+AliMUON1DArray::Clear(Option_t* opt)
+{
+  /// Reset
+  fArray->Clear(opt);
+}
+
 //_____________________________________________________________________________
 void
 AliMUON1DArray::CopyTo(AliMUON1DArray& dest) const
@@ -80,7 +109,8 @@ AliMUON1DArray::CopyTo(AliMUON1DArray& dest) const
 /// Make a deep copy
 
   delete dest.fArray;
-  dest.fArray = new TObjArray;
+  dest.fArray = 0;
+  dest.fArray = new TObjArray(fArray->GetSize());
   dest.fArray->SetOwner(kTRUE);
   for ( Int_t i = 0; i < fArray->GetLast(); ++i )
   {
@@ -88,13 +118,21 @@ AliMUON1DArray::CopyTo(AliMUON1DArray& dest) const
   }
 }
 
+//_____________________________________________________________________________
+AliMUON1DArray* 
+AliMUON1DArray::Create() const 
+{
+  /// Create an empty clone of this
+  return new AliMUON1DArray(fArray->GetSize());
+}
+
 //_____________________________________________________________________________
 TObject* 
-AliMUON1DArray::Get(Int_t i) const
+AliMUON1DArray::FindObject(UInt_t i) const
 {
-/// Get the object located at index i, if it exists, and if i is correct.
+  /// Get the object located at index i, if it exists, and if i is correct.
 
-  if ( i >= 0 && i < fArray->GetSize() )
+  if ( (Int_t)(i) < fArray->GetSize() )
   {
     return fArray->At(i);
   }
@@ -102,6 +140,14 @@ AliMUON1DArray::Get(Int_t i) const
   return 0x0;
 }
 
+//_____________________________________________________________________________
+TIterator* 
+AliMUON1DArray::CreateIterator() const
+{
+  /// Return an iterator on this
+  return fArray->MakeIterator();
+}
+
 //_____________________________________________________________________________
 Bool_t 
 AliMUON1DArray::Set(Int_t i, TObject* object, Bool_t replace)
@@ -112,13 +158,20 @@ AliMUON1DArray::Set(Int_t i, TObject* object, Bool_t replace)
 
   if ( i >= 0 && i < fArray->GetSize() )
   {
-    TObject* o = Get(i);
+    if (((Int_t)(object->GetUniqueID()))!=i)
+    {
+      AliError(Form("object's UniqueID is %d, which is different from the expected %d",
+                    object->GetUniqueID(),i));
+      return kFALSE;
+    }
+    
+    TObject* o = FindObject(i);
     if ( o && !replace )
     {
       AliError(Form("Object %p is already there for i=%d",o,i));
       return kFALSE;
     }
-    if ( replace ) 
+    if ( o && replace ) 
     {
       delete o;
     }
@@ -129,5 +182,10 @@ AliMUON1DArray::Set(Int_t i, TObject* object, Bool_t replace)
   return kFALSE;
 }
 
-
-
+//_____________________________________________________________________________
+Int_t 
+AliMUON1DArray::GetSize() const
+{
+  /// Return the number of object we hold
+  return fArray->GetEntries();
+}
index bf161a233cfeb24daa7cfc2433a9c7b61f79871d..61c069ebef29e9396e201d6427a60d3b5e55a37a 100644 (file)
@@ -5,20 +5,20 @@
 
 /// \ingroup calib
 /// \class AliMUON1DArray
-/// \brief Implementation of AliMUONV1DStore
+/// \brief Implementation of AliMUONVStore
 /// 
 //  Author Laurent Aphecetche
 
 #ifndef ALIMUON1DARRAY_H
 #define ALIMUON1DARRAY_H
 
-#ifndef ALIMUONV1DSTORE_H
-#  include "AliMUONV1DStore.h"
+#ifndef ALIMUONVSTORE_H
+#  include "AliMUONVStore.h"
 #endif
 
 class TObjArray;
 
-class AliMUON1DArray : public AliMUONV1DStore
+class AliMUON1DArray : public AliMUONVStore
 {
 public:
   AliMUON1DArray(Int_t theSize=0);
@@ -27,25 +27,36 @@ public:
   
   virtual ~AliMUON1DArray();
   
-  /// Return the object stored at i.
-  virtual TObject* Get(Int_t i) const;
+  virtual AliMUON1DArray* Create() const;
   
-  /** Set the object stored at i.
-    if replace=false and there's already an object there, returns kFALSE
-    */
-  virtual Bool_t Set(Int_t i, TObject* object, Bool_t replace);
+  /// Add an object. Object must have a valid UniqueID, which is
+  /// used as the index of the array.
+  virtual Bool_t Add(TObject* object);
+
+  virtual Bool_t CanConnect() const { return kFALSE; }
+  
+  virtual void Clear(Option_t* opt="");
+
+  virtual TIterator* CreateIterator() const;
+  
+  using AliMUONVStore::FindObject;
+  
+  /// Return the object stored with id.
+  virtual TObject* FindObject(UInt_t identifier) const;
+    
+  using AliMUONVStore::GetSize;
   
-  /// Whether or not this container is the owner of its contents.
-  virtual Bool_t IsOwner() const { return kTRUE; }
+  virtual Int_t GetSize() const;
   
 private:
    void CopyTo(AliMUON1DArray& to) const;
+  Bool_t Set(Int_t i, TObject* object, Bool_t replace);
   
 private:  
     
     TObjArray* fArray; ///< Internal array
   
-    ClassDef(AliMUON1DArray,1) // Implementation of AliMUONV1DStore
+    ClassDef(AliMUON1DArray,1) // Implementation of AliMUONVStore
 };
 
 #endif
index 90ce7c75244da64ec88478d616ef12a19d9e2d3b..c7fb5e44bff50ee0d0768b592e7f8594cea192da 100644 (file)
@@ -35,7 +35,7 @@ ClassImp(AliMUON1DMap)
 
 //_____________________________________________________________________________
 AliMUON1DMap::AliMUON1DMap(Int_t theSize)
-: AliMUONV1DStore(),
+: AliMUONVStore(),
   fMap(new AliMpExMap(true))
 {
 /// Default ctor
@@ -49,7 +49,7 @@ AliMUON1DMap::AliMUON1DMap(Int_t theSize)
 
 //_____________________________________________________________________________
 AliMUON1DMap::AliMUON1DMap(const AliMUON1DMap& other)
-: AliMUONV1DStore(),
+: AliMUONVStore(),
   fMap(0x0)
 {
 /// Copy constructor
@@ -75,6 +75,25 @@ AliMUON1DMap::~AliMUON1DMap()
   delete fMap;
 }
 
+//_____________________________________________________________________________
+Bool_t 
+AliMUON1DMap::Add(TObject* object)
+{
+  /// Add an object to this, using uniqueID as the key
+  if (!object) return kFALSE;
+  Set(object->GetUniqueID(),object,kFALSE);
+  return kTRUE;
+}
+
+//_____________________________________________________________________________
+void 
+AliMUON1DMap::Clear(Option_t*)
+{
+  /// Reset
+  delete fMap;
+  fMap = 0x0;
+}
+
 //_____________________________________________________________________________
 void
 AliMUON1DMap::CopyTo(AliMUON1DMap& dest) const
@@ -85,9 +104,17 @@ AliMUON1DMap::CopyTo(AliMUON1DMap& dest) const
   dest.fMap = fMap;
 }
 
+//_____________________________________________________________________________
+AliMUON1DMap* 
+AliMUON1DMap::Create() const
+{
+  /// Create an empty clone of this
+  return new AliMUON1DMap(fMap->GetSize());
+}
+
 //_____________________________________________________________________________
 TObject* 
-AliMUON1DMap::Get(Int_t i) const
+AliMUON1DMap::FindObject(UInt_t i) const
 {
 /// Get the object located at index i, if it exists, and if i is correct.
 
@@ -95,8 +122,8 @@ AliMUON1DMap::Get(Int_t i) const
 }
 
 //_____________________________________________________________________________
-AliMUONVDataIterator*
-AliMUON1DMap::Iterator() const
+TIterator*
+AliMUON1DMap::CreateIterator() const
 {
   // Create and return an iterator on this map
   // Returned iterator must be deleted by user.
@@ -107,6 +134,13 @@ AliMUON1DMap::Iterator() const
   return 0x0;
 }
 
+//_____________________________________________________________________________
+Int_t
+AliMUON1DMap::GetSize() const
+{
+  /// Return the number of objects we hold
+  return fMap->GetSize();
+}
 
 //_____________________________________________________________________________
 Bool_t 
@@ -116,7 +150,7 @@ AliMUON1DMap::Set(Int_t i, TObject* object, Bool_t replace)
 /// If replace=kFALSE and there's already an object at location i,
 /// this method fails and returns kFALSE, otherwise it returns kTRUE
 
-  TObject* o = Get(i);
+  TObject* o = FindObject(i);
   if ( o && !replace )
   {
     AliError(Form("Object %p is already there for i=%d",o,i));
index 3d624cbf084bcfe32fd3f15c2877baae5bcbb439..397259b9775011b39396efa97ddab39e0ae2bcd1 100644 (file)
@@ -5,7 +5,7 @@
 
 /// \ingroup calib
 /// \class AliMUON1DMap
-/// \brief Implementation of AliMUONV1DStore
+/// \brief Implementation of AliMUONVStore
 /// 
 //  Author Laurent Aphecetche
 
 #define ALIMUON1DMAP_H
 
 #ifndef ALIMUONV1DSTORE_H
-#  include "AliMUONV1DStore.h"
+#  include "AliMUONVStore.h"
 #endif
 
 class AliMpExMap;
 
-class AliMUON1DMap : public AliMUONV1DStore
+class AliMUON1DMap : public AliMUONVStore
 {
 public:
   AliMUON1DMap(Int_t theSize=0);
   AliMUON1DMap(const AliMUON1DMap& other);
   AliMUON1DMap& operator=(const AliMUON1DMap& other);
-  
   virtual ~AliMUON1DMap();
+
+  virtual Bool_t Add(TObject* object);
+
+  virtual Bool_t CanConnect() const { return kFALSE; }
   
-  /// Return the object stored at i.
-  virtual TObject* Get(Int_t i) const;
+  virtual void Clear(Option_t* opt="");
+
+  virtual AliMUON1DMap* Create() const;
   
-  virtual AliMUONVDataIterator* Iterator() const;
+  using AliMUONVStore::FindObject;
   
-  /** Set the object stored at i.
-    if replace=false and there's already an object there, returns kFALSE
-    */
-  virtual Bool_t Set(Int_t i, TObject* object, Bool_t replace);
+  virtual TObject* FindObject(UInt_t i) const;
+  
+  virtual TIterator* CreateIterator() const;
   
-  /// Whether or not this container is the owner of its contents.
-  virtual Bool_t IsOwner() const { return kTRUE; }
+  using AliMUONVStore::GetSize;
+  
+  virtual Int_t GetSize() const;
   
 private:
    void CopyTo(AliMUON1DMap& to) const;
+  /** Set the object stored at i.
+    if replace=false and there's already an object there, returns kFALSE
+    */
+  virtual Bool_t Set(Int_t i, TObject* object, Bool_t replace);
   
 private:  
     
     AliMpExMap* fMap; ///< Internal array (map)
   
-    ClassDef(AliMUON1DMap,1) // Implementation of AliMUONV1DStore
+    ClassDef(AliMUON1DMap,1) // Implementation of AliMUONVStore
 };
 
 #endif
index 85c99f61d42dbabe7fea6e3f879bd9737fccc30b..5f2ffe7895e38c62bfa03144e34610d5a6d150a1 100644 (file)
 #include "AliMUON2DMap.h"
 
 #include "AliLog.h"
-#include "AliMUONVDataIterator.h"
 #include "AliMUON2DMapIterator.h"
+#include "AliMUON2DMapIteratorByI.h"
 #include "AliMpExMap.h"
-#include "AliMpIntPair.h"
 #include "AliMpManuList.h"
 #include "AliMpDEManager.h"
 #include "AliMpConstants.h"
-#include <TList.h>
 
 /// \class AliMUON2DMap
-/// Basic implementation of AliMUONV2DStore container using
+/// Basic implementation of AliMUONVStore container using
 /// AliMpExMap internally.
 /// What we store is a "double" map : an AliMpExMap of AliMpExMaps
 ///
 ClassImp(AliMUON2DMap)
 /// \endcond
 
+namespace
+{
+  //___________________________________________________________________________
+  TObject* GetValue(TExMapIter& iter, Int_t& theKey) 
+  {
+    /// return the next value corresponding to theKey in iterator iter
+    theKey = -1;
+    Long_t key, value;
+    Bool_t ok = iter.Next(key,value);
+    if (!ok) return 0x0;
+    theKey = (Int_t)(key & 0xFFFF);
+    return reinterpret_cast<TObject*>(value);
+  }
+}
+
 //_____________________________________________________________________________
 AliMUON2DMap::AliMUON2DMap(Bool_t optimizeForDEManu) 
-: AliMUONV2DStore(), 
-  fMap(new AliMpExMap(true)), 
+: AliMUONVStore(), 
+  fMap(0x0),
   fOptimizeForDEManu(optimizeForDEManu)
 {
-/// Default constructor.
-    if ( fOptimizeForDEManu )
-    {
-      Int_t nDEs(0);
-      for ( Int_t i = 0; i < AliMpConstants::NofTrackingChambers(); ++i )
-      {
-        nDEs += AliMpDEManager::GetNofDEInChamber(i);
-      }
-      fMap->SetSize(nDEs);
-    }
+  /// Default constructor.
+    Clear();
 }
 
 //_____________________________________________________________________________
 AliMUON2DMap::AliMUON2DMap(const AliMUON2DMap& other)
-: AliMUONV2DStore(),
+: AliMUONVStore(),
 fMap(0x0),
 fOptimizeForDEManu(kFALSE)
 {
@@ -87,8 +92,8 @@ AliMUON2DMap::~AliMUON2DMap()
 }
 
 //_____________________________________________________________________________
-AliMUONV2DStore*
-AliMUON2DMap::CloneEmpty() const
+AliMUONVStore*
+AliMUON2DMap::Create() const
 {
   /// Create a void copy of *this. 
   return new AliMUON2DMap(fOptimizeForDEManu);
@@ -105,61 +110,101 @@ AliMUON2DMap::CopyTo(AliMUON2DMap& dest) const
   dest.fOptimizeForDEManu = fOptimizeForDEManu;
 }
 
+//_____________________________________________________________________________
+Bool_t
+AliMUON2DMap::Add(TObject* object)
+{
+  /// Add object, using the decoding of uniqueID into two ints as the key
+  UInt_t uniqueID = object->GetUniqueID();
+  Int_t j = ( uniqueID & 0xFFFF0000 ) >> 16;
+  Int_t i = ( uniqueID & 0xFFFF);
+  return Set(i,j,object,kFALSE);
+}
+
 //_____________________________________________________________________________
 TObject* 
-AliMUON2DMap::Get(Int_t i, Int_t j) const
+AliMUON2DMap::FindObject(Int_t i, Int_t j) const
 {
-/// Return the value at position (i,j).
+  /// Return the value at position (i,j).
 
-  TObject* o = fMap->GetValue(i);
-  if ( o )
+  AliMpExMap* m = static_cast<AliMpExMap*>(fMap->GetValue(i));
+  if (m) return m->GetValue(j);
+  return 0x0;
+}
+
+//_____________________________________________________________________________
+TIterator*
+AliMUON2DMap::CreateIterator() const
+{
+  // Create and return an iterator on this map
+  // Returned iterator must be deleted by user.
+  if ( fMap ) 
   {
-    AliMpExMap* m = dynamic_cast<AliMpExMap*>(o);
-    if (!m) AliFatal(Form("fMap[%d] not of the expected type",i));
-    return m->GetValue(j);
+    return new AliMUON2DMapIterator(*fMap);
   }
   return 0x0;
 }
 
 //_____________________________________________________________________________
-AliMUONVDataIterator*
-AliMUON2DMap::Iterator() const
+TIterator*
+AliMUON2DMap::CreateIterator(Int_t firstI, Int_t lastI) const
 {
   // Create and return an iterator on this map
   // Returned iterator must be deleted by user.
   if ( fMap ) 
   {
-    return new AliMUON2DMapIterator(*fMap);
+    return new AliMUON2DMapIteratorByI(*fMap,firstI,lastI);
   }
   return 0x0;
 }
 
 //_____________________________________________________________________________
-AliMUONV2DStore* 
-AliMUON2DMap::Generate(const TObject& object)
+void 
+AliMUON2DMap::Clear(Option_t*)
 {
-  /// Build a complete (i.e. all detElemId,manuId couple will be there) store
-  /// but with identical values, given by object 
-  /// The returned store will be obviously optimized for DEManu.
+  /// Reset
+  delete fMap;
 
-  AliMUONV2DStore* store = new AliMUON2DMap(true);
-  
-  TList* list = AliMpManuList::ManuList();
-  
-  AliMpIntPair* pair;
-  
-  TIter next(list);
-  
-  while ( ( pair = static_cast<AliMpIntPair*>(next()) ) ) 
+  fMap = new AliMpExMap(kTRUE);
+
+  if ( fOptimizeForDEManu )
   {
-    Int_t detElemId = pair->GetFirst();
-    Int_t manuId = pair->GetSecond();
-    store->Set(detElemId,manuId,object.Clone(),kFALSE);
+    Int_t nDEs(0);
+    for ( Int_t i = 0; i < AliMpConstants::NofChambers(); ++i )
+    {
+      nDEs += AliMpDEManager::GetNofDEInChamber(i);
+    }
+    fMap->SetSize(nDEs);
   }
+}  
+
+//_____________________________________________________________________________
+Int_t 
+AliMUON2DMap::GetSize() const
+{
+  /// Return the number of objects we hold
+  TExMapIter iter(fMap->GetIterator());
+  Int_t i;
+  Int_t theSize(0);
   
-  delete list;
-  
-  return store;
+  while ( GetValue(iter,i) ) 
+  {
+    theSize += GetSize(i);
+  }
+  return theSize;
+}
+
+//_____________________________________________________________________________
+Int_t 
+AliMUON2DMap::GetSize(Int_t i) const
+{
+  /// Return the number of objects we hold
+  AliMpExMap* m = static_cast<AliMpExMap*>(fMap->GetValue(i));
+  if (m)
+  {
+    return m->GetSize();
+  }
+  return 0;
 }
 
 //_____________________________________________________________________________
@@ -191,22 +236,30 @@ AliMUON2DMap::Set(Int_t i, Int_t j, TObject* object, Bool_t replace)
     fMap->Add(i,m);
     o = fMap->GetValue(i);
   }
-  AliMpExMap* m = dynamic_cast<AliMpExMap*>(o);
-  if (!m) AliFatal(Form("fMap[%d] not of the expected type",i));
+  AliMpExMap* m = static_cast<AliMpExMap*>(o);
+//  AliMpExMap* m = dynamic_cast<AliMpExMap*>(o);
+//  if (!m) AliFatal(Form("fMap[%d] not of the expected type",i));
   o = m->GetValue(j);
-  if ( !o || ( o && replace ) )
+  
+  if ( !o )
   {
-    if ( IsOwner() ) 
-    {
-      delete o;
-    }
     m->Add(j,object);
   }
-  else if ( o && !replace )
+  else 
   {
-    AliError(Form("Object %p is already there for (i,j)=(%d,%d)",o,i,j));
-    return kFALSE;
+    if ( replace ) 
+    {
+      delete o;
+      m->Add(j,object);
+    }
+    else
+    {
+      AliError(Form("Object %p is already there for (i,j)=(%d,%d)",o,i,j));
+      return kFALSE;
+    }
   }
+
   return kTRUE;
 }
 
index f1c6db4eb9d833bebcd533b8e0814403c8341f3a..b610bb5fd34595bc63b01ed9fdd912e52850b7fb 100644 (file)
@@ -5,7 +5,7 @@
 
 /// \ingroup calib
 /// \class AliMUON2DMap
-/// \brief Basic implementation of AliMUONV2DStore container using
+/// \brief Basic implementation of AliMUONVStore container using
 /// AliMpExMap internally.
 ///
 //  Author Laurent Aphecetche
 #ifndef AliMUON2DMAP_H
 #define AliMUON2DMAP_H
 
-#include "AliMUONV2DStore.h"
+#include "AliMUONVStore.h"
 
 class AliMpExMap;
 
-class AliMUON2DMap : public AliMUONV2DStore
+class AliMUON2DMap : public AliMUONVStore
 {
 public:
   AliMUON2DMap(Bool_t optimizeForDEManu=kFALSE);  
+  AliMUON2DMap(const AliMUON2DMap& other);
+  AliMUON2DMap&  operator = (const AliMUON2DMap& other);
   virtual ~AliMUON2DMap();
 
-  AliMUONV2DStore* CloneEmpty() const;
+  virtual Bool_t Add(TObject* object);
+  
+  /// Mandatory methods from TCollection
+  virtual void Clear(Option_t* opt="");
+  
+  /// Whether the Connect(TTree&) method is implemented
+  virtual Bool_t CanConnect() const { return kFALSE; }
+  
+  virtual AliMUONVStore* Create() const;
   
   /// The returned iterator is owned by the client.
-  AliMUONVDataIterator* Iterator() const;
+  virtual TIterator* CreateIterator() const;
+
+  /// Iterate on part of the store (only for (i,j) where firstI<=i<=lastI
+  TIterator* CreateIterator(Int_t firstI, Int_t lastI) const;
+
+  using AliMUONVStore::FindObject;
   
-  virtual TObject* Get(Int_t i, Int_t j) const;
-  virtual Bool_t Set(Int_t i, Int_t j, TObject* object, Bool_t replace);
-  /// Whether or not this container is the owner of its contents.
-  virtual Bool_t IsOwner() const { return kTRUE; } 
+  virtual TObject* FindObject(Int_t i, Int_t j) const;
 
-  AliMUON2DMap(const AliMUON2DMap& other);
-  AliMUON2DMap&  operator = (const AliMUON2DMap& other);
+  /// Whether our internal storage is optimize to store (detection element id, manu id)  
+  Bool_t IsOptimizedForDEManu() const { return fOptimizeForDEManu; }
+  
+  virtual Int_t GetSize() const;
+
+  virtual Int_t GetSize(Int_t i) const;
 
-  /// Build a complete (i.e. all detElemId,manuId couple will be there) store
-  /// but with identical values, given by object 
-  /// The returned store will be obviously optimized for DEManu.
-  static AliMUONV2DStore* Generate(const TObject& object);
-    
 private:
   void CopyTo(AliMUON2DMap& destination) const;
+  Bool_t Set(Int_t i, Int_t j, TObject* object, Bool_t replace);
 
 private:
   AliMpExMap* fMap; ///< Our internal map (an AliMpExMap of AliMpExMaps)