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

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

import all except CVS

File size: 4.8 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};
36class G4DataQuestionaire
37{
38  public: 
39    G4DataQuestionaire(G4DataType t1=no, G4DataType t2=no, G4DataType t3=no, G4DataType t4=no) 
40    {
41      G4cout << G4endl;
42      G4cout << "<<< Geant4 Physics List engine packaging library: PACK 5.4"<<G4endl;
43      //      G4cout <<G4endl<<G4endl;
44      // G4cout << "##### the input "<<t1<<" "<<t2<<" "<<t3<<" "<<t4<<G4endl;
45      for(G4int i=0; i<4; 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        switch(t)
53        {
54          case photon:
55            if(!getenv("G4LEVELGAMMADATA") )
56            {
57              G4cout << "Photon-evaporation data are needed."<<G4endl;
58              G4cout << "Please set the environmental variable G4LEVELGAMMADATA"<<G4endl;
59              G4cout << "to point to your PhotonEvaporation directory."<<G4endl;
60              G4cout << "Data are available from the Geant4 download page."<<G4endl;
61              G4Exception("G4DataQuestionaire", "007", FatalException,
62                          "Fatal error: Missing mandatory data for this simulation engine");
63            }
64            break;
65          case neutron:
66            if(!getenv("G4NEUTRONHPDATA") )
67            {
68              G4cout << "G4NDL are needed."<<G4endl;
69              G4cout << "Please set the environmental variable G4NEUTRONHPDATA"<<G4endl;
70              G4cout << "to point to your G4NDL directory."<<G4endl;
71              G4cout << "Data are available from the Geant4 download page."<<G4endl;
72              G4Exception("G4DataQuestionaire", "007", FatalException,
73                          "Fatal error: Missing mandatory data for this simulation engine");
74            }
75            break;
76          case radioactive:
77            if(!getenv("G4RADIOACTIVEDATA") )
78            {
79              G4cout << "Radioactive decay data are needed."<<G4endl;
80              G4cout << "Please set the environmental variable G4RADIOACTIVEDATA"<<G4endl;
81              G4cout << "to point to your RadiativeDecay directory."<<G4endl;
82              G4cout << "Data are available from the Geant4 download page."<<G4endl;
83              G4Exception("G4DataQuestionaire", "007", FatalException,
84                          "Fatal error: Missing mandatory data for this simulation engine");
85            }
86            break;
87          case lowenergy:
88            if(!getenv("G4LEDATA") )
89            {
90              G4cout << "Low energy electromagnetic data are needed."<<G4endl;
91              G4cout << "Please set the environmental variable G4LEDATA"<<G4endl;
92              G4cout << "to point to your G4EMLOW directory."<<G4endl;
93              G4cout << "Data are available from the Geant4 download page."<<G4endl;
94              G4Exception("G4DataQuestionaire", "007", FatalException,
95                          "Fatal error: Missing mandatory data for this simulation engine");
96            }
97            break;
98          case no:
99            // all ok
100            break;
101          default:
102            if(t!=no) 
103            {
104              G4Exception("G4DataQuestionaire", "007", FatalException,
105                          "data type requested is not known to the system");
106            }
107        }
108     }
109   }
110    ~G4DataQuestionaire() {}
111};
112
113// 2002 by J.P. Wellisch
114
115#endif
116
Note: See TracBrowser for help on using the repository browser.