source: trunk/source/physics_lists/builders/include/G4DataQuestionaire.hh@ 1337

Last change on this file since 1337 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 5.3 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#ifndef G4DataQuestionaire_h
27#define G4DataQuestionaire_h 1
28
29#include "globals.hh"
30
31#include "G4HadronElasticProcess.hh"
32#include "G4ProtonInelasticProcess.hh"
33#include "G4VPiKBuilder.hh"
34
35enum G4DataType {no, photon, neutron, radioactive, lowenergy, optical};
36class G4DataQuestionaire
37{
38 public:
39 G4DataQuestionaire(G4DataType t1=no, G4DataType t2=no, G4DataType t3=no, G4DataType t4=no, G4DataType t5=no)
40 {
41 G4cout << G4endl;
42 G4cout << "<<< Geant4 Physics List engine packaging library: PACK 5.5"<<G4endl;
43 // G4cout <<G4endl<<G4endl;
44 // G4cout << "##### the input "<<t1<<" "<<t2<<" "<<t3<<" "<<t4<<G4endl;
45 for(G4int i=0; i<5; i++)
46 {
47 G4DataType t(no);
48 if(i==0) t=t1;
49 if(i==1) t=t2;
50 if(i==2) t=t3;
51 if(i==3) t=t4;
52 if(i==4) t=t5;
53 switch(t)
54 {
55 case photon:
56 if(!getenv("G4LEVELGAMMADATA") )
57 {
58 G4cout << "Photon-evaporation data are needed."<<G4endl;
59 G4cout << "Please set the environmental variable G4LEVELGAMMADATA"<<G4endl;
60 G4cout << "to point to your PhotonEvaporation directory."<<G4endl;
61 G4cout << "Data are available from the Geant4 download page."<<G4endl;
62 G4Exception("G4DataQuestionaire", "007", FatalException,
63 "Fatal error: Missing mandatory data for this simulation engine");
64 }
65 break;
66 case neutron:
67 if(!getenv("G4NEUTRONHPDATA") )
68 {
69 G4cout << "G4NDL are needed."<<G4endl;
70 G4cout << "Please set the environmental variable G4NEUTRONHPDATA"<<G4endl;
71 G4cout << "to point to your G4NDL directory."<<G4endl;
72 G4cout << "Data are available from the Geant4 download page."<<G4endl;
73 G4Exception("G4DataQuestionaire", "007", FatalException,
74 "Fatal error: Missing mandatory data for this simulation engine");
75 }
76 break;
77 case radioactive:
78 if(!getenv("G4RADIOACTIVEDATA") )
79 {
80 G4cout << "Radioactive decay data are needed."<<G4endl;
81 G4cout << "Please set the environmental variable G4RADIOACTIVEDATA"<<G4endl;
82 G4cout << "to point to your RadiativeDecay directory."<<G4endl;
83 G4cout << "Data are available from the Geant4 download page."<<G4endl;
84 G4Exception("G4DataQuestionaire", "007", FatalException,
85 "Fatal error: Missing mandatory data for this simulation engine");
86 }
87 break;
88 case lowenergy:
89 if(!getenv("G4LEDATA") )
90 {
91 G4cout << "Low energy electromagnetic data are needed."<<G4endl;
92 G4cout << "Please set the environmental variable G4LEDATA"<<G4endl;
93 G4cout << "to point to your G4EMLOW directory."<<G4endl;
94 G4cout << "Data are available from the Geant4 download page."<<G4endl;
95 G4Exception("G4DataQuestionaire", "007", FatalException,
96 "Fatal error: Missing mandatory data for this simulation engine");
97 }
98 break;
99 case optical:
100 if(!getenv("G4LEDATA") )
101 {
102 G4cout << "Data describing surface propeties for optical photons are needed."<<G4endl;
103 G4cout << "Please set the environmental variable G4REALSURFACEDATA"<<G4endl;
104 G4cout << "to point to your RealSurface directory."<<G4endl;
105 G4cout << "Data are available from the Geant4 download page."<<G4endl;
106 G4Exception("G4DataQuestionaire", "007", FatalException,
107 "Fatal error: Missing mandatory data for this simulation engine");
108 }
109 break;
110 case no:
111 // all ok
112 break;
113 default:
114 if(t!=no)
115 {
116 G4Exception("G4DataQuestionaire", "007", FatalException,
117 "data type requested is not known to the system");
118 }
119 }
120 }
121 }
122 ~G4DataQuestionaire() {}
123};
124
125// 2002 by J.P. Wellisch
126
127#endif
128
Note: See TracBrowser for help on using the repository browser.