X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUON2DMap.cxx;h=bfb129c2cb0face84273948b944a84e553413184;hb=39cb73ca2d0266a624d683a2e78f2a8708ebc139;hp=5f2ffe7895e38c62bfa03144e34610d5a6d150a1;hpb=4178b5c7ed8261863bd588cdd933cc6a20452437;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUON2DMap.cxx b/MUON/AliMUON2DMap.cxx index 5f2ffe7895e..bfb129c2cb0 100644 --- a/MUON/AliMUON2DMap.cxx +++ b/MUON/AliMUON2DMap.cxx @@ -21,16 +21,15 @@ #include "AliMUON2DMapIterator.h" #include "AliMUON2DMapIteratorByI.h" #include "AliMpExMap.h" -#include "AliMpManuList.h" -#include "AliMpDEManager.h" -#include "AliMpConstants.h" +//----------------------------------------------------------------------------- /// \class AliMUON2DMap /// Basic implementation of AliMUONVStore container using /// AliMpExMap internally. /// What we store is a "double" map : an AliMpExMap of AliMpExMaps /// /// \author Laurent Aphecetche +//----------------------------------------------------------------------------- /// \cond CLASSIMP ClassImp(AliMUON2DMap) @@ -140,7 +139,7 @@ AliMUON2DMap::CreateIterator() const // Returned iterator must be deleted by user. if ( fMap ) { - return new AliMUON2DMapIterator(*fMap); + return new AliMUON2DMapIterator(fMap); } return 0x0; } @@ -169,12 +168,9 @@ AliMUON2DMap::Clear(Option_t*) if ( fOptimizeForDEManu ) { - Int_t nDEs(0); - for ( Int_t i = 0; i < AliMpConstants::NofChambers(); ++i ) - { - nDEs += AliMpDEManager::GetNofDEInChamber(i); - } - fMap->SetSize(nDEs); + fMap->SetSize(228); // hard-coded constant in order not to depend on mapping + // if this number ever change, it will not break the code, simply the + // automatic resizing will give a warning... } } @@ -222,23 +218,12 @@ AliMUON2DMap::Set(Int_t i, Int_t j, TObject* object, Bool_t replace) AliMpExMap* m = new AliMpExMap(true); if ( fOptimizeForDEManu ) { - Int_t n(AliMpManuList::NumberOfManus(i)); - if (!n) - { - AliError(Form("This does not look right : i = %d is supposed to " - "be a DetElemId with n = %d manus!",i,n)); - } - else - { - m->SetSize(n); - } + m->SetSize(451); // same remark as for the SetSize in ctor... } fMap->Add(i,m); o = fMap->GetValue(i); } AliMpExMap* m = static_cast(o); -// AliMpExMap* m = dynamic_cast(o); -// if (!m) AliFatal(Form("fMap[%d] not of the expected type",i)); o = m->GetValue(j);