X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUON1DMap.cxx;h=f61c6ba517950bb325478153207e94748faa6bb1;hb=257f0eee1768a2fce3261c00d1abba5bec687da0;hp=07599e620b2e16011628c311dfe69ad4c07de93d;hpb=7332f2137636d05e01a719ff4e7b21a214894a29;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUON1DMap.cxx b/MUON/AliMUON1DMap.cxx index 07599e620b2..f61c6ba5179 100644 --- a/MUON/AliMUON1DMap.cxx +++ b/MUON/AliMUON1DMap.cxx @@ -16,8 +16,8 @@ // $Id$ #include "AliMUON1DMap.h" -#include "AliMUON1DMapIterator.h" #include "AliMpExMap.h" +#include "AliMpExMapIterator.h" #include "AliLog.h" @@ -34,18 +34,27 @@ 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(); } //_____________________________________________________________________________