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