]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Added static mathod GetDEName(detElemId)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Jun 2007 16:27:16 +0000 (16:27 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Jun 2007 16:27:16 +0000 (16:27 +0000)
- Implemented default ctor replaced with RootIOCtor

MUON/AliMUONGeometryDetElement.cxx
MUON/AliMUONGeometryDetElement.h

index c4c7e2ed466f3b24cc2e1717c0c8f26a026e5212..930fb24000b97fc460e08bb563a34c5b5bce1d9b 100644 (file)
@@ -36,12 +36,35 @@ ClassImp(AliMUONGeometryDetElement)
 
 const TString AliMUONGeometryDetElement::fgkDENamePrefix = "DE";
 
+//______________________________________________________________________________
+TString AliMUONGeometryDetElement::GetDEName(Int_t detElemId)
+{
+/// Return the module name for given moduleId
+
+  TString deName(fgkDENamePrefix);
+  deName += detElemId;
+  return deName;
+}   
+
+//______________________________________________________________________________
+AliMUONGeometryDetElement::AliMUONGeometryDetElement(Int_t detElemId)
+ : TObject(),
+   fDEName(GetDEName(detElemId)),
+   fVolumePath(),
+   fLocalTransformation(0),
+   fGlobalTransformation(0)
+{ 
+/// Standard constructor
+
+  SetUniqueID(detElemId);
+}
+
 //______________________________________________________________________________
 AliMUONGeometryDetElement::AliMUONGeometryDetElement(
                                         Int_t detElemId,
                                         const TString& volumePath)
  : TObject(),
-   fDEName(),
+   fDEName(GetDEName(detElemId)),
    fVolumePath(volumePath),
    fLocalTransformation(0),
    fGlobalTransformation(0)
@@ -49,20 +72,17 @@ AliMUONGeometryDetElement::AliMUONGeometryDetElement(
 /// Standard constructor
 
   SetUniqueID(detElemId);
-  
-  fDEName = fgkDENamePrefix;
-  fDEName += detElemId;
 }
 
 //______________________________________________________________________________
-AliMUONGeometryDetElement::AliMUONGeometryDetElement()
+AliMUONGeometryDetElement::AliMUONGeometryDetElement(TRootIOCtor* /*ioCtor*/)
  : TObject(),
    fDEName(),
    fVolumePath(),
    fLocalTransformation(0),
    fGlobalTransformation(0)
 {
-/// Default constructor
+/// Root IO constructor
 }
 
 //______________________________________________________________________________
index 87b78e703d685402d641930921d2a1690d44ef64..22040cbcb9187ec394a1c594c1d93687868186d6 100644 (file)
@@ -20,13 +20,14 @@ class TGeoHMatrix;
 class AliMUONGeometryDetElement : public TObject
 {
   public:
-    AliMUONGeometryDetElement(Int_t detElemId,
-                              const TString& volumePath);
-    AliMUONGeometryDetElement();
+    AliMUONGeometryDetElement(Int_t detElemId);
+    AliMUONGeometryDetElement(Int_t detElemId, const TString& volumePath);
+    AliMUONGeometryDetElement(TRootIOCtor* /*ioCtor*/);
     virtual ~AliMUONGeometryDetElement();
 
     // static methods
     static TString GetDENamePrefix();
+    static TString GetDEName(Int_t detElemId);
 
     // methods
     void Global2Local(
@@ -60,6 +61,8 @@ class AliMUONGeometryDetElement : public TObject
     const TGeoHMatrix*  GetGlobalTransformation() const;
 
   protected:
+    /// Not implemented
+    AliMUONGeometryDetElement();
     /// Not implemented
     AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
     /// Not implemented
@@ -70,7 +73,7 @@ class AliMUONGeometryDetElement : public TObject
     void PrintTransform(const TGeoHMatrix* transform) const;
  
      // static data members
-    static const TString  fgkDENamePrefix; ///< Geometry module name prefix
+    static const TString  fgkDENamePrefix;///< Geometry module name prefix
  
     // data members
     TString       fDEName;     ///< detection element name