#include "AliMpIntPair.h"
#include "AliMpManuList.h"
#include "AliMpDEManager.h"
-#include "AliMUONConstants.h"
+#include "AliMpConstants.h"
+#include <TList.h>
/// \class AliMUON2DMap
-/// \brief Basic implementation of AliMUONV2DStore container using
+/// Basic implementation of AliMUONV2DStore container using
/// AliMpExMap internally.
/// What we store is a "double" map : an AliMpExMap of AliMpExMaps
///
if ( fOptimizeForDEManu )
{
Int_t nDEs(0);
- for ( Int_t i = 0; i < AliMUONConstants::NTrackingCh(); ++i )
+ for ( Int_t i = 0; i < AliMpConstants::NofTrackingChambers(); ++i )
{
nDEs += AliMpDEManager::GetNofDEInChamber(i);
}
return 0x0;
}
+//_____________________________________________________________________________
+AliMUONV2DStore*
+AliMUON2DMap::Generate(const TObject& object)
+{
+ /// Build a complete (i.e. all detElemId,manuId couple will be there) store
+ /// but with identical values, given by object
+ /// The returned store will be obviously optimized for DEManu.
+
+ AliMUONV2DStore* store = new AliMUON2DMap(true);
+
+ TList* list = AliMpManuList::ManuList();
+
+ AliMpIntPair* pair;
+
+ TIter next(list);
+
+ while ( ( pair = static_cast<AliMpIntPair*>(next()) ) )
+ {
+ Int_t detElemId = pair->GetFirst();
+ Int_t manuId = pair->GetSecond();
+ store->Set(detElemId,manuId,object.Clone(),kFALSE);
+ }
+
+ delete list;
+
+ return store;
+}
+
//_____________________________________________________________________________
Bool_t
AliMUON2DMap::Set(Int_t i, Int_t j, TObject* object, Bool_t replace)