]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4VisManager.h
Coding convention corrections + few minor bug fixes
[u/mrichter/AliRoot.git] / TGeant4 / TG4VisManager.h
CommitLineData
2817d3e2 1// $Id$
2// Category: visualization
3//
4// G4VisManager derived class that takes care of registering
5// graphics syystem and provides
6// Geant4 implementation of the MonteCarlo interface methods
7// for visualization.
8
9#ifndef TG4_VIS_MANAGER_H
10#define TG4_VIS_MANAGER_H
11#ifdef G4VIS_USE
12
13#include "TG3Attribute.h"
14
15#include <G4VisManager.hh>
16#include <g4rw/tpordvec.h>
17
18#include <Rtypes.h>
19
20class TG4VisManager: public G4VisManager
21{
22 public:
23 TG4VisManager(G4int verboseLevel = 0);
24 // Controls initial verbose level of VisManager and VisMessenger.
25 // Can be changed by /vis/set/verbose.
26 // --> protected
27 // TG4VisManager(const TG4VisManager& right);
28 virtual ~TG4VisManager();
29
30 //----------------------
31 // functions for drawing
32 //----------------------
33 void DrawOneSpec(const char* name); // not implemented
34
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,
39 Float_t vl);
40 void SetColors();
41
42 protected:
43 TG4VisManager(const TG4VisManager& right);
44
45 // operators
46 TG4VisManager& operator=(const TG4VisManager& right);
47
48 private:
49 // methods
50 //--------
51 void RegisterGraphicsSystems();
52 G4bool NeedSetColours();
53 void SetColourFlag(G4bool value);
54
55 // methods used by Gsatt(), Gdraw()
56 //---------------------------------
57
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);
62
63 // Get the physical volume list corresponding to NAME
64 G4RWTPtrOrderedVector<G4VPhysicalVolume> GetPVList(G4String name);
65
66 // Case insensitive string comparison
67 G4bool CaseInsensitiveEqual(const G4String string1,
68 const G4String string2);
69
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);
74
75 // Set an attribute to a specific volume
76 void SetG4Attribute(G4LogicalVolume* const lv, const TG3Attribute att,
77 const G4int val);
78 // Set an attribute to the tree coresponding to a volume
79 void SetAtt4Daughters(G4LogicalVolume* const lv, const TG3Attribute att,
80 const G4int val);
81
82 //data members
83 //------------
84 G4bool fColourFlag; //colour flag
85};
86
87// inline methods
88
89inline G4bool TG4VisManager::NeedSetColours()
90{ return fColourFlag; }
91
92inline void TG4VisManager::SetColourFlag(G4bool value)
93{ fColourFlag = value; }
94
95
96#endif //G4VIS_USE
97#endif //TG4_VIS_MANAGER_H