1 | |
---|
2 | // this : |
---|
3 | #include <G4Lab/Tree.h> |
---|
4 | |
---|
5 | // Geant4 : |
---|
6 | #include <G4PhysicalVolumeStore.hh> |
---|
7 | #include <G4VPhysicalVolume.hh> |
---|
8 | #include <G4LogicalVolume.hh> |
---|
9 | |
---|
10 | ////////////////////////////////////////////////////////////////////////////// |
---|
11 | G4Lab::XML_VisitedVolume::XML_VisitedVolume( |
---|
12 | std::string& aOut |
---|
13 | ) |
---|
14 | :fOut(aOut) |
---|
15 | ////////////////////////////////////////////////////////////////////////////// |
---|
16 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// |
---|
17 | { |
---|
18 | } |
---|
19 | ////////////////////////////////////////////////////////////////////////////// |
---|
20 | G4Lab::XML_VisitedVolume::~XML_VisitedVolume( |
---|
21 | ) |
---|
22 | ////////////////////////////////////////////////////////////////////////////// |
---|
23 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// |
---|
24 | { |
---|
25 | } |
---|
26 | ////////////////////////////////////////////////////////////////////////////// |
---|
27 | G4Lab::IVisitedVolume::Status G4Lab::XML_VisitedVolume::beginVolume( |
---|
28 | G4VPhysicalVolume* aPV |
---|
29 | ,G4VSolid* |
---|
30 | ,G4Material* |
---|
31 | ,const G4Transform3D& |
---|
32 | ,int |
---|
33 | ) |
---|
34 | ////////////////////////////////////////////////////////////////////////////// |
---|
35 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// |
---|
36 | { |
---|
37 | if(aPV->IsReplicated()) { |
---|
38 | if(aPV->GetCopyNo()==0) { //Do only the first copy. |
---|
39 | fOut += "<treeItem><label>"; |
---|
40 | fOut += aPV->GetName(); |
---|
41 | fOut += "</label>"; |
---|
42 | return IVisitedVolume::DAUGHTERS; |
---|
43 | } else { |
---|
44 | return IVisitedVolume::SIBLING; |
---|
45 | } |
---|
46 | } else { |
---|
47 | fOut += "<treeItem><label>"; |
---|
48 | fOut += aPV->GetName(); |
---|
49 | fOut += "</label>"; |
---|
50 | return IVisitedVolume::DAUGHTERS; |
---|
51 | } |
---|
52 | } |
---|
53 | ////////////////////////////////////////////////////////////////////////////// |
---|
54 | void G4Lab::XML_VisitedVolume::endVolume( |
---|
55 | G4VPhysicalVolume* aPV |
---|
56 | ) |
---|
57 | ////////////////////////////////////////////////////////////////////////////// |
---|
58 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// |
---|
59 | { |
---|
60 | if(aPV->IsReplicated()) { |
---|
61 | if(aPV->GetCopyNo()==0) { |
---|
62 | fOut += "</treeItem>"; |
---|
63 | } else { |
---|
64 | } |
---|
65 | } else { |
---|
66 | fOut += "</treeItem>"; |
---|
67 | } |
---|
68 | } |
---|
69 | ////////////////////////////////////////////////////////////////////////////// |
---|
70 | void G4Lab::XML_VisitedVolume::beginDaughters( |
---|
71 | G4VPhysicalVolume* |
---|
72 | ,int |
---|
73 | ) |
---|
74 | ////////////////////////////////////////////////////////////////////////////// |
---|
75 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// |
---|
76 | { |
---|
77 | } |
---|
78 | ////////////////////////////////////////////////////////////////////////////// |
---|
79 | void G4Lab::XML_VisitedVolume::endDaughters( |
---|
80 | G4VPhysicalVolume* |
---|
81 | ,int |
---|
82 | ) |
---|
83 | ////////////////////////////////////////////////////////////////////////////// |
---|
84 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// |
---|
85 | { |
---|
86 | } |
---|