Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4DataQuestionaire Class Reference

#include <G4DataQuestionaire.hh>

Public Member Functions

 G4DataQuestionaire (G4DataType t1=no, G4DataType t2=no, G4DataType t3=no, G4DataType t4=no, G4DataType t5=no, G4DataType t6=no, G4DataType t7=no, G4DataType t8=no, G4DataType t9=no)
 
 ~G4DataQuestionaire ()
 

Detailed Description

Definition at line 36 of file G4DataQuestionaire.hh.

Constructor & Destructor Documentation

G4DataQuestionaire::G4DataQuestionaire ( G4DataType  t1 = no,
G4DataType  t2 = no,
G4DataType  t3 = no,
G4DataType  t4 = no,
G4DataType  t5 = no,
G4DataType  t6 = no,
G4DataType  t7 = no,
G4DataType  t8 = no,
G4DataType  t9 = no 
)
inline

Definition at line 39 of file G4DataQuestionaire.hh.

References abla, FatalException, G4endl, G4Exception(), lend, lowenergy, neutron, neutronxs, no, optical, photon, radioactive, and plottest35::t1.

42  {
44  desc << G4endl;
45 
46  G4bool fail(false);
47 
48  // always need LEdata since 9.5
49  if(!getenv("G4LEDATA") )
50  {
51  desc << "Low energy electromagnetic data are needed."<<G4endl
52  << "This is a NEW requirement for standard EM physics since geant4 9.5."<<G4endl
53  << "Please set the environmental variable G4LEDATA"<<G4endl
54  << "to point to your G4EMLOW directory. "<<G4endl
55  << "Note: EMLOW6.23 or above is needed for Bremsstrahlung data."<<G4endl
56  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
57  fail=true;
58  }
59  for(G4int i=0; i<9; ++i)
60  {
61  G4DataType t(no);
62  if(i==0) t=t1;
63  if(i==1) t=t2;
64  if(i==2) t=t3;
65  if(i==3) t=t4;
66  if(i==4) t=t5;
67  if(i==5) t=t6;
68  if(i==6) t=t7;
69  if(i==7) t=t8;
70  if(i==8) t=t9;
71 
72  switch(t)
73  {
74  case photon:
75  if(!getenv("G4LEVELGAMMADATA") )
76  {
77  desc << "Photon-evaporation data are needed."<<G4endl
78  << "Please set the environmental variable G4LEVELGAMMADATA"<<G4endl
79  << "to point to your PhotonEvaporation directory."<<G4endl
80  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
81  fail=true;
82  }
83  break;
84  case neutron:
85  if(!getenv("G4NEUTRONHPDATA") )
86  {
87  desc << "G4NDL are needed."<<G4endl
88  << "Please set the environmental variable G4NEUTRONHPDATA"<<G4endl
89  << "to point to your G4NDL directory."<<G4endl
90  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
91  fail=true;
92  }
93  break;
94  case lend:
95  if(!getenv("G4LENDDATA") )
96  {
97  desc << "Data files for Low Energy Nuclear Data (LEND) are needed."<<G4endl
98  << "Please set the environmental variable G4LENDDATA"<<G4endl
99  << "to point to the directory containing these LEND data."<<G4endl
100  << "Data files for Low Energy Nuclear Data (LEND) are available from" <<
101  " ftp://gdo-nuclear.ucllnl.org/pub/."<<G4endl<<G4endl;
102  fail=true;
103  }
104  break;
105  case radioactive:
106  if(!getenv("G4RADIOACTIVEDATA") )
107  {
108  desc << "Radioactive decay data are needed."<<G4endl
109  << "Please set the environmental variable G4RADIOACTIVEDATA"<<G4endl
110  << "to point to your RadiativeDecay directory."<<G4endl
111  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
112  fail=true;
113  }
114  break;
115  case lowenergy:
116  if(!getenv("G4LEDATA") )
117  {
118  desc << "Low energy electromagnetic data are needed."<<G4endl
119  << "Please set the environmental variable G4LEDATA"<<G4endl
120  << "to point to your G4EMLOW directory."<<G4endl
121  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
122  fail=true;
123  }
124  break;
125  case optical:
126  /*
127  if(!getenv("G4REALSURFACEDATA") )
128  {
129  desc << "Data describing surface propeties for optical photons are needed."<<G4endl
130  << "Please set the environmental variable G4REALSURFACEDATA"<<G4endl
131  << "to point to your RealSurface directory."<<G4endl
132  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
133  fail=true;
134  }
135  */
136  break;
137  case neutronxs:
138  if(!getenv("G4NEUTRONXSDATA") )
139  {
140  desc << "G4NEUTRONXS are needed."<<G4endl
141  << "Please set the environmental variable G4NEUTRONXSDATA"<<G4endl
142  << "to point to your G4NEUTRONXS directory."<<G4endl
143  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
144  fail=true;
145  }
146  break;
147  case abla:
148  if(!getenv("G4ABLADATA") )
149  {
150  desc << "ABLA data are needed."<<G4endl
151  << "Please set the environmental variable G4ABLADATA"<<G4endl
152  << "to point to your ABLA data directory."<<G4endl
153  << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
154  fail=true;
155  }
156  break;
157  case no:
158  // all ok
159  break;
160  default:
161  if(t!=no)
162  {
163  G4Exception("G4DataQuestionaire", "PhysicsLists003", FatalException,
164  "data type requested is not known to the system");
165  }
166  }
167  }
168  if (fail) {
169 
170  desc << "*** Fatal error: Missing mandatory data for this simulation engine ***"<<G4endl;
171  G4Exception("G4DataQuestionaire", "PhysicsLists002", FatalException, desc);
172  }
173  }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
tuple t1
Definition: plottest35.py:33
#define G4endl
Definition: G4ios.hh:61
G4DataQuestionaire::~G4DataQuestionaire ( )
inline

Definition at line 174 of file G4DataQuestionaire.hh.

174 {}

The documentation for this class was generated from the following file: