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