Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4VisManager Class Reference

Visualization manager class. More...

#include <TG4VisManager.h>

Public Types

typedef std::vector< G4LogicalVolume * > LogicalVolumesVector
 The vector of G4 logical volumes.
 
typedef std::vector< G4VPhysicalVolume * > PhysicalVolumesVector
 The vector of G4 physical volumes.
 

Public Member Functions

 TG4VisManager (G4int verboseLevel=0)
 
 ~TG4VisManager ()
 
void DrawOneSpec (const char *name)
 
void Gsatt (const char *name, const char *att, Int_t val)
 
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 SetColors ()
 

Private Member Functions

 TG4VisManager (const TG4VisManager &right)
 Not implemented.
 
TG4VisManageroperator= (const TG4VisManager &right)
 Not implemented.
 
G4bool NeedSetColours ()
 
void SetColourFlag (G4bool value)
 
G4bool Contains (const LogicalVolumesVector &lvVector, const G4LogicalVolume *lv) const
 
G4bool Contains (const PhysicalVolumesVector &pvVector, const G4VPhysicalVolume *pv) const
 
LogicalVolumesVector GetLVList (G4String name)
 
PhysicalVolumesVector GetPVList (G4String name)
 
G4bool CaseInsensitiveEqual (const G4String string1, const G4String string2)
 
G4bool IsSharedVisAttributes (const G4LogicalVolume *pLV)
 
void SetG4Attribute (G4LogicalVolume *const lv, const TG4G3Attribute att, const G4int val)
 
void SetAtt4Daughters (G4LogicalVolume *const lv, const TG4G3Attribute att, const G4int val)
 

Private Attributes

G4bool fColourFlag
 colour flag
 
G4int fVerboseLevel
 verbose level
 

Detailed Description

Visualization manager class.

G4VisManager provides Geant4 implementation of the TVirtualMC interface methods for visualization.

Author
: I. Hrivnacova, IPN, Orsay; A. Gheata

Definition at line 34 of file TG4VisManager.h.

Member Typedef Documentation

◆ LogicalVolumesVector

std::vector<G4LogicalVolume*> TG4VisManager::LogicalVolumesVector

The vector of G4 logical volumes.

Definition at line 38 of file TG4VisManager.h.

◆ PhysicalVolumesVector

std::vector<G4VPhysicalVolume*> TG4VisManager::PhysicalVolumesVector

The vector of G4 physical volumes.

Definition at line 41 of file TG4VisManager.h.

Constructor & Destructor Documentation

◆ TG4VisManager() [1/2]

TG4VisManager::TG4VisManager ( G4int verboseLevel = 0)

Standard constructor

Definition at line 44 of file TG4VisManager.cxx.

◆ ~TG4VisManager()

TG4VisManager::~TG4VisManager ( )

Destructor

Definition at line 51 of file TG4VisManager.cxx.

◆ TG4VisManager() [2/2]

TG4VisManager::TG4VisManager ( const TG4VisManager & right)
private

Not implemented.

Member Function Documentation

◆ DrawOneSpec()

void TG4VisManager::DrawOneSpec ( const char * name)

Function called when one double-clicks on a volume name in a TPaveLabel drawn by Gdtree

Definition at line 426 of file TG4VisManager.cxx.

Referenced by TGeant4::DrawOneSpec().

◆ Gsatt()

void TG4VisManager::Gsatt ( const char * name,
const char * att,
Int_t val )

Geant3 description :

  • NAME Volume name
  • IOPT Name of the attribute to be set
  • IVAL Value to which the attribute is to be set
  • name= "*" stands for all the volumes.
  • iopt can be chosen among the following : kWORK, kSEEN, kLSTY, kLWID, kCOLO, kFILL, kSET, kDET, kDTYP

Definition at line 506 of file TG4VisManager.cxx.

Referenced by TGeant4::Gsatt(), and SetColors().

◆ Gdraw()

void TG4VisManager::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 )

Draw the physical volume NAME and all descendents;
Mandatory : the graphics system, scene and view must be initialized, e.g. "/vis~/create_view/new_graphics_system OGLSX"; Any call of Gdraw() will use the current graphics system and the current window.
The result will be a centered view drawing of the designated volume, lights moving with camera, viewpoint direction given by theta/phi and rotation on the screen given by psi;
The u0, v0, ul, vl factors are ignored since the object will be automatically centered and will be confortable in the window at any viewing angle.

check if G4 graphics is ready for drawing

Definition at line 593 of file TG4VisManager.cxx.

Referenced by TGeant4::Gdraw().

◆ SetColors()

void TG4VisManager::SetColors ( )

Function for setting default volume colours

Definition at line 435 of file TG4VisManager.cxx.

◆ operator=()

TG4VisManager & TG4VisManager::operator= ( const TG4VisManager & right)
private

Not implemented.

◆ NeedSetColours()

G4bool TG4VisManager::NeedSetColours ( )
inlineprivate

Return colour flag

Definition at line 110 of file TG4VisManager.h.

◆ SetColourFlag()

void TG4VisManager::SetColourFlag ( G4bool value)
inlineprivate

Set colour flag

Definition at line 116 of file TG4VisManager.h.

◆ Contains() [1/2]

G4bool TG4VisManager::Contains ( const LogicalVolumesVector & lvVector,
const G4LogicalVolume * lv ) const
private

Return true if the vector contains specified logical volume.

Definition at line 61 of file TG4VisManager.cxx.

Referenced by GetLVList(), and GetPVList().

◆ Contains() [2/2]

G4bool TG4VisManager::Contains ( const PhysicalVolumesVector & pvVector,
const G4VPhysicalVolume * pv ) const
private

Return true if the vector contains specified physical volume.

Definition at line 75 of file TG4VisManager.cxx.

◆ GetLVList()

TG4VisManager::LogicalVolumesVector TG4VisManager::GetLVList ( G4String name)
private

Get function returning the list of logical volumes associated to NAME; G4 built clones of a G3 volume (identified with NAME_NUMBER will be added to the list) NAME can be the name of a logical or physical volume

Definition at line 89 of file TG4VisManager.cxx.

Referenced by Gsatt().

◆ GetPVList()

TG4VisManager::PhysicalVolumesVector TG4VisManager::GetPVList ( G4String name)
private

Get function returning the physical volume pointer for NAME

Definition at line 124 of file TG4VisManager.cxx.

◆ CaseInsensitiveEqual()

G4bool TG4VisManager::CaseInsensitiveEqual ( const G4String string1,
const G4String string2 )
private

Case insensitive comparison of 2 strings

Definition at line 141 of file TG4VisManager.cxx.

Referenced by GetLVList(), GetPVList(), and Gsatt().

◆ IsSharedVisAttributes()

G4bool TG4VisManager::IsSharedVisAttributes ( const G4LogicalVolume * pLV)
private

Function seeking if the volume's visible attributes are shared with other volumes

Definition at line 177 of file TG4VisManager.cxx.

Referenced by SetG4Attribute().

◆ SetG4Attribute()

void TG4VisManager::SetG4Attribute ( G4LogicalVolume *const lv,
const TG4G3Attribute att,
const G4int val )
private

Set the G4 attribute fo volume LV accordingly to the G3 description of (att- val)

Definition at line 198 of file TG4VisManager.cxx.

Referenced by Gsatt(), and SetAtt4Daughters().

◆ SetAtt4Daughters()

void TG4VisManager::SetAtt4Daughters ( G4LogicalVolume *const lv,
const TG4G3Attribute att,
const G4int val )
private

Iterator for setting a visual attribute for all daughters

Definition at line 154 of file TG4VisManager.cxx.

Referenced by Gsatt(), and SetAtt4Daughters().

Member Data Documentation

◆ fColourFlag

G4bool TG4VisManager::fColourFlag
private

colour flag

Definition at line 104 of file TG4VisManager.h.

Referenced by NeedSetColours(), and SetColourFlag().

◆ fVerboseLevel

G4int TG4VisManager::fVerboseLevel
private

verbose level

Definition at line 105 of file TG4VisManager.h.

Referenced by SetG4Attribute().


The documentation for this class was generated from the following files: