2 // Category: visualization
4 // G4VisManager derived class that takes care of registering
5 // graphics syystem and provides
6 // Geant4 implementation of the MonteCarlo interface methods
9 #ifndef TG4_VIS_MANAGER_H
10 #define TG4_VIS_MANAGER_H
13 #include "TG4G3Attribute.h"
15 #include <G4VisManager.hh>
16 #include <g4rw/tpordvec.h>
20 class TG4VisManager: public G4VisManager
23 TG4VisManager(G4int verboseLevel = 0);
24 // Controls initial verbose level of VisManager and VisMessenger.
25 // Can be changed by /vis/set/verbose.
27 // TG4VisManager(const TG4VisManager& right);
28 virtual ~TG4VisManager();
30 //----------------------
31 // functions for drawing
32 //----------------------
33 void DrawOneSpec(const char* name); // not implemented
35 // see TG4VisManager.cxx for detailed description of Gsatt(), Gdraw()
36 void Gsatt(const char* name, const char* att, Int_t val);
37 void Gdraw(const char* name, Float_t theta , Float_t phi,
38 Float_t psi, Float_t u0, Float_t v0, Float_t ul,
43 TG4VisManager(const TG4VisManager& right);
46 TG4VisManager& operator=(const TG4VisManager& right);
51 void RegisterGraphicsSystems();
52 G4bool NeedSetColours();
53 void SetColourFlag(G4bool value);
55 // methods used by Gsatt(), Gdraw()
56 //---------------------------------
58 // Get the logical volume list corresponding to NAME
59 // Either a logical or physical volume name can be supplied
60 // Clones of G3VOLUME_NUMBER will be atached to the list
61 G4RWTPtrOrderedVector<G4LogicalVolume> GetLVList(G4String name);
63 // Get the physical volume list corresponding to NAME
64 G4RWTPtrOrderedVector<G4VPhysicalVolume> GetPVList(G4String name);
66 // Case insensitive string comparison
67 G4bool CaseInsensitiveEqual(const G4String string1,
68 const G4String string2);
70 // Return true if the vis. attributes pointer corresponding to the
71 // selected volume is shared by others. In this case, duplication
72 // of those is mandatory
73 G4bool IsSharedVisAttributes(const G4LogicalVolume* pLV);
75 // Set an attribute to a specific volume
76 void SetG4Attribute(G4LogicalVolume* const lv, const TG4G3Attribute att,
78 // Set an attribute to the tree coresponding to a volume
79 void SetAtt4Daughters(G4LogicalVolume* const lv, const TG4G3Attribute att,
84 G4bool fColourFlag; //colour flag
89 inline G4bool TG4VisManager::NeedSetColours()
90 { return fColourFlag; }
92 inline void TG4VisManager::SetColourFlag(G4bool value)
93 { fColourFlag = value; }
97 #endif //TG4_VIS_MANAGER_H