]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4VisManager.h
Functions renamed to get a prefix PHOS
[u/mrichter/AliRoot.git] / TGeant4 / TG4VisManager.h
CommitLineData
2817d3e2 1// $Id$
2// Category: visualization
3//
499b353a 4// Author: I. Hrivnacova, A. Gheata
5//
6// Class TG4VisManager
7// -------------------
2817d3e2 8// G4VisManager derived class that takes care of registering
499b353a 9// graphics system and provides Geant4 implementation of
10// the MonteCarlo interface methods for visualization.
2817d3e2 11
12#ifndef TG4_VIS_MANAGER_H
13#define TG4_VIS_MANAGER_H
14#ifdef G4VIS_USE
15
5317affd 16#include "TG4G3Attribute.h"
2817d3e2 17
18#include <G4VisManager.hh>
7c02bbad 19#include <g4std/vector>
2817d3e2 20
21#include <Rtypes.h>
22
7c02bbad 23typedef G4std::vector<G4LogicalVolume*> LogicalVolumesVector;
24typedef G4std::vector<G4VPhysicalVolume*> PhysicalVolumesVector;
25
2817d3e2 26class TG4VisManager: public G4VisManager
27{
28 public:
29 TG4VisManager(G4int verboseLevel = 0);
30 // Controls initial verbose level of VisManager and VisMessenger.
31 // Can be changed by /vis/set/verbose.
32 // --> protected
33 // TG4VisManager(const TG4VisManager& right);
34 virtual ~TG4VisManager();
35
36 //----------------------
37 // functions for drawing
38 //----------------------
39 void DrawOneSpec(const char* name); // not implemented
40
41 // see TG4VisManager.cxx for detailed description of Gsatt(), Gdraw()
42 void Gsatt(const char* name, const char* att, Int_t val);
43 void Gdraw(const char* name, Float_t theta , Float_t phi,
44 Float_t psi, Float_t u0, Float_t v0, Float_t ul,
45 Float_t vl);
46 void SetColors();
47
48 protected:
49 TG4VisManager(const TG4VisManager& right);
50
51 // operators
52 TG4VisManager& operator=(const TG4VisManager& right);
53
54 private:
55 // methods
56 //--------
57 void RegisterGraphicsSystems();
58 G4bool NeedSetColours();
59 void SetColourFlag(G4bool value);
60
61 // methods used by Gsatt(), Gdraw()
62 //---------------------------------
63
7c02bbad 64 G4bool Contains(const LogicalVolumesVector& lvVector,
65 const G4LogicalVolume* lv) const;
66 G4bool Contains(const PhysicalVolumesVector& pvVector,
67 const G4VPhysicalVolume* pv) const;
68
2817d3e2 69 // Get the logical volume list corresponding to NAME
70 // Either a logical or physical volume name can be supplied
71 // Clones of G3VOLUME_NUMBER will be atached to the list
7c02bbad 72 LogicalVolumesVector GetLVList(G4String name);
2817d3e2 73
74 // Get the physical volume list corresponding to NAME
7c02bbad 75 PhysicalVolumesVector GetPVList(G4String name);
2817d3e2 76
77 // Case insensitive string comparison
78 G4bool CaseInsensitiveEqual(const G4String string1,
79 const G4String string2);
80
81 // Return true if the vis. attributes pointer corresponding to the
82 // selected volume is shared by others. In this case, duplication
83 // of those is mandatory
84 G4bool IsSharedVisAttributes(const G4LogicalVolume* pLV);
85
86 // Set an attribute to a specific volume
5317affd 87 void SetG4Attribute(G4LogicalVolume* const lv, const TG4G3Attribute att,
2817d3e2 88 const G4int val);
89 // Set an attribute to the tree coresponding to a volume
5317affd 90 void SetAtt4Daughters(G4LogicalVolume* const lv, const TG4G3Attribute att,
2817d3e2 91 const G4int val);
92
93 //data members
94 //------------
193795c0 95 G4bool fColourFlag; //colour flag
96 G4int fVerboseLevel;//verbose level
2817d3e2 97};
98
99// inline methods
100
101inline G4bool TG4VisManager::NeedSetColours()
102{ return fColourFlag; }
103
104inline void TG4VisManager::SetColourFlag(G4bool value)
105{ fColourFlag = value; }
106
107
108#endif //G4VIS_USE
109#endif //TG4_VIS_MANAGER_H