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)
106 fVerboseLevel = verboseLevel;
110 //_____________________________________________________________________________
111 TG4VisManager::TG4VisManager(const TG4VisManager& right) {
113 TG4Globals::Exception(
114 "Attempt to copy TG4VisManager singleton.");
117 //_____________________________________________________________________________
118 TG4VisManager::~TG4VisManager() {
124 //_____________________________________________________________________________
125 TG4VisManager& TG4VisManager::operator=(const TG4VisManager& right)
127 // check assignement to self
128 if (this == &right) return *this;
130 TG4Globals::Exception(
131 "Attempt to assign TG4VisManager singleton.");
138 //_____________________________________________________________________________
139 void TG4VisManager::RegisterGraphicsSystems()
141 // Registers the graphics systems.
144 // all created graphics system instances are
145 // deleted in G4VisManager::~G4VisManager()
146 #ifdef G4VIS_USE_DAWN
147 RegisterGraphicsSystem(new G4FukuiRenderer);
150 #ifdef G4VIS_USE_DAWNFILE
151 RegisterGraphicsSystem(new G4DAWNFILE);
154 #ifdef G4VIS_USE_OPACS
155 RegisterGraphicsSystem(new G4Wo);
156 RegisterGraphicsSystem(new G4Xo);
159 #ifdef G4VIS_USE_OPENGLX
160 RegisterGraphicsSystem(new G4OpenGLImmediateX);
161 RegisterGraphicsSystem(new G4OpenGLStoredX);
164 #ifdef G4VIS_USE_OPENGLXM
165 RegisterGraphicsSystem(new G4OpenGLImmediateXm);
166 RegisterGraphicsSystem(new G4OpenGLStoredXm);
169 #ifdef G4VIS_USE_OPENGLWIN32
170 RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
171 RegisterGraphicsSystem (new G4OpenGLStoredWin32);
175 RegisterGraphicsSystem(new G4OpenInventorX);
178 #ifdef G4VIS_USE_OIWIN32
179 RegisterGraphicsSystem(new G4OpenInventorWin32);
182 #ifdef G4VIS_USE_RAYTRACER
183 RegisterGraphicsSystem (new G4RayTracer);
186 #ifdef G4VIS_USE_VRML
187 RegisterGraphicsSystem(new G4VRML1);
188 RegisterGraphicsSystem(new G4VRML2);
191 #ifdef G4VIS_USE_VRMLFILE
192 RegisterGraphicsSystem(new G4VRML1File);
193 RegisterGraphicsSystem(new G4VRML2File);
196 if (fVerboseLevel > 0) {
198 "\nYou have successfully chosen to use the following graphics systems."
200 PrintAvailableGraphicsSystems();
204 //---------------------------------------------------------------
206 //---------------------------------------------------------------
209 //_____________________________________________________________________________
210 G4bool TG4VisManager::Contains(const LogicalVolumesVector& lvVector,
211 const G4LogicalVolume* lv) const
213 // Returns true if the vector contains specified logical volume.
216 LogicalVolumesVector::const_iterator i;
218 for (i = lvVector.begin(); i != lvVector.end(); i++)
219 if (*i == lv) return true;
224 //_____________________________________________________________________________
225 G4bool TG4VisManager::Contains(const PhysicalVolumesVector& pvVector,
226 const G4VPhysicalVolume* pv) const
228 // Returns true if the vector contains specified physical volume.
231 PhysicalVolumesVector::const_iterator i;
233 for (i = pvVector.begin(); i != pvVector.end(); i++)
234 if (*i == pv) return true;
239 //_____________________________________________________________________________
240 LogicalVolumesVector TG4VisManager::GetLVList(G4String name)
242 // Get function returning the list of logical volumes
243 // associated to NAME; G4 built clones of a G3 volume (identified
244 // with NAME_NUMBER will be added to the list)
245 // NAME can be the name of a logical or physical volume
248 LogicalVolumesVector lvList;
249 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
250 G4LogicalVolume* pLV = 0;
253 for (G4int i=0; i<pLVStore->size(); i++)
255 pLV = (*pLVStore)[i];
256 if (CaseInsensitiveEqual(name,pLV->GetName()))
258 if (!Contains(lvList, pLV)) lvList.push_back(pLV);
262 if (lvList.size()>0) return lvList;
264 G4PhysicalVolumeStore* pPVStore = G4PhysicalVolumeStore::GetInstance();
265 G4VPhysicalVolume* pPV = 0;
268 for (G4int i=0; i<pPVStore->size(); i++)
270 pPV = (*pPVStore)[i];
271 if (CaseInsensitiveEqual(name,pPV->GetName()))
273 pLV = pPV->GetLogicalVolume();
274 if (!Contains(lvList, pLV)) lvList.push_back(pLV);
282 //_____________________________________________________________________________
283 PhysicalVolumesVector TG4VisManager::GetPVList(G4String name)
285 // Get function returning the physical volume pointer for NAME
288 PhysicalVolumesVector pvList;
289 G4PhysicalVolumeStore* pPVStore = G4PhysicalVolumeStore::GetInstance();
292 TG4Globals::Warning("TG4VisManager::Gdraw : No volume store !");
295 G4VPhysicalVolume* pPV = 0;
296 for (G4int i=0; i<pPVStore->size(); i++)
298 pPV = (*pPVStore)[i];
299 if (CaseInsensitiveEqual(name,pPV->GetName()))
301 if (!Contains(pvList, pPV)) pvList.push_back(pPV);
308 //_____________________________________________________________________________
309 G4bool TG4VisManager::CaseInsensitiveEqual(const G4String string1,
310 const G4String string2)
312 // Case insensitive comparison of 2 strings
316 if (string1 == string2) return true;
317 // if (string1.length() != string2.length()) return false;
318 for (i=0; i<string1.length(); i++)
320 G4int diff = abs((G4int)string1(i)-(G4int)string2(i));
321 if (diff && (diff!=32)) return false;
323 if (string2.length() > string1.length())
325 if (string2(i) == '_') return true;
332 //_____________________________________________________________________________
333 void TG4VisManager::SetAtt4Daughters(G4LogicalVolume* const lv,
334 const TG4G3Attribute att, const G4int val)
336 // Iterator for setting a visual attribute for all daughters
339 SetG4Attribute(lv,att,val);
341 G4String lvName = lv->GetName();
342 G4int nOfDaughters = lv->GetNoDaughters();
345 G4String previousName = "";
346 for (G4int i=0; i<nOfDaughters; i++)
348 G4LogicalVolume* lvd = lv->GetDaughter(i)->GetLogicalVolume();
349 G4String currentName = lvd->GetName();
350 if (currentName != lvName && currentName != previousName)
352 SetAtt4Daughters(lvd, att, val);
353 previousName = currentName;
360 //_____________________________________________________________________________
361 G4bool TG4VisManager::IsSharedVisAttributes(const G4LogicalVolume* pLV)
363 // Function seeking if the volume's visible attributes are shared with
367 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
368 G4LogicalVolume* pLVCurrent = 0;
369 const G4VisAttributes* pVisAtt = pLV->GetVisAttributes();
370 if (!pVisAtt) return false;
371 for (G4int i=0; i<pLVStore->size(); i++)
373 pLVCurrent = (*pLVStore)[i];
374 if (pLVCurrent != pLV)
376 if (pLVCurrent->GetVisAttributes() == pVisAtt)
386 //_____________________________________________________________________________
387 void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
388 const TG4G3Attribute att, const G4int val)
390 // Set the G4 attribute fo volume LV accordingly to the G3 description
395 // Dupplicating old vis. attributes
396 const G4VisAttributes* visAttributes = lv->GetVisAttributes();
397 G4VisAttributes* newVisAttributes;
399 newVisAttributes = new G4VisAttributes(false);
401 G4bool visibility = visAttributes->IsVisible();
402 G4Colour colour = visAttributes->GetColour();
403 newVisAttributes = new G4VisAttributes(visibility, colour);
406 const G4int kAbsVal = abs(val); // the functionality is given by the abs value
408 // Default visible attributes
409 G4double red(0),green(0),blue(0); // default is black
410 G4bool isVisible(false);
411 G4bool isDaughtersInvisible(false);
412 G4VisAttributes::LineStyle lineStyle = G4VisAttributes::unbroken;
413 G4double lineWidth = 1.0;
414 G4bool isForceDrawingStyle(false);
415 G4VisAttributes::ForcedDrawingStyle drawingStyle = G4VisAttributes::wireframe;
417 // a 'hardcopy' of old vis attributes is needed because the copy constructor
418 // resets to defaults some of the data members of G4VisAttributes class
421 isVisible = visAttributes->IsVisible();
422 isDaughtersInvisible = visAttributes->IsDaughtersInvisible();
423 red = visAttributes->GetColour().GetRed();
424 green = visAttributes->GetColour().GetGreen();
425 blue = visAttributes->GetColour().GetBlue(); // old RGB components
426 lineStyle = visAttributes->GetLineStyle();
427 lineWidth = visAttributes->GetLineWidth();
428 isForceDrawingStyle = visAttributes->IsForceDrawingStyle();
429 if (isForceDrawingStyle)
430 drawingStyle = visAttributes->GetForcedDrawingStyle();
433 G4double luminosityBin(0.04), // bin for luminosity
434 luminosity(0); // colour luminosity
436 // Delete old vis. attributes if they are not shared
437 if (visAttributes && !IsSharedVisAttributes(lv)) delete visAttributes;
439 // Set the required attribute
465 lineStyle = G4VisAttributes::unbroken; break;
467 lineStyle = G4VisAttributes::dashed; break;
469 lineStyle = G4VisAttributes::dotted; break;
471 if (fVerboseLevel > 0)
472 G4cout << "TG4VisManager::Gsatt() Usage of LSTY :" << G4endl
473 << "ATT = 1,2,3 means line unbroken, dashed or dotted" << G4endl
474 << "any other value resets to the default : unbroken" << G4endl;
475 lineStyle = G4VisAttributes::unbroken;
480 if (lineWidth > 7) lineWidth = 7;
481 if (fVerboseLevel > 0)
482 G4cout << "TG4VisManager::Gsatt() Usage for LWID :" << G4endl
483 << " The VAL you supply means the width of lines in pixels "
484 << "for the screen and in 0.1*mm for paper." << G4endl
485 << " Negative values means the same, but for all daughters"
489 if (kAbsVal < 8) // G3 base colours
494 red=0; green=0; blue=0; //black
497 red=1; green=0; blue=0; //red
500 red=0; green=1; blue=0; //green
503 red=0; green=0; blue=1; //blue
506 red=1; green=1; blue=0; //yellow
509 red=1; green=0; blue=1; //violet
512 red=0; green=1; blue=1; //lightblue (almost !)
516 if (kAbsVal>=8 && kAbsVal<=16)
518 red=0; green=0; blue=0;
519 luminosity = (kAbsVal-7)*luminosityBin;
521 if (kAbsVal>=17 && kAbsVal<=41)
523 red=1; green=0; blue=0;
524 luminosity = (kAbsVal-16)*luminosityBin;
526 if (kAbsVal>=67 && kAbsVal<=91)
528 red=0; green=1; blue=0;
529 luminosity = (kAbsVal-66)*luminosityBin;
531 if (kAbsVal>=117 && kAbsVal<=141)
533 red=0; green=0; blue=1;
534 luminosity = (kAbsVal-116)*luminosityBin;
536 if (kAbsVal>=42 && kAbsVal<=66)
538 red=1; green=1; blue=0;
539 luminosity = (kAbsVal-41)*luminosityBin;
541 if (kAbsVal>=142 && kAbsVal<=166)
543 red=1; green=0; blue=1;
544 luminosity = (kAbsVal-141)*luminosityBin;
546 if (kAbsVal>=92 && kAbsVal<=116)
548 red=0; green=1; blue=1;
549 luminosity = (kAbsVal-91)*luminosityBin;
551 if (red < luminosityBin) red += luminosity;
552 if (green < luminosityBin) green += luminosity;
553 if (blue < luminosityBin) blue += luminosity;
556 isForceDrawingStyle = true;
560 drawingStyle = G4VisAttributes::wireframe;
563 drawingStyle = G4VisAttributes::solid;
566 if (fVerboseLevel > 0)
567 G4cout << "TG4VisManager::Gsatt() FILL usage :" << G4endl
568 << " The FILL values you can supply are only :" << G4endl
569 << "+/- 1 : forces wireframe drawing (default)" << G4endl
570 << "+/- 2 : forces solid drawing" << G4endl
571 << "other values sets the drawing style to solid"
573 drawingStyle = G4VisAttributes::solid;
576 // Register vis. attributes
577 newVisAttributes->SetVisibility(isVisible);
578 newVisAttributes->SetDaughtersInvisible(isDaughtersInvisible);
579 newVisAttributes->SetColour(red,green,blue);
580 newVisAttributes->SetLineStyle(lineStyle);
581 newVisAttributes->SetLineWidth(lineWidth);
582 if (drawingStyle == G4VisAttributes::wireframe)
583 newVisAttributes->SetForceWireframe(isForceDrawingStyle);
584 if (drawingStyle == G4VisAttributes::solid)
585 newVisAttributes->SetForceSolid(isForceDrawingStyle);
587 lv->SetVisAttributes(newVisAttributes);
590 //-----------------------------------------------------------------
591 // functions for drawing
592 //-----------------------------------------------------------------
595 //_____________________________________________________________________________
596 void TG4VisManager::DrawOneSpec(const char* name)
598 // Function called when one double-clicks on a volume name
599 // in a TPaveLabel drawn by Gdtree
602 G4cout << "TG4VisManager::DrawOneSpec() Not yet implemented";
606 //_____________________________________________________________________________
607 void TG4VisManager::SetColors()
609 // Function for setting default volume colours
612 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
613 const G4LogicalVolume* pLV = 0;
616 TG4Globals::Warning("TG4VisManager::SetColors : Ignored, geometry not built.");
619 // parse the LV tree and set colours according to material density
620 for (G4int i=0; i<pLVStore->size(); i++)
622 pLV = (*pLVStore)[i];
623 // G4cout << "VOLUME : " << pLV->GetName() << G4endl;
624 const G4Material* pMaterial = pLV->GetMaterial();
625 const G4State kState = pMaterial->GetState();
626 G4double density = (pMaterial->GetDensity())*cm3/g;
627 G4String nState = "Undefined";
628 G4int colour = 1; //black by default
629 G4double luminosity = 0.;
630 if (kState == kStateUndefined)
632 nState = "Undefined";
634 if (kState == kStateSolid)
640 luminosity = 25 - 25*density/2;
642 else if (density < 3)
645 luminosity = 25 - 25*(density-2);
647 else if (density < 10)
650 luminosity = 25 - 25*(density-5)/5;
652 else if (density < 15)
655 luminosity = 25 - 25*(density-10)/5;
657 else if (density < 20)
660 luminosity = 9 - 9*(density-15)/5;
663 if (kState == kStateLiquid)
666 colour = 142; //violet
667 luminosity = 25 - 25*density/2;
669 if (kState == kStateGas)
672 if (density < 0.001) {colour = 42;} //yellow
673 else if (density < 0.002) {colour = 27;} //light red
674 else if (density < 0.003) {colour = 77;} //light green
675 else {colour = 102;} //light cyan
678 if (luminosity < 0) luminosity=0;
679 colour += (G4int)luminosity;
680 // Setting the corresponding colour
681 Gsatt(pLV->GetName(),"COLO",colour);
686 //_____________________________________________________________________________
687 void TG4VisManager::Gsatt(const char* name, const char* att, Int_t val)
689 // Geant3 description :
692 // IOPT Name of the attribute to be set
693 // IVAL Value to which the attribute is to be set
695 // name= "*" stands for all the volumes.
696 // iopt can be chosen among the following :
697 // kWORK, kSEEN, kLSTY, kLWID, kCOLO, kFILL, kSET, kDET, kDTYP
701 G4LogicalVolume* lv = 0;
702 LogicalVolumesVector lvList;
703 G4String sname(name),
706 // seek for known attributes
707 TG4G3Attribute attribute = kUNKNOWN;
708 if (CaseInsensitiveEqual(att,"WORK"))
710 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
711 message += satt + " not used in G4";
712 TG4Globals::Warning(message);
715 if (CaseInsensitiveEqual(att,"SEEN")) attribute = kSEEN;
716 if (CaseInsensitiveEqual(att,"LSTY")) attribute = kLSTY;
717 if (CaseInsensitiveEqual(att,"LWID")) attribute = kLWID;
718 if (CaseInsensitiveEqual(att,"COLO")) attribute = kCOLO;
719 if (CaseInsensitiveEqual(att,"FILL")) attribute = kFILL;
720 if (CaseInsensitiveEqual(att,"SET"))
722 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
723 message += satt + " not used in G4";
724 TG4Globals::Warning(message);
727 if (CaseInsensitiveEqual(att,"DET"))
729 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
730 message += satt + " not used in G4";
731 TG4Globals::Warning(message);
734 if (CaseInsensitiveEqual(att,"DTYP"))
736 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
737 message += satt + " not used in G4";
738 TG4Globals::Warning(message);
741 if (attribute == kUNKNOWN)
743 G4String message = "TG4VisManager::Gsatt: G3Attribute ";
744 message += satt + " unknown";
745 TG4Globals::Warning(message);
748 G4bool doForDaughters(false), // tree iterator flag
749 doForAll(false), // activated if NAME is "*"
750 topVisible(false); // activated for kSEEN/-2
751 if (sname == "*") doForAll = true;
752 if (val < 0 && sname!="*") doForDaughters = true;
753 if (attribute==kSEEN && val==-2) topVisible = true;
755 // parse all the tree
758 G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
759 for (G4int i=0; i<pLVStore->size(); i++)
762 SetG4Attribute(lv,attribute,ival);
767 // get the logical volume pointer corresponding to NAME
768 lvList = GetLVList(name);
769 if (lvList.size()==0)
771 G4String message = "TG4VisManager::Gsatt(): Ignored\n";
772 message += " Logical volume " + sname + " has not been found.\n";
773 TG4Globals::Warning(message);
776 // set attribute for all descendents
779 for (G4int i=0; i<lvList.size(); i++)
782 SetAtt4Daughters(lv,attribute,ival);
787 for (G4int i=0; i<lvList.size(); i++)
790 SetG4Attribute(lv,attribute,ival);
795 for (G4int i=0; i<lvList.size(); i++)
798 SetG4Attribute(lv,attribute,1);
804 //_____________________________________________________________________________
805 void TG4VisManager::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t psi,
806 Float_t u0,Float_t v0,Float_t ul,Float_t vl)
808 // Draw the physical volume NAME and all descendents;
809 // Mandatory : the graphics system, scene and view must be
810 // initialized, e.g. "/vis~/create_view/new_graphics_system OGLSX";
811 // Any call of Gdraw() will use the current graphics system and
812 // the current window.
813 // The result will be a centered view drawing of the designated volume,
814 // lights moving with camera, viewpoint direction given by theta/phi
815 // and rotation on the screen given by psi;
816 // The u0, v0, ul, vl factors are ignored since the object will be
817 // automatically centered and will be confortable in the window
818 // at any viewing angle.
820 // check if G4 graphics is ready for drawing
823 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
826 "TG4VisManager::Gdraw: Ignored - No graphics driver is built. ");
829 if (NeedSetColours())
832 SetColourFlag(false);
835 const G4double kRad = M_PI/180.;
836 PhysicalVolumesVector pvList;
837 G4String sname(name);
838 G4bool successful = false;
840 pvList = GetPVList(name);
841 if (pvList.size()==0)
843 G4String message = "TG4VisManager::Gdraw() :\n";
844 message += "Volume " + sname + " not found. Bailing out";
845 TG4Globals::Warning(message);
849 G4VPhysicalVolume *pPV = 0;
851 // clear the current scene if not empty
852 if (!fpScene->IsEmpty()) fpScene->Clear();
854 // create and add object's model list to the runtime-duration model
856 // (it is deleted in the VisManager destructor within
857 // all the vectors of the scene)
858 for (G4int i=0; i<pvList.size(); i++)
861 G4LogicalVolume* pLV = pPV->GetLogicalVolume();
862 G4VSolid* pSolid = pLV->GetSolid();
863 successful = fpScene->AddRunDurationModel(new G4PhysicalVolumeModel(pPV));
866 G4String message = "TG4VisManager::Gdraw() Could not add ";
867 message += pPV->GetName() + " to the drawing list. Probably ";
868 message += "it is already in the list.";
869 TG4Globals::Warning(message);
872 // get the standard target point of the scene
873 const G4Point3D kTargetPoint = fpScene->GetStandardTargetPoint();
875 // set the viewpoint and the rotation on the screen
876 G4Vector3D viewpointDirection(sin(theta*kRad)*cos(phi*kRad),
877 sin(theta*kRad)*sin(phi*kRad), cos(theta*kRad));
878 G4Vector3D upVector(sin(psi*kRad), cos(psi*kRad),0);
880 // set and register view parameters to the viewer
882 G4ViewParameters vp;;
883 vp.SetLightsMoveWithCamera(true);
888 vp.SetCurrentTargetPoint(kTargetPoint);
889 vp.SetViewpointDirection(viewpointDirection);
890 vp.SetUpVector(upVector);
891 vp.SetDensityCulling(true);
892 fpViewer->SetViewParameters(vp);
896 fpSceneHandler->SetScene(fpScene);
897 fpSceneHandler->SetCurrentViewer(fpViewer);
898 fpViewer->DrawView();
899 fpViewer->ShowView();
901 else TG4Globals::Warning(
902 "TG4VisManager::Gdraw: Ignored - Failed to register volume");