]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliLVStructure.h
Moved from AliTransbit to AliL3Transbit.
[u/mrichter/AliRoot.git] / AliGeant4 / AliLVStructure.h
1 // $Id$
2 // Category: geometry
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class AliLVStructure
7 // --------------------
8 // Class that associates the name tree with logical volumes tree. 
9 // Used for printing volumes trees.  
10
11 #ifndef ALI_LV_STRUCTURE_H
12 #define ALI_LV_STRUCTURE_H
13
14 #include <globals.hh>
15 //#include <g4rw/tpordvec.h>
16 #include <g4std/vector>
17
18 class G4LogicalVolume;
19 class AliLVStructure;
20
21 typedef G4std::vector<AliLVStructure*>  LVStructuresVector;
22 typedef G4std::vector<G4LogicalVolume*> LogicalVolumesVector;
23
24 class AliLVStructure 
25 {
26   public:
27     AliLVStructure(G4String aPath);
28     AliLVStructure(const AliLVStructure& right);
29     // --> protected 
30     // AliLVStructure();
31     virtual ~AliLVStructure();
32
33     // operators
34     AliLVStructure& operator=(const AliLVStructure& right);
35     G4int operator==(const AliLVStructure &right) const;
36
37     // methods
38     void AddNewVolume(G4LogicalVolume* lv, const G4String& treeStructure);
39     void ListTree() const;
40     void ListTreeLong() const;
41
42     // set methods
43     void SetVerboseLevel(G4int verbose); 
44 #ifdef G4VIS_USE
45     void SetTreeVisibility(G4bool visibility);       
46     void SetTreeColour(const G4String& colName);
47 #endif             
48
49     // get methods
50     G4LogicalVolume* GetVolume(const G4String& name) const;
51     G4LogicalVolume* FindVolume(const G4String& name) const;
52
53   protected:
54     AliLVStructure(); 
55
56   private:
57     // methods
58     AliLVStructure* FindSubDirectory(const G4String& subDir) const;
59     G4String ExtractDirName(const G4String& path) const;
60     void ClearAndDestroy(LVStructuresVector* structures); 
61
62     // data members
63     LVStructuresVector    fStructures;     //vector of contained structures
64     LogicalVolumesVector  fLogicalVolumes; //vector of contained logical volumes
65                                            //(parallel to fStructures)
66     G4String  fPathName;     //full path name
67     G4String  fDirName;      //directory name
68     G4int     fVerboseLevel; //verbose level
69 };
70
71 #endif //ALI_LV_STRUCTURE_H
72