]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4GuiVolume.cxx
default verbose level change to 1
[u/mrichter/AliRoot.git] / TGeant4 / TG4GuiVolume.cxx
CommitLineData
b8c9c0a3 1// $Id$
2// Category: interfaces
3//
4// Author: D. Adamova
5//
6//==================================================================
7//
8//----------------TG4GuiVolume.cxx-------------------------------//
9//----Creating link for Logical Volume Tree in AG4 Geometry----//
10//
11//===================================================================
12
13
14
15#include "TG4GuiVolume.h"
66a8b12d 16#include "TG4Globals.h"
17#include <G4LogicalVolume.hh>
b8c9c0a3 18
19ClassImp(TG4GuiVolume)
20
21TG4GuiVolume::TG4GuiVolume(const char* name, G4LogicalVolume* lvolume)
22{
23// Constructor
b8c9c0a3 24 fItem = 0;
25 fLogicalVolume = lvolume;
66a8b12d 26
27 G4String lName = fLogicalVolume->GetName();
28
29 if ( lName != name ) TG4Globals::Exception(
30 "A wrong name assigned to the guiVolume in the ctor" );
31}
32
33TG4GuiVolume::TG4GuiVolume(const TG4GuiVolume& gv)
34{
35// Dummy copy constructor
36 TG4Globals::Exception(
37 "Attempt to use TG4GuiVolume copy constructor.");
38}
39
40TG4GuiVolume& TG4GuiVolume::operator=(const TG4GuiVolume& gv)
41{
42 // check assignement to self
43 if (this == &gv) return *this;
44
45 TG4Globals::Exception(
46 "Attempt to assign TG4GuiVolume singleton.");
47
48 return *this;
49}
50
51const char* TG4GuiVolume::GetName() const
52{
53// Returns the gui/logical volume name
54
55 G4String lName = fLogicalVolume->GetName();
56 return lName;
57}
58
59TGListTreeItem* TG4GuiVolume::GetItem() const
60{
61// Returns ListTree item
62
63 return fItem;
64
b8c9c0a3 65}
66
67G4LogicalVolume* TG4GuiVolume::GetLogicalVolume() const
68{
69// Returns logical volume
66a8b12d 70
b8c9c0a3 71 return fLogicalVolume;
66a8b12d 72
b8c9c0a3 73}
66a8b12d 74