LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
perspective.cc File Reference

Main program of the visualization/perspective example. More...

#include "globals.hh"
#include "G4VisExecutive.hh"
#include "G4VisExtent.hh"
#include "G4UImanager.hh"
#include "G4UIExecutive.hh"
#include "G4SystemOfUnits.hh"
#include "PerspectiveVisAction.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Main program of the visualization/perspective example.

Definition in file perspective.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 47 of file perspective.cc.

47  {
48 
49  G4VisManager* visManager = new G4VisExecutive;
50  visManager->Initialise();
51 
52  visManager->SetUserAction
53  (new PerspectiveVisAction,
54  G4VisExtent(-100*m,100*m,-100*m,100*m,-100*m,100*m));
55 
56  G4String command = "/control/execute ";
57  G4String fileName = "vis.mac";
58  if (argc > 1) { // Macro name supplied.
59  fileName = argv[1];
60  }
61  G4UIExecutive* ui = new G4UIExecutive(argc,argv);
62  G4UImanager::GetUIpointer()->ApplyCommand(command+fileName);
63  ui->SessionStart();
64 
65  delete ui;
66  delete visManager;
67 }