source: trunk/environments/MOMO/MomoHome/linac.cc @ 1340

Last change on this file since 1340 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.6 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//##### MOMO Main program #####
27//# ----------------------------------------------------------
28//# Automatic creation of the main program for Momo environment.
29// 2003 December, updated for  geant4.6.0
30// --------------------------------------------------------------
31//   linac.cc generated by Geant4 Momo
32//     at Sat Nov 27 12:16:36 JST 2004 
33
34
35// This code implementation is the intellectual property of
36// the  GEANT4 collaboration.
37//
38// By copying, distributing or modifying the Program (or any work
39// based on the Program) you indicate your acceptance of this statement,
40// and all its terms.
41//
42//
43#include "G4RunManager.hh"
44#include "G4UImanager.hh"
45// Your choice of User Interface driver
46#include "G4UIGAG.hh"
47// Detector geometry generated by Momo's GGE
48#include "flatteningFilter.hh"
49// Physics List generated by Momo's GPE
50#include "MomoN02PhysicsList.hh"
51// Momo's default PrimaryGeneratorAction
52#include "MomoPrimaryGeneratorAction.hh"
53#include "MomoRunAction.hh"
54#include "MomoEventAction.hh"
55#ifdef G4VIS_USE
56#include "MomoVisManager.hh"
57#endif
58int main()
59{
60  // Construct the default run manager
61  G4RunManager* runManager = new G4RunManager;
62  // set mandatory initialization classes
63  runManager->SetUserInitialization(new flatteningFilter);
64  runManager->SetUserInitialization(new MomoN02PhysicsList);
65#ifdef G4VIS_USE
66  // visualization manager
67  G4VisManager* visManager = new MomoVisManager;
68  visManager->Initialize();
69#endif
70  // set mandatory user action class
71  runManager->SetUserAction(new MomoPrimaryGeneratorAction);
72  // set user action classes to visualise trajectories
73  runManager->SetUserAction(new MomoRunAction);
74  runManager->SetUserAction(new MomoEventAction);
75  // Initialize G4 kernel
76  runManager->Initialize();
77  // get the pointer to the User Interface manager
78  G4UImanager* UI = G4UImanager::GetUIpointer();
79      G4UIsession * session = new G4UIGAG;
80      session->SessionStart();
81      delete session;
82  // job termination
83#ifdef G4VIS_USE
84  delete visManager;
85#endif
86  delete runManager;
87  return 0;
88}
89
Note: See TracBrowser for help on using the repository browser.