]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometryDetElement.cxx
Include EAs from offline c3 fits
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryDetElement.cxx
index 930fb24000b97fc460e08bb563a34c5b5bce1d9b..d4d9e5663de8f318a71b7a94d299d4c65b0dee93 100644 (file)
  **************************************************************************/
 
 // $Id$
-//
-// --------------------------------------
+
+//-----------------------------------------------------------------------------
 // Class AliMUONGeometryDetElement
 // --------------------------------------
 // The class defines the detection element.
 // Author: Ivana Hrivnacova, IPN Orsay
+//-----------------------------------------------------------------------------
 
 #include "AliMUONGeometryDetElement.h"
 
 
 #include <sstream>
 
+using std::cout;
+using std::endl;
+using std::string;
 /// \cond CLASSIMP
 ClassImp(AliMUONGeometryDetElement)
 /// \endcond
 
-const TString AliMUONGeometryDetElement::fgkDENamePrefix = "DE";
+//
+// static methods
+//
+
+//______________________________________________________________________________
+const TString& AliMUONGeometryDetElement::GetDENamePrefix()
+{
+  ///< Geometry DE name prefix
+  static const TString kDENamePrefix = "DE";
+  return kDENamePrefix;
+}  
 
 //______________________________________________________________________________
 TString AliMUONGeometryDetElement::GetDEName(Int_t detElemId)
 {
 /// Return the module name for given moduleId
 
-  TString deName(fgkDENamePrefix);
+  TString deName(GetDENamePrefix());
   deName += detElemId;
   return deName;
 }   
@@ -242,14 +256,17 @@ void  AliMUONGeometryDetElement::Local2Global(
 
 //______________________________________________________________________________
 void AliMUONGeometryDetElement::SetLocalTransformation(
-                                                const TGeoHMatrix& transform)
+                                                const TGeoHMatrix& transform, 
+                                                Bool_t warn)
 { 
 /// Set local transformation;
 /// give warning if the global transformation is already defined.
  
-  if (fLocalTransformation) {
+  if ( fLocalTransformation ) {
     delete fLocalTransformation;
-    AliWarning("Local transformation already defined was deleted.");
+    if ( warn ) {
+      AliWarning("Local transformation already defined was deleted.");
+    }  
   }  
 
   fLocalTransformation = new TGeoHMatrix(transform);
@@ -257,14 +274,17 @@ void AliMUONGeometryDetElement::SetLocalTransformation(
                                              
 //______________________________________________________________________________
 void AliMUONGeometryDetElement::SetGlobalTransformation(
-                                                const TGeoHMatrix& transform)
+                                                const TGeoHMatrix& transform,
+                                                Bool_t warn)
 { 
 /// Set global transformation;
 /// give warning if the global transformation is already defined.
  
   if (fGlobalTransformation) {
     delete fGlobalTransformation;
-    AliWarning("Global transformation already defined was deleted.");
+    if ( warn ) {
+      AliWarning("Global transformation already defined was deleted.");
+    }  
   }  
 
   fGlobalTransformation = new TGeoHMatrix(transform);