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

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

update ti head

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