1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 #include "AliMUON2DMap.h"
21 #include "AliMpExMap.h"
25 ClassImp(AliMUON2DMap)
27 //_____________________________________________________________________________
28 AliMUON2DMap::AliMUON2DMap() : AliMUONV2DStore(), fMap(new AliMpExMap(true))
32 //_____________________________________________________________________________
33 AliMUON2DMap::~AliMUON2DMap()
38 //_____________________________________________________________________________
40 AliMUON2DMap::Get(Int_t i, Int_t j) const
42 TObject* o = fMap->GetValue(i);
45 AliMpExMap* m = dynamic_cast<AliMpExMap*>(o);
46 if (!m) AliFatal(Form("fMap[%d] not of the expected type",i));
47 return m->GetValue(j);
52 //_____________________________________________________________________________
54 AliMUON2DMap::IsOwner() const
59 //_____________________________________________________________________________
61 AliMUON2DMap::Print(Option_t*) const
66 //_____________________________________________________________________________
68 AliMUON2DMap::Set(Int_t i, Int_t j, TObject* object, Bool_t replace)
70 TObject* o = fMap->GetValue(i);
73 AliMpExMap* m = new AliMpExMap(true);
75 o = fMap->GetValue(i);
78 AliMpExMap* m = dynamic_cast<AliMpExMap*>(o);
79 if (!m) AliFatal(Form("fMap[%d] not of the expected type",i));
81 if ( !o || ( o && replace ) )
89 else if ( o && !replace )
91 AliError(Form("Object %p is already there for (i,j)=(%d,%d)",o,i,j));