]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUON2DMap.h
Pre-allocate right amount of memory when used for de,manu storage (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUON2DMap.h
index b2e6c5c123c41c654c7a59be01d9a221d0a15876..1d88ea58a7d5a64cff6d6a636d2d9e841a5e811b 100644 (file)
@@ -8,7 +8,7 @@
 /// \brief Basic implementation of AliMUONV2DStore container using
 /// AliMpExMap internally.
 ///
-/// \author Laurent Aphecetche
+//  Author Laurent Aphecetche
 
 #ifndef AliMUON2DMAP_H
 #define AliMUON2DMAP_H
@@ -20,26 +20,32 @@ class AliMpExMap;
 class AliMUON2DMap : public AliMUONV2DStore
 {
 public:
-  AliMUON2DMap();  
+  AliMUON2DMap(Bool_t optimizeForDEManu=kFALSE);  
   virtual ~AliMUON2DMap();
 
+  AliMUONV2DStore* CloneEmpty() const;
+  
+  /// The returned iterator is owned by the client.
+  AliMUONVDataIterator* Iterator() const;
+  
   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);
-  virtual Bool_t IsOwner() const { return kTRUE; }
+  /// Whether or not this container is the owner of its contents.
+  virtual Bool_t IsOwner() const { return kTRUE; } 
 
   virtual void Print(Option_t* opt="") const;
-
-protected:
+  
   AliMUON2DMap(const AliMUON2DMap& other);
   AliMUON2DMap&  operator = (const AliMUON2DMap& other);
 
 private:
-    void CopyTo(AliMUON2DMap& destination) const;
-  
+  void CopyTo(AliMUON2DMap& destination) const;
+
 private:
-  AliMpExMap* fMap; // Our internal map (an AliMpExMap of AliMpExMaps)
+  AliMpExMap* fMap; ///< Our internal map (an AliMpExMap of AliMpExMaps)
+  Bool_t fOptimizeForDEManu; ///< whether (i,j) pair is supposed to be (DetElemId,ManuId) (allow us to allocate right amount of memory, that's all it does.
   
-  ClassDef(AliMUON2DMap,1) // A 2D container
+  ClassDef(AliMUON2DMap,2) // A 2D container
 };
 
 #endif