**************************************************************************/
// $Id$
-//
-// ----------------------------
+
+//-----------------------------------------------------------------------------
// Class AliMUONGeometryTransformer
// ----------------------------
// Top container class for geometry transformations
// Author: Ivana Hrivnacova, IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMUONGeometryTransformer.h"
#include "AliMUONGeometryModuleTransformer.h"
#include "AliMpDEManager.h"
#include "AliMpConstants.h"
#include "AliMpExMap.h"
+#include "AliMpCDB.h"
#include "AliLog.h"
#include "AliAlignObjMatrix.h"
// private methods
//
+//_____________________________________________________________________________
+Bool_t AliMUONGeometryTransformer::LoadMapping() const
+{
+/// Load mapping from CDB
+
+ if ( ! AliMpCDB::LoadMpSegmentation() )
+ {
+ AliFatal("Could not access mapping from OCDB !");
+ return false;
+ }
+
+ return true;
+}
+
//_____________________________________________________________________________
AliMUONGeometryModuleTransformer*
AliMUONGeometryTransformer::GetModuleTransformerNonConst(
// Set matrix from physical node
TGeoHMatrix* matrix = AliGeomManager::GetMatrix(symname);
- if ( !matrix ) {
+ if ( ! matrix ) {
AliErrorStream() << "Geometry module matrix not found." << endl;
return false;
}
// Set global matrix from physical node
TGeoHMatrix* globalMatrix = AliGeomManager::GetMatrix(symname);
- if ( !matrix ) {
+ if ( ! globalMatrix ) {
AliErrorStream() << "Detection element matrix not found." << endl;
return false;
}
/// Create modules and their detection elements using info from mapping;
/// but do not fill matrices
+ // Load mapping as its info is used to define modules & DEs
+ LoadMapping();
// Loop over geometry module
for (Int_t moduleId = 0; moduleId < AliMpConstants::NofGeomModules(); ++moduleId ) {