Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4VisManager.h
Go to the documentation of this file.
1#ifndef TG4_VIS_MANAGER_H
2#define TG4_VIS_MANAGER_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4G3Attribute.h"
19
20#include <G4VisManager.hh>
21#include <vector>
22
23#include <Rtypes.h>
24
33
35{
36 public:
38 typedef std::vector<G4LogicalVolume*> LogicalVolumesVector;
39
41 typedef std::vector<G4VPhysicalVolume*> PhysicalVolumesVector;
42
43 public:
44 TG4VisManager(G4int verboseLevel = 0);
45 // Controls initial verbose level of VisManager and VisMessenger.
46 // Can be changed by /vis/set/verbose.
48
49 //----------------------
50 // functions for drawing
51 //----------------------
52 void DrawOneSpec(const char* name); // not implemented
53
54 // see TG4VisManager.cxx for detailed description of Gsatt(), Gdraw()
55 void Gsatt(const char* name, const char* att, Int_t val);
56 void Gdraw(const char* name, Float_t theta, Float_t phi, Float_t psi,
57 Float_t u0, Float_t v0, Float_t ul, Float_t vl);
58 void SetColors();
59
60 private:
65
66 // methods
67 //--------
68 G4bool NeedSetColours();
69 void SetColourFlag(G4bool value);
70
71 // methods used by Gsatt(), Gdraw()
72 //---------------------------------
73
74 G4bool Contains(
75 const LogicalVolumesVector& lvVector, const G4LogicalVolume* lv) const;
76 G4bool Contains(
77 const PhysicalVolumesVector& pvVector, const G4VPhysicalVolume* pv) const;
78
79 // Get the logical volume list corresponding to NAME
80 // Either a logical or physical volume name can be supplied
81 // Clones of G3VOLUME_NUMBER will be atached to the list
82 LogicalVolumesVector GetLVList(G4String name);
83
84 // Get the physical volume list corresponding to NAME
85 PhysicalVolumesVector GetPVList(G4String name);
86
87 // Case insensitive string comparison
88 G4bool CaseInsensitiveEqual(const G4String string1, const G4String string2);
89
90 // Return true if the vis. attributes pointer corresponding to the
91 // selected volume is shared by others. In this case, duplication
92 // of those is mandatory
93 G4bool IsSharedVisAttributes(const G4LogicalVolume* pLV);
94
95 // Set an attribute to a specific volume
96 void SetG4Attribute(
97 G4LogicalVolume* const lv, const TG4G3Attribute att, const G4int val);
98 // Set an attribute to the tree coresponding to a volume
100 G4LogicalVolume* const lv, const TG4G3Attribute att, const G4int val);
101
102 // data members
103 //------------
104 G4bool fColourFlag;
106};
107
108// inline methods
109
111{
113 return fColourFlag;
114}
115
116inline void TG4VisManager::SetColourFlag(G4bool value)
117{
119 fColourFlag = value;
120}
121
122#endif // TG4_VIS_MANAGER_H
Definition of the enumeration TG4G3Attribute.
Visualization manager class.
std::vector< G4LogicalVolume * > LogicalVolumesVector
The vector of G4 logical volumes.
PhysicalVolumesVector GetPVList(G4String name)
LogicalVolumesVector GetLVList(G4String name)
void SetG4Attribute(G4LogicalVolume *const lv, const TG4G3Attribute att, const G4int val)
void SetAtt4Daughters(G4LogicalVolume *const lv, const TG4G3Attribute att, const G4int val)
TG4VisManager(const TG4VisManager &right)
Not implemented.
void Gsatt(const char *name, const char *att, Int_t val)
G4bool IsSharedVisAttributes(const G4LogicalVolume *pLV)
void DrawOneSpec(const char *name)
TG4VisManager & operator=(const TG4VisManager &right)
Not implemented.
G4bool Contains(const LogicalVolumesVector &lvVector, const G4LogicalVolume *lv) const
G4bool fColourFlag
colour flag
G4bool NeedSetColours()
G4int fVerboseLevel
verbose level
void Gdraw(const char *name, Float_t theta, Float_t phi, Float_t psi, Float_t u0, Float_t v0, Float_t ul, Float_t vl)
void SetColourFlag(G4bool value)
std::vector< G4VPhysicalVolume * > PhysicalVolumesVector
The vector of G4 physical volumes.
G4bool CaseInsensitiveEqual(const G4String string1, const G4String string2)
TG4VisManager(G4int verboseLevel=0)
TG4G3Attribute
Enumeration type for G3 visualization attributes.