2 // Category: visualization
4 // Author: I. Hrivnacova, A. Gheata
8 // See the class description in the header file.
9 // According to visualization/management/include/MyVisManager.*
10 // John Allison 24th January 1998.
11 // I. Hrivnacova 12.5.98
13 // Renamed to TG4VisManager
14 // I. Hrivnacova, 3.9.99
16 // Added AliMC implementation
19 // Added OpenGL*Win32, RayTracer (as replacement of RayX) drivers
20 // based on G4 suggestions.
21 // I. Gonzalez, 4.4.2000
23 // Example Visualization Manager description:
24 // Implements virtual function RegisterGraphicsSystems.
25 // Exploits C-pre-processor variables G4VIS_USE_DAWN, etc.,
26 // which are set by the G4 makefiles if
27 // environment variables of the same name are set.
29 // So all you have to do is set environment variables and compile and
30 // instantiate this in your main().
32 // Alternatively, you can implement an empty function here and just
33 // register the systems you want in your main(), e.g.:
34 // G4VisManager* myVisManager = new MyVisManager;
35 // myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
40 #include "TG4VisManager.h"
41 #include "TG4Globals.h"
43 #include <G4LogicalVolumeStore.hh>
44 #include <G4PhysicalVolumeStore.hh>
45 #include <G4TransportationManager.hh>
46 #include <G4Material.hh>
47 #include <G4PhysicalVolumeModel.hh>
48 #include <G4VVisManager.hh>
50 // Supported drivers...
53 #include <G4FukuiRenderer.hh>
56 #ifdef G4VIS_USE_DAWNFILE
57 #include <G4DAWNFILE.hh>
60 #ifdef G4VIS_USE_OPACS
65 #ifdef G4VIS_USE_OPENGLX
66 #include <G4OpenGLImmediateX.hh>
67 #include <G4OpenGLStoredX.hh>
70 #ifdef G4VIS_USE_OPENGLXM
71 #include <G4OpenGLImmediateXm.hh>
72 #include <G4OpenGLStoredXm.hh>
75 #ifdef G4VIS_USE_OPENGLWIN32
76 #include "G4OpenGLImmediateWin32.hh"
77 #include "G4OpenGLStoredWin32.hh"
81 #include <G4OpenInventorX.hh>
84 #ifdef G4VIS_USE_OIWIN32
85 #include <G4OpenInventorWin32.hh>
88 #ifdef G4VIS_USE_RAYTRACER
89 #include "G4RayTracer.hh"
97 #ifdef G4VIS_USE_VRMLFILE
98 #include <G4VRML1File.hh>
99 #include <G4VRML2File.hh>
102 //_____________________________________________________________________________
103 TG4VisManager::TG4VisManager(G4int verboseLevel) {
105 fVerbose = verboseLevel;
109 //_____________________________________________________________________________
110 TG4VisManager::TG4VisManager(const TG4VisManager& right) {
112 TG4Globals::Exception(
113 "Attempt to copy TG4VisManager singleton.");
116 //_____________________________________________________________________________
117 TG4VisManager::~TG4VisManager() {
123 //_____________________________________________________________________________
124 TG4VisManager& TG4VisManager::operator=(const TG4VisManager& right)
126 // check assignement to self
127 if (this == &right) return *this;
129 TG4Globals::Exception(
130 "Attempt to assign TG4VisManager singleton.");
137 //_____________________________________________________________________________
138 void TG4VisManager::RegisterGraphicsSystems()
140 // Registers the graphics systems.
143 // all created graphics system instances are
144 // deleted in G4VisManager::~G4VisManager()
145 #ifdef G4VIS_USE_DAWN
146 RegisterGraphicsSystem(new G4FukuiRenderer);
149 #ifdef G4VIS_USE_DAWNFILE
150 RegisterGraphicsSystem(new G4DAWNFILE);
153 #ifdef G4VIS_USE_OPACS
154 RegisterGraphicsSystem(new G4Wo);
155 RegisterGraphicsSystem(new G4Xo);
158 #ifdef G4VIS_USE_OPENGLX
159 RegisterGraphicsSystem(new G4OpenGLImmediateX);
160 RegisterGraphicsSystem(new G4OpenGLStoredX);
163 #ifdef G4VIS_USE_OPENGLXM
164 RegisterGraphicsSystem(new G4OpenGLImmediateXm);
165 RegisterGraphicsSystem(new G4OpenGLStoredXm);
168 #ifdef G4VIS_USE_OPENGLWIN32
169 RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
170 RegisterGraphicsSystem (new G4OpenGLStoredWin32);
174 RegisterGraphicsSystem(new G4OpenInventorX);
177 #ifdef G4VIS_USE_OIWIN32
178 RegisterGraphicsSystem(new G4OpenInventorWin32);
181 #ifdef G4VIS_USE_RAYTRACER
182 RegisterGraphicsSystem (new G4RayTracer);
185 #ifdef G4VIS_USE_VRML
186 RegisterGraphicsSystem(new G4VRML1);
187 RegisterGraphicsSystem(new G4VRML2);
190 #ifdef G4VIS_USE_VRMLFILE
191 RegisterGraphicsSystem(new G4VRML1File);
192 RegisterGraphicsSystem(new G4VRML2File);
197 "\nYou have successfully chosen to use the following graphics systems."
199 PrintAvailableGraphicsSystems();
203 //---------------------------------------------------------------
205 //---------------------------------------------------------------
208 //_____________________________________________________________________________
209 G4bool TG4VisManager::Contains(const LogicalVolumesVector& lvVector,
210 const G4LogicalVolume* lv) const
212 // Returns true if the vector contains specified logical volume.
215 LogicalVolumesVector::const_iterator i;
217 for (i = lvVector.begin(); i != lvVector.end(); i++)
218 if (*i == lv) return true;
223 //_____________________________________________________________________________
224 G4bool TG4VisManager::Contains(const PhysicalVolumesVector& pvVector,
225 const G4VPhysicalVolume* pv) const
227 // Returns true if the vector contains specified physical volume.
230 PhysicalVolumesVector::const_iterator i;
232 for (i = pvVector.begin(); i != pvVector.end(); i++)
233 if (*i == pv) return true;
238 //_____________________________________________________________________________
239 LogicalVolumesVector TG4VisManager::GetLVList(G4String name)
241 // Get function returning the list of logical volumes
242 // associated to NAME; G4 built clones of a G3 volume (identified
243 // with NAME_NUMBER will be added to the list)
244 // NAME can be the name of a logical or physical volume
247 LogicalVolumesVector lvList;
248 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
249 G4LogicalVolume* pLV = 0;
252 for (G4int i=0; i<pLVStore->size(); i++)
254 pLV = (*pLVStore)[i];
255 if (CaseInsensitiveEqual(name,pLV->GetName()))
257 if (!Contains(lvList, pLV)) lvList.push_back(pLV);
261 if (lvList.size()>0) return lvList;
263 G4PhysicalVolumeStore* pPVStore = G4PhysicalVolumeStore::GetInstance();
264 G4VPhysicalVolume* pPV = 0;
267 for (G4int i=0; i<pPVStore->size(); i++)
269 pPV = (*pPVStore)[i];
270 if (CaseInsensitiveEqual(name,pPV->GetName()))
272 pLV = pPV->GetLogicalVolume();
273 if (!Contains(lvList, pLV)) lvList.push_back(pLV);
281 //_____________________________________________________________________________
282 PhysicalVolumesVector TG4VisManager::GetPVList(G4String name)
284 // Get function returning the physical volume pointer for NAME
287 PhysicalVolumesVector pvList;
288 G4PhysicalVolumeStore* pPVStore = G4PhysicalVolumeStore::GetInstance();
291 TG4Globals::Warning("TG4VisManager::Gdraw : No volume store !");
294 G4VPhysicalVolume* pPV = 0;
295 for (G4int i=0; i<pPVStore->size(); i++)
297 pPV = (*pPVStore)[i];
298 if (CaseInsensitiveEqual(name,pPV->GetName()))
300 if (!Contains(pvList, pPV)) pvList.push_back(pPV);
307 //_____________________________________________________________________________
308 G4bool TG4VisManager::CaseInsensitiveEqual(const G4String string1,
309 const G4String string2)
311 // Case insensitive comparison of 2 strings
315 if (string1 == string2) return true;
316 // if (string1.length() != string2.length()) return false;
317 for (i=0; i<string1.length(); i++)
319 G4int diff = abs((G4int)string1(i)-(G4int)string2(i));
320 if (diff && (diff!=32)) return false;
322 if (string2.length() > string1.length())
324 if (string2(i) == '_') return true;
331 //_____________________________________________________________________________
332 void TG4VisManager::SetAtt4Daughters(G4LogicalVolume* const lv,
333 const TG4G3Attribute att, const G4int val)
335 // Iterator for setting a visual attribute for all daughters
338 SetG4Attribute(lv,att,val);
340 G4String lvName = lv->GetName();
341 G4int nOfDaughters = lv->GetNoDaughters();
344 G4String previousName = "";
345 for (G4int i=0; i<nOfDaughters; i++)
347 G4LogicalVolume* lvd = lv->GetDaughter(i)->GetLogicalVolume();
348 G4String currentName = lvd->GetName();
349 if (currentName != lvName && currentName != previousName)
351 SetAtt4Daughters(lvd, att, val);
352 previousName = currentName;
359 //_____________________________________________________________________________
360 G4bool TG4VisManager::IsSharedVisAttributes(const G4LogicalVolume* pLV)
362 // Function seeking if the volume's visible attributes are shared with
366 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
367 G4LogicalVolume* pLVCurrent = 0;
368 const G4VisAttributes* pVisAtt = pLV->GetVisAttributes();
369 if (!pVisAtt) return false;
370 for (G4int i=0; i<pLVStore->size(); i++)
372 pLVCurrent = (*pLVStore)[i];
373 if (pLVCurrent != pLV)
375 if (pLVCurrent->GetVisAttributes() == pVisAtt)
385 //_____________________________________________________________________________
386 void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
387 const TG4G3Attribute att, const G4int val)
389 // Set the G4 attribute fo volume LV accordingly to the G3 description
394 // Dupplicating old vis. attributes
395 const G4VisAttributes* visAttributes = lv->GetVisAttributes();
396 G4VisAttributes* newVisAttributes;
398 newVisAttributes = new G4VisAttributes(false);
400 G4bool visibility = visAttributes->IsVisible();
401 G4Colour colour = visAttributes->GetColour();
402 newVisAttributes = new G4VisAttributes(visibility, colour);
405 const G4int kAbsVal = abs(val); // the functionality is given by the abs value
407 // Default visible attributes
408 G4double red(0),green(0),blue(0); // default is black
409 G4bool isVisible(false);
410 G4bool isDaughtersInvisible(false);
411 G4VisAttributes::LineStyle lineStyle = G4VisAttributes::unbroken;
412 G4double lineWidth = 1.0;
413 G4bool isForceDrawingStyle(false);
414 G4VisAttributes::ForcedDrawingStyle drawingStyle = G4VisAttributes::wireframe;
416 // a 'hardcopy' of old vis attributes is needed because the copy constructor
417 // resets to defaults some of the data members of G4VisAttributes class
420 isVisible = visAttributes->IsVisible();
421 isDaughtersInvisible = visAttributes->IsDaughtersInvisible();
422 red = visAttributes->GetColour().GetRed();
423 green = visAttributes->GetColour().GetGreen();
424 blue = visAttributes->GetColour().GetBlue(); // old RGB components
425 lineStyle = visAttributes->GetLineStyle();
426 lineWidth = visAttributes->GetLineWidth();
427 isForceDrawingStyle = visAttributes->IsForceDrawingStyle();
428 if (isForceDrawingStyle)
429 drawingStyle = visAttributes->GetForcedDrawingStyle();
432 G4double luminosityBin(0.04), // bin for luminosity
433 luminosity(0); // colour luminosity
435 // Delete old vis. attributes if they are not shared
436 if (visAttributes && !IsSharedVisAttributes(lv)) delete visAttributes;
438 // Set the required attribute
464 lineStyle = G4VisAttributes::unbroken; break;
466 lineStyle = G4VisAttributes::dashed; break;
468 lineStyle = G4VisAttributes::dotted; break;
471 G4cout << "TG4VisManager::Gsatt() Usage of LSTY :" << G4endl
472 << "ATT = 1,2,3 means line unbroken, dashed or dotted" << G4endl
473 << "any other value resets to the default : unbroken" << G4endl;
474 lineStyle = G4VisAttributes::unbroken;
479 if (lineWidth > 7) lineWidth = 7;
481 G4cout << "TG4VisManager::Gsatt() Usage for LWID :" << G4endl
482 << " The VAL you supply means the width of lines in pixels "
483 << "for the screen and in 0.1*mm for paper." << G4endl
484 << " Negative values means the same, but for all daughters"
488 if (kAbsVal < 8) // G3 base colours
493 red=0; green=0; blue=0; //black
496 red=1; green=0; blue=0; //red
499 red=0; green=1; blue=0; //green
502 red=0; green=0; blue=1; //blue
505 red=1; green=1; blue=0; //yellow
508 red=1; green=0; blue=1; //violet
511 red=0; green=1; blue=1; //lightblue (almost !)
515 if (kAbsVal>=8 && kAbsVal<=16)
517 red=0; green=0; blue=0;
518 luminosity = (kAbsVal-7)*luminosityBin;
520 if (kAbsVal>=17 && kAbsVal<=41)
522 red=1; green=0; blue=0;
523 luminosity = (kAbsVal-16)*luminosityBin;
525 if (kAbsVal>=67 && kAbsVal<=91)
527 red=0; green=1; blue=0;
528 luminosity = (kAbsVal-66)*luminosityBin;
530 if (kAbsVal>=117 && kAbsVal<=141)
532 red=0; green=0; blue=1;
533 luminosity = (kAbsVal-116)*luminosityBin;
535 if (kAbsVal>=42 && kAbsVal<=66)
537 red=1; green=1; blue=0;
538 luminosity = (kAbsVal-41)*luminosityBin;
540 if (kAbsVal>=142 && kAbsVal<=166)
542 red=1; green=0; blue=1;
543 luminosity = (kAbsVal-141)*luminosityBin;
545 if (kAbsVal>=92 && kAbsVal<=116)
547 red=0; green=1; blue=1;
548 luminosity = (kAbsVal-91)*luminosityBin;
550 if (red < luminosityBin) red += luminosity;
551 if (green < luminosityBin) green += luminosity;
552 if (blue < luminosityBin) blue += luminosity;
555 isForceDrawingStyle = true;
559 drawingStyle = G4VisAttributes::wireframe;
562 drawingStyle = G4VisAttributes::solid;
566 G4cout << "TG4VisManager::Gsatt() FILL usage :" << G4endl
567 << " The FILL values you can supply are only :" << G4endl
568 << "+/- 1 : forces wireframe drawing (default)" << G4endl
569 << "+/- 2 : forces solid drawing" << G4endl
570 << "other values sets the drawing style to solid"
572 drawingStyle = G4VisAttributes::solid;
575 // Register vis. attributes
576 newVisAttributes->SetVisibility(isVisible);
577 newVisAttributes->SetDaughtersInvisible(isDaughtersInvisible);
578 newVisAttributes->SetColour(red,green,blue);
579 newVisAttributes->SetLineStyle(lineStyle);
580 newVisAttributes->SetLineWidth(lineWidth);
581 if (drawingStyle == G4VisAttributes::wireframe)
582 newVisAttributes->SetForceWireframe(isForceDrawingStyle);
583 if (drawingStyle == G4VisAttributes::solid)
584 newVisAttributes->SetForceSolid(isForceDrawingStyle);
586 lv->SetVisAttributes(newVisAttributes);
589 //-----------------------------------------------------------------
590 // functions for drawing
591 //-----------------------------------------------------------------
594 //_____________________________________________________________________________
595 void TG4VisManager::DrawOneSpec(const char* name)
597 // Function called when one double-clicks on a volume name
598 // in a TPaveLabel drawn by Gdtree
601 G4cout << "TG4VisManager::DrawOneSpec() Not yet implemented";
605 //_____________________________________________________________________________
606 void TG4VisManager::SetColors()
608 // Function for setting default volume colours
611 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
612 const G4LogicalVolume* pLV = 0;
615 TG4Globals::Warning("TG4VisManager::SetColors : Ignored, geometry not built.");
618 // parse the LV tree and set colours according to material density
619 for (G4int i=0; i<pLVStore->size(); i++)
621 pLV = (*pLVStore)[i];
622 // G4cout << "VOLUME : " << pLV->GetName() << G4endl;
623 const G4Material* pMaterial = pLV->GetMaterial();
624 const G4State kState = pMaterial->GetState();
625 G4double density = (pMaterial->GetDensity())*cm3/g;
626 G4String nState = "Undefined";
627 G4int colour = 1; //black by default
628 G4double luminosity = 0.;
629 if (kState == kStateUndefined)
631 nState = "Undefined";
633 if (kState == kStateSolid)
639 luminosity = 25 - 25*density/2;
641 else if (density < 3)
644 luminosity = 25 - 25*(density-2);
646 else if (density < 10)
649 luminosity = 25 - 25*(density-5)/5;
651 else if (density < 15)
654 luminosity = 25 - 25*(density-10)/5;
656 else if (density < 20)
659 luminosity = 9 - 9*(density-15)/5;
662 if (kState == kStateLiquid)
665 colour = 142; //violet
666 luminosity = 25 - 25*density/2;
668 if (kState == kStateGas)
671 if (density < 0.001) {colour = 42;} //yellow
672 else if (density < 0.002) {colour = 27;} //light red
673 else if (density < 0.003) {colour = 77;} //light green
674 else {colour = 102;} //light cyan
677 if (luminosity < 0) luminosity=0;
678 colour += (G4int)luminosity;
679 // Setting the corresponding colour
680 Gsatt(pLV->GetName(),"COLO",colour);
685 //_____________________________________________________________________________
686 void TG4VisManager::Gsatt(const char* name, const char* att, Int_t val)
688 // Geant3 description :
691 // IOPT Name of the attribute to be set
692 // IVAL Value to which the attribute is to be set
694 // name= "*" stands for all the volumes.
695 // iopt can be chosen among the following :
696 // kWORK, kSEEN, kLSTY, kLWID, kCOLO, kFILL, kSET, kDET, kDTYP
700 G4LogicalVolume* lv = 0;
701 LogicalVolumesVector lvList;
702 G4String sname(name),
705 // seek for known attributes
706 TG4G3Attribute attribute = kUNKNOWN;
707 if (CaseInsensitiveEqual(att,"WORK"))
709 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
710 message += satt + " not used in G4";
711 TG4Globals::Warning(message);
714 if (CaseInsensitiveEqual(att,"SEEN")) attribute = kSEEN;
715 if (CaseInsensitiveEqual(att,"LSTY")) attribute = kLSTY;
716 if (CaseInsensitiveEqual(att,"LWID")) attribute = kLWID;
717 if (CaseInsensitiveEqual(att,"COLO")) attribute = kCOLO;
718 if (CaseInsensitiveEqual(att,"FILL")) attribute = kFILL;
719 if (CaseInsensitiveEqual(att,"SET"))
721 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
722 message += satt + " not used in G4";
723 TG4Globals::Warning(message);
726 if (CaseInsensitiveEqual(att,"DET"))
728 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
729 message += satt + " not used in G4";
730 TG4Globals::Warning(message);
733 if (CaseInsensitiveEqual(att,"DTYP"))
735 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
736 message += satt + " not used in G4";
737 TG4Globals::Warning(message);
740 if (attribute == kUNKNOWN)
742 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
743 message += satt + " unknown";
744 TG4Globals::Warning(message);
747 G4bool doForDaughters(false), // tree iterator flag
748 doForAll(false), // activated if NAME is "*"
749 topVisible(false); // activated for kSEEN/-2
750 if (sname == "*") doForAll = true;
751 if (val < 0 && sname!="*") doForDaughters = true;
752 if (attribute==kSEEN && val==-2) topVisible = true;
754 // parse all the tree
757 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
758 for (G4int i=0; i<pLVStore->size(); i++)
761 SetG4Attribute(lv,attribute,ival);
766 // get the logical volume pointer corresponding to NAME
767 lvList = GetLVList(name);
768 if (lvList.size()==0)
770 G4String message = "TG4VisManager::Gsatt(): Ignored\n";
771 message += " Logical volume " + sname + " has not been found.\n";
772 TG4Globals::Warning(message);
775 // set attribute for all descendents
778 for (G4int i=0; i<lvList.size(); i++)
781 SetAtt4Daughters(lv,attribute,ival);
786 for (G4int i=0; i<lvList.size(); i++)
789 SetG4Attribute(lv,attribute,ival);
794 for (G4int i=0; i<lvList.size(); i++)
797 SetG4Attribute(lv,attribute,1);
803 //_____________________________________________________________________________
804 void TG4VisManager::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t psi,
805 Float_t u0,Float_t v0,Float_t ul,Float_t vl)
807 // Draw the physical volume NAME and all descendents;
808 // Mandatory : the graphics system, scene and view must be
809 // initialized, e.g. "/vis~/create_view/new_graphics_system OGLSX";
810 // Any call of Gdraw() will use the current graphics system and
811 // the current window.
812 // The result will be a centered view drawing of the designated volume,
813 // lights moving with camera, viewpoint direction given by theta/phi
814 // and rotation on the screen given by psi;
815 // The u0, v0, ul, vl factors are ignored since the object will be
816 // automatically centered and will be confortable in the window
817 // at any viewing angle.
819 // check if G4 graphics is ready for drawing
822 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
825 "TG4VisManager::Gdraw: Ignored - No graphics driver is built. ");
828 if (NeedSetColours())
831 SetColourFlag(false);
834 const G4double kRad = M_PI/180.;
835 PhysicalVolumesVector pvList;
836 G4String sname(name);
837 G4bool successful = false;
839 pvList = GetPVList(name);
840 if (pvList.size()==0)
842 G4String message = "TG4VisManager::Gdraw() :\n";
843 message += "Volume " + sname + " not found. Bailing out";
844 TG4Globals::Warning(message);
848 G4VPhysicalVolume *pPV = 0;
850 // clear the current scene if not empty
851 if (!fpScene->IsEmpty()) fpScene->Clear();
853 // create and add object's model list to the runtime-duration model
855 // (it is deleted in the VisManager destructor within
856 // all the vectors of the scene)
857 for (G4int i=0; i<pvList.size(); i++)
860 G4LogicalVolume* pLV = pPV->GetLogicalVolume();
861 G4VSolid* pSolid = pLV->GetSolid();
862 successful = fpScene->AddRunDurationModel(new G4PhysicalVolumeModel(pPV));
865 G4String message = "TG4VisManager::Gdraw() Could not add ";
866 message += pPV->GetName() + " to the drawing list. Probably ";
867 message += "it is already in the list.";
868 TG4Globals::Warning(message);
871 // get the standard target point of the scene
872 const G4Point3D kTargetPoint = fpScene->GetStandardTargetPoint();
874 // set the viewpoint and the rotation on the screen
875 G4Vector3D viewpointDirection(sin(theta*kRad)*cos(phi*kRad),
876 sin(theta*kRad)*sin(phi*kRad), cos(theta*kRad));
877 G4Vector3D upVector(sin(psi*kRad), cos(psi*kRad),0);
879 // set and register view parameters to the viewer
881 fVP.SetLightsMoveWithCamera(true);
884 fVP.UnsetViewDigis();
885 fVP.SetNoOfSides(48);
886 fVP.SetCurrentTargetPoint(kTargetPoint);
887 fVP.SetViewpointDirection(viewpointDirection);
888 fVP.SetUpVector(upVector);
889 fVP.SetDensityCulling(true);
890 fpViewer->SetViewParameters(fVP);
894 fpSceneHandler->SetScene(fpScene);
895 fpSceneHandler->SetCurrentViewer(fpViewer);
896 fpViewer->DrawView();
897 fpViewer->ShowView();
899 else TG4Globals::Warning(
900 "TG4VisManager::Gdraw: Ignored - Failed to register volume");