#include <neugen3_dummy.h>
Public Member Functions | |
| nulook_wrapper () | |
| ~nulook_wrapper () | |
| void | configure (const neugen_config *conf) |
| xsec_vs_energy * | run (const neugen_inputs *inputs) |
Protected Member Functions | |
| void | create_neugen_config_card (void) const |
| void | create_neugen_inputs_card (void) const |
| void | run_nulook (void) const |
| void | merge_nulook_output (void) const |
| const char * | path (const char *env_var) const |
| const char * | full_path_to_file (const char *env_var, const char *filename) const |
| bool | file_exists (const char *env_var, const char *filename) const |
| bool | cards_were_created (void) const |
Protected Attributes | |
| const neugen_config * | _current_config |
| const neugen_inputs * | _current_inputs |
NuValidator/generators/nugen
Costas Andreopoulos (Rutherford Lab.) <C.V.Andreopoulos@rl.ac.uk> Hugh Gallagher (Tufts University) <gallag@minos.phy.tufts.edu> _______________________________________________________________________________
Definition at line 33 of file neugen3_dummy.h.
|
|
Definition at line 27 of file nulook_wrapper.cxx. 00028 {
00029
00030 }
|
|
|
Definition at line 32 of file nulook_wrapper.cxx. 00033 {
00034
00035 }
|
|
|
Definition at line 146 of file nulook_wrapper.cxx. References file_exists(). Referenced by run(). 00147 {
00148 return file_exists("NEUGEN3PATH","inputs.txt");
00149 }
|
|
|
Definition at line 37 of file nulook_wrapper.cxx. References _current_config. 00038 {
00039 _current_config = conf;
00040
00041 cout << "Configuring NuGEN: " << endl;
00042 cout << _current_config << endl;
00043 }
|
|
|
Definition at line 89 of file nulook_wrapper.cxx. Referenced by run(). 00090 {
00091 // not yet in NeuGEN
00092 }
|
|
|
Definition at line 94 of file nulook_wrapper.cxx. References _current_inputs, file_exists(), full_path_to_file(), gSystem(), and neugen_inputs::write_neugen_input_card(). Referenced by run(). 00095 {
00096 //-- backup the previous card (if one exists)
00097
00098 if ( file_exists("NEUGEN3PATH","inputs.txt") )
00099 gSystem->Rename( full_path_to_file("NEUGEN3PATH","inputs.txt"),
00100 full_path_to_file("NEUGEN3PATH","inputs.txt.bak") );
00101
00102 //-- and create the new one
00103
00104 _current_inputs->write_neugen_input_card(
00105 full_path_to_file("NEUGEN3PATH", "inputs.txt"));
00106 }
|
|
||||||||||||
|
Definition at line 138 of file nulook_wrapper.cxx. References full_path_to_file(), and gSystem(). Referenced by cards_were_created(), and create_neugen_inputs_card(). 00140 {
00141 //-- invert the strange/default definition of TSystem::AccessPathName return
00142
00143 return !(gSystem->AccessPathName(full_path_to_file(env_var,filename) ));
00144 }
|
|
||||||||||||
|
Definition at line 128 of file nulook_wrapper.cxx. References path(). Referenced by create_neugen_inputs_card(), file_exists(), and run(). 00130 {
00131 ostringstream full_path;
00132
00133 full_path << path(env_var) << "/" << filename;
00134
00135 return full_path.str().c_str();
00136 }
|
|
|
Definition at line 114 of file nulook_wrapper.cxx. References gSystem(), and path(). Referenced by run(). 00115 {
00116 ostringstream command;
00117
00118 command << path("VALIDATOR") << "/src/scripts/merge_nulook";
00119
00120 gSystem->Exec( command.str().c_str() );
00121 }
|
|
|
Definition at line 123 of file nulook_wrapper.cxx. References gSystem(). Referenced by full_path_to_file(), merge_nulook_output(), and run_nulook(). 00124 {
00125 return gSystem->Getenv(env_var);
00126 }
|
|
|
Definition at line 45 of file nulook_wrapper.cxx. References _current_inputs, cards_were_created(), create_neugen_config_card(), create_neugen_inputs_card(), full_path_to_file(), gSystem(), xsec_vs_energy::load_from_file(), merge_nulook_output(), and run_nulook(). 00046 {
00047 _current_inputs = inputs;
00048
00049 xsec_vs_energy * xsec_e = new xsec_vs_energy();
00050
00051 //-- create NeuGEN cards
00052 create_neugen_config_card();
00053 create_neugen_inputs_card();
00054
00055 //-- create a TStopwatch and use it to check whether card creation time
00056 // exceeds an acceptable time limit...
00057
00058 TStopwatch timeout_guard;
00059 timeout_guard.Start();
00060
00061 //-- now wait for cards to be created, but do not lock me in this state -
00062 // if it does not happen in t < k_timeout, tide up your mess & exit
00063 // returning a null pointer
00064
00065 while( ! cards_were_created() ) {
00066
00067 gSystem->Sleep(100); // wait a little bit
00068
00069 timeout_guard.Stop();
00070 if( timeout_guard.CpuTime() > k_timeout) {
00071 delete xsec_e;
00072 return 0;
00073 }
00074 timeout_guard.Start(kFALSE); // do not reset the timer
00075 }
00076
00077 //-- run nulook
00078 run_nulook();
00079
00080 //-- merge nulook output files
00081 merge_nulook_output();
00082
00083 //-- load xsec_vs_energy object
00084 xsec_e->load_from_file( full_path_to_file("NEUGEN3PATH", "fort.16_17") );
00085
00086 return xsec_e;
00087 }
|
|
|
Definition at line 108 of file nulook_wrapper.cxx. References gSystem(), and path(). Referenced by run().
|
|
|
Definition at line 48 of file nulook_wrapper.h. Referenced by configure(). |
|
|
Definition at line 49 of file nulook_wrapper.h. Referenced by create_neugen_inputs_card(), and run(). |
1.3.9.1