]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - AliGeant4/AliLVStructure.h
Moved from AliTransbit to AliL3Transbit.
[u/mrichter/AliRoot.git] / AliGeant4 / AliLVStructure.h
index 0723c35eb14fb560992f63cca376075339d30a1c..5ccf98cfdd7e722a45862617e4f198e12d67cfcb 100644 (file)
@@ -1,6 +1,10 @@
 // $Id$
 // Category: geometry
 //
+// Author: I. Hrivnacova
+//
+// Class AliLVStructure
+// --------------------
 // Class that associates the name tree with logical volumes tree. 
 // Used for printing volumes trees.  
 
@@ -8,9 +12,14 @@
 #define ALI_LV_STRUCTURE_H
 
 #include <globals.hh>
-#include <g4rw/tpordvec.h>
+//#include <g4rw/tpordvec.h>
+#include <g4std/vector>
 
 class G4LogicalVolume;
+class AliLVStructure;
+
+typedef G4std::vector<AliLVStructure*>  LVStructuresVector;
+typedef G4std::vector<G4LogicalVolume*> LogicalVolumesVector;
 
 class AliLVStructure 
 {
@@ -26,37 +35,34 @@ class AliLVStructure
     G4int operator==(const AliLVStructure &right) const;
 
     // methods
-    void AddNewVolume(G4LogicalVolume* lv, G4String treeStructure);
+    void AddNewVolume(G4LogicalVolume* lv, const G4String& treeStructure);
     void ListTree() const;
     void ListTreeLong() const;
 
     // set methods
     void SetVerboseLevel(G4int verbose); 
-#ifdef ALICE_VISUALIZE
+#ifdef G4VIS_USE
     void SetTreeVisibility(G4bool visibility);       
-    void SetTreeColour(G4String colName);
+    void SetTreeColour(const G4String& colName);
 #endif             
 
     // get methods
-    G4LogicalVolume* GetVolume(G4String name);
-    G4LogicalVolume* FindVolume(G4String name);
+    G4LogicalVolume* GetVolume(const G4String& name) const;
+    G4LogicalVolume* FindVolume(const G4String& name) const;
 
   protected:
     AliLVStructure(); 
 
   private:
     // methods
-    AliLVStructure* FindSubDirectory(G4String subDir);
-    G4String ExtractDirName(G4String path);
+    AliLVStructure* FindSubDirectory(const G4String& subDir) const;
+    G4String ExtractDirName(const G4String& path) const;
+    void ClearAndDestroy(LVStructuresVector* structures); 
 
     // data members
-    G4RWTPtrOrderedVector<AliLVStructure>   fStructures;                     //.
-                                                //vector of
-                                                //contained structures
-    G4RWTPtrOrderedVector<G4LogicalVolume>  fLogicalVolumes;                 //.
-                                                //vector of
-                                                //contained logical volumes
-                                               //(parallel to fStructures)
+    LVStructuresVector    fStructures;     //vector of contained structures
+    LogicalVolumesVector  fLogicalVolumes; //vector of contained logical volumes
+                                          //(parallel to fStructures)
     G4String  fPathName;     //full path name
     G4String  fDirName;      //directory name
     G4int     fVerboseLevel; //verbose level