X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONGeometry.cxx;h=f7727aef855762c0959d7d85612ac604db0a0cd5;hb=3472a634679ee314189303ad7defa9a42e45fff1;hp=26732fa6b87d51e3505a491d10fc45bfffab7f41;hpb=e5df8ea1a460ec0b3c291adae7d02dcc8ec4782e;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONGeometry.cxx b/MUON/AliMUONGeometry.cxx index 26732fa6b87..f7727aef855 100644 --- a/MUON/AliMUONGeometry.cxx +++ b/MUON/AliMUONGeometry.cxx @@ -14,28 +14,32 @@ **************************************************************************/ // $Id$ -// + +//----------------------------------------------------------------------------- // Class AliMUONGeometry // ---------------------------- // Manager class for geometry construction via geometry builders. -// // Author: Ivana Hrivnacova, IPN Orsay - -#include - -#include -#include -#include +//----------------------------------------------------------------------------- #include "AliMUONGeometry.h" #include "AliMUONGeometryTransformer.h" #include "AliMUONGeometryModule.h" -#include "AliMUONGeometrySVMap.h" -#include "AliMUONGeometryStore.h" +#include "AliMUONStringIntMap.h" + +#include "AliMpDEManager.h" + #include "AliLog.h" +#include +#include +#include + +#include +/// \cond CLASSIMP ClassImp(AliMUONGeometry) +/// \endcond //______________________________________________________________________________ AliMUONGeometry::AliMUONGeometry(Bool_t isOwner) @@ -51,7 +55,8 @@ AliMUONGeometry::AliMUONGeometry(Bool_t isOwner) fModules->SetOwner(isOwner); // Geometry parametrisation - fTransformer = new AliMUONGeometryTransformer(false); + fTransformer = new AliMUONGeometryTransformer(); + fTransformer->SetOwner(false); } //______________________________________________________________________________ @@ -63,15 +68,6 @@ AliMUONGeometry::AliMUONGeometry() /// Default constructor } -//______________________________________________________________________________ -AliMUONGeometry::AliMUONGeometry(const AliMUONGeometry& right) - : TObject(right) -{ -/// Copy constructor (not implemented) - - AliFatal("Copy constructor not provided."); -} - //______________________________________________________________________________ AliMUONGeometry::~AliMUONGeometry() { @@ -81,20 +77,6 @@ AliMUONGeometry::~AliMUONGeometry() delete fTransformer; } -//______________________________________________________________________________ -AliMUONGeometry& -AliMUONGeometry::operator=(const AliMUONGeometry& right) -{ -/// Assignement operator (not implemented) - - // check assignement to self - if (this == &right) return *this; - - AliFatal("Assignement operator not provided."); - - return *this; -} - // // private methods // @@ -103,8 +85,7 @@ AliMUONGeometry::operator=(const AliMUONGeometry& right) TString AliMUONGeometry::ComposePath(const TString& volName, Int_t copyNo) const { -// Compose path from given volName and copyNo -// --- +/// Compose path from given volName and copyNo TString path(volName); path += "."; @@ -117,11 +98,10 @@ TString AliMUONGeometry::ComposePath(const TString& volName, void AliMUONGeometry::FillData3(const TString& sensVolumePath, Int_t detElemId) { -// Fill the mapping of the sensitive volume path to the detection element. -// --- +/// Fill the mapping of the sensitive volume path to the detection element. // Module Id - Int_t moduleId = AliMUONGeometryStore::GetModuleId(detElemId); + Int_t moduleId = AliMpDEManager::GetGeomModuleId(detElemId); // Get module AliMUONGeometryModule* module @@ -135,7 +115,7 @@ void AliMUONGeometry::FillData3(const TString& sensVolumePath, } // Get module sensitive volumes map - AliMUONGeometrySVMap* svMap = module->GetSVMap(); + AliMUONStringIntMap* svMap = module->GetSVMap(); // Map the sensitive volume to detection element svMap->Add(sensVolumePath, detElemId); @@ -144,9 +124,8 @@ void AliMUONGeometry::FillData3(const TString& sensVolumePath, //______________________________________________________________________________ TString AliMUONGeometry::ReadData3(ifstream& in) { -// Reads SV maps from a file -// Returns true, if reading finished correctly. -// --- +/// Read SV maps from a file. +/// Return true, if reading finished correctly. TString key("SV"); while ( key == TString("SV") ) { @@ -175,17 +154,16 @@ TString AliMUONGeometry::ReadData3(ifstream& in) //______________________________________________________________________________ void AliMUONGeometry::WriteData3(ofstream& out) const { -// Writes association of sensitive volumes and detection elements -// from the sensitive volume map -// --- +/// Write association of sensitive volumes and detection elements +/// from the sensitive volume map for (Int_t i=0; iGetEntriesFast(); i++) { AliMUONGeometryModule* geometry = (AliMUONGeometryModule*)fModules->At(i); - AliMUONGeometrySVMap* svMap + AliMUONStringIntMap* svMap = geometry->GetSVMap(); - svMap->WriteMap(out); + svMap->Print("SV", out); out << endl; } } @@ -197,7 +175,7 @@ void AliMUONGeometry::WriteData3(ofstream& out) const //_____________________________________________________________________________ void AliMUONGeometry::AddModule(AliMUONGeometryModule* module) { -/// Add the geometrymodule to the array +/// Add the geometry module to the array fModules->Add(module); @@ -209,9 +187,8 @@ void AliMUONGeometry::AddModule(AliMUONGeometryModule* module) Bool_t AliMUONGeometry::ReadSVMap(const TString& fileName) { -// Reads the sensitive volume maps from a file -// Returns true, if reading finished correctly. -// --- +/// Read the sensitive volume maps from a file. +/// Return true, if reading finished correctly. // No reading // if builder is not associated with any geometry module @@ -248,9 +225,8 @@ AliMUONGeometry::ReadSVMap(const TString& fileName) Bool_t AliMUONGeometry::WriteSVMap(const TString& fileName) const { -// Writes sensitive volume map into a file -// Returns true, if writing finished correctly. -// --- +/// Write sensitive volume map into a file. +/// Return true, if writing finished correctly. // No writing // if builder is not associated with any geometry module @@ -297,10 +273,10 @@ AliMUONGeometry::GetModule(Int_t index, Bool_t warn) const const AliMUONGeometryModule* AliMUONGeometry::GetModuleByDEId(Int_t detElemId, Bool_t warn) const { -/// Return the geometry module specified by index +/// Return the geometry module specified by detElemId // Get module index - Int_t index = AliMUONGeometryStore::GetModuleId(detElemId); + Int_t index = AliMpDEManager::GetGeomModuleId(detElemId); return GetModule(index, warn); }