![]() |
|
|||
File indexing completed on 2025-08-05 08:21:08
0001 #ifndef _PYTHIAERHIC_PYTHIA_ERHIC_H_ 0002 #define _PYTHIAERHIC_PYTHIA_ERHIC_H_ 0003 0004 /* 0005 \file pythia_erhic.h 0006 Interfaces to entities in the eRHIC PYTHIA module. 0007 0008 A note on name conversion between Fortran and C, 0009 true for gfortran at the time of writing. 0010 0011 A subroutine or variable named x in Fortran 0012 will be named x_ (i.e. with a single trailing 0013 underscore) in C++. 0014 If the subroutine or variable is in a module named y, 0015 then the object x in Fortran will be named 0016 __y_MOD_x in C (i.e. TWO leading underscores, _MOD_ 0017 between the module and object names, and no 0018 trailing underscore). 0019 Note that a common block declared in the module 0020 has the normal (i.e. single underscore) name, not 0021 the module convention. 0022 If in doubt, use nm to look for symbol names in 0023 the Fortran .o file. 0024 0025 Also note that we put 'extern "C"' around all the 0026 variable and subroutine declarations to avoid 0027 C++ name mangling. 0028 0029 \author Thomas Burton 0030 \date 10/9/12 0031 \copyright 2012 BNL 0032 */ 0033 0034 // I'm usually averse to macros, but let's use one to generate 0035 // the C++ equivalent variable names of Fortran variables. 0036 // This should work for objects and subroutines: 0037 // FROM_FORTRAN_MODULE(pythia6, object) 0038 // FROM_FORTRAN_MODULE(pythia6, subroutine()) 0039 //#define FROM_FORTRAN_MODULE(module, variable) __##module##_MOD_##variable 0040 0041 extern "C" { 0042 // Initialisation subroutine. 0043 int __pythia6_MOD_initialise(); 0044 int __pythia6_MOD_generate(); 0045 void __pythia6_MOD_finish(); 0046 0047 // Flag for printing ASCII output or not. 0048 // Set to 0 to suppress ASCII output, non-0 to generate it. 0049 extern int __pythia6_MOD_printascii; 0050 extern int __pythia6_MOD_genevent; 0051 extern double __pythia6_MOD_truex; 0052 extern double __pythia6_MOD_truew2; 0053 extern double __pythia6_MOD_truenu; 0054 extern double __pythia6_MOD_f1; 0055 extern double __pythia6_MOD_f2; 0056 extern double __pythia6_MOD_r; 0057 extern double __pythia6_MOD_sigma_rad; 0058 extern double __pythia6_MOD_sigradcor; 0059 extern double __pythia6_MOD_ebrems; 0060 extern double __pythia6_MOD_radgame; 0061 extern double __pythia6_MOD_radgamp[3]; 0062 } // extern "C" 0063 0064 #endif // _PYTHIAERHIC_PYTHIA_ERHIC_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |