]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: geometry | |
3 | // | |
7005154f | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class AliLVStructure | |
7 | // -------------------- | |
676fb573 | 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 | ||
676fb573 | 14 | #include <globals.hh> |
7c02bbad | 15 | //#include <g4rw/tpordvec.h> |
16 | #include <g4std/vector> | |
676fb573 | 17 | |
c97337f9 | 18 | class G4LogicalVolume; |
7c02bbad | 19 | class AliLVStructure; |
20 | ||
21 | typedef G4std::vector<AliLVStructure*> LVStructuresVector; | |
22 | typedef G4std::vector<G4LogicalVolume*> LogicalVolumesVector; | |
c97337f9 | 23 | |
676fb573 | 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 | |
cbac26a9 | 38 | void AddNewVolume(G4LogicalVolume* lv, const G4String& treeStructure); |
676fb573 | 39 | void ListTree() const; |
40 | void ListTreeLong() const; | |
41 | ||
42 | // set methods | |
43 | void SetVerboseLevel(G4int verbose); | |
2b49a442 | 44 | #ifdef G4VIS_USE |
676fb573 | 45 | void SetTreeVisibility(G4bool visibility); |
cbac26a9 | 46 | void SetTreeColour(const G4String& colName); |
676fb573 | 47 | #endif |
48 | ||
49 | // get methods | |
cbac26a9 | 50 | G4LogicalVolume* GetVolume(const G4String& name) const; |
51 | G4LogicalVolume* FindVolume(const G4String& name) const; | |
676fb573 | 52 | |
53 | protected: | |
54 | AliLVStructure(); | |
55 | ||
56 | private: | |
57 | // methods | |
cbac26a9 | 58 | AliLVStructure* FindSubDirectory(const G4String& subDir) const; |
59 | G4String ExtractDirName(const G4String& path) const; | |
7c02bbad | 60 | void ClearAndDestroy(LVStructuresVector* structures); |
676fb573 | 61 | |
62 | // data members | |
7c02bbad | 63 | LVStructuresVector fStructures; //vector of contained structures |
64 | LogicalVolumesVector fLogicalVolumes; //vector of contained logical volumes | |
65 | //(parallel to fStructures) | |
676fb573 | 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 |