]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TGeant4/TG4GuiVolume.cxx
major update of geometry browser classes by D.Adamova; volumes and material propertie...
[u/mrichter/AliRoot.git] / TGeant4 / TG4GuiVolume.cxx
index 6b3db3cc7371311bb31a66cf90469fb0ff3aa3ad..7711414c9bb7bcc2cbc04d1e643d36df4b27cf67 100644 (file)
  
  
 #include "TG4GuiVolume.h"
-#include <G4LogicalVolume.hh>
+#include "TG4Globals.h"
+#include <G4LogicalVolume.hh> 
 
 ClassImp(TG4GuiVolume)
 
 TG4GuiVolume::TG4GuiVolume(const char* name, G4LogicalVolume* lvolume)
 {
 // Constructor
-    fkName   = name;
     fItem   = 0;
     fLogicalVolume = lvolume; 
+    
+    G4String lName = fLogicalVolume->GetName();
+    
+    if ( lName != name ) TG4Globals::Exception(
+       "A wrong name assigned to the guiVolume in the ctor" );
+}
+
+TG4GuiVolume::TG4GuiVolume(const TG4GuiVolume& gv) 
+{
+// Dummy copy constructor 
+  TG4Globals::Exception(
+    "Attempt to use TG4GuiVolume copy constructor.");
+}
+
+TG4GuiVolume& TG4GuiVolume::operator=(const TG4GuiVolume& gv)
+{
+  // check assignement to self
+  if (this == &gv) return *this;
+
+  TG4Globals::Exception(
+    "Attempt to assign TG4GuiVolume singleton.");
+    
+  return *this;  
+}
+
+const char* TG4GuiVolume::GetName() const
+{
+// Returns the gui/logical volume name
+   
+  G4String lName = fLogicalVolume->GetName();
+  return lName; 
+}    
+
+TGListTreeItem* TG4GuiVolume::GetItem() const
+{
+// Returns ListTree item
+
+    return fItem;
+    
 }
 
 G4LogicalVolume* TG4GuiVolume::GetLogicalVolume() const
 {
 // Returns logical volume
+
   return fLogicalVolume;
+
 }
+