]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUON2DMap.h
AliMUONRecoParam:
[u/mrichter/AliRoot.git] / MUON / AliMUON2DMap.h
CommitLineData
f6e5d0e9 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2* See cxx source for full Copyright notice */
3
4// $Id$
5
46df088d 6/// \ingroup core
f6e5d0e9 7/// \class AliMUON2DMap
4178b5c7 8/// \brief Basic implementation of AliMUONVStore container using
e5cc543e 9/// AliMpExMap internally.
f6e5d0e9 10///
5398f946 11// Author Laurent Aphecetche
f6e5d0e9 12
13#ifndef AliMUON2DMAP_H
14#define AliMUON2DMAP_H
15
4178b5c7 16#include "AliMUONVStore.h"
f6e5d0e9 17
18class AliMpExMap;
19
4178b5c7 20class AliMUON2DMap : public AliMUONVStore
f6e5d0e9 21{
22public:
d91c6144 23 AliMUON2DMap(Bool_t optimizeForDEManu=kFALSE);
4178b5c7 24 AliMUON2DMap(const AliMUON2DMap& other);
25 AliMUON2DMap& operator = (const AliMUON2DMap& other);
f6e5d0e9 26 virtual ~AliMUON2DMap();
27
4178b5c7 28 virtual Bool_t Add(TObject* object);
29
30 /// Mandatory methods from TCollection
31 virtual void Clear(Option_t* opt="");
32
33 /// Whether the Connect(TTree&) method is implemented
34 virtual Bool_t CanConnect() const { return kFALSE; }
35
36 virtual AliMUONVStore* Create() const;
d91c6144 37
f246123b 38 /// The returned iterator is owned by the client.
4178b5c7 39 virtual TIterator* CreateIterator() const;
40
41 /// Iterate on part of the store (only for (i,j) where firstI<=i<=lastI
42 TIterator* CreateIterator(Int_t firstI, Int_t lastI) const;
43
44 using AliMUONVStore::FindObject;
f246123b 45
4178b5c7 46 virtual TObject* FindObject(Int_t i, Int_t j) const;
f6e5d0e9 47
4178b5c7 48 /// Whether our internal storage is optimize to store (detection element id, manu id)
49 Bool_t IsOptimizedForDEManu() const { return fOptimizeForDEManu; }
50
51 virtual Int_t GetSize() const;
52
53 virtual Int_t GetSize(Int_t i) const;
9d5f6a64 54
55private:
4178b5c7 56 Bool_t Set(Int_t i, Int_t j, TObject* object, Bool_t replace);
f246123b 57
f6e5d0e9 58private:
7332f213 59 static const Int_t fgkOptimalSizeForDEManu; ///< Optimal size for DEManu
60
18b6b8c7 61 AliMpExMap* fMap; ///< Our internal map (an AliMpExMap of AliMpExMaps)
d91c6144 62 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.
f6e5d0e9 63
d91c6144 64 ClassDef(AliMUON2DMap,2) // A 2D container
f6e5d0e9 65};
66
67#endif