Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pythia_erhic.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pythia_erhic.h
1 #ifndef _PYTHIAERHIC_PYTHIA_ERHIC_H_
2 #define _PYTHIAERHIC_PYTHIA_ERHIC_H_
3 
4 /*
5  \file pythia_erhic.h
6  Interfaces to entities in the eRHIC PYTHIA module.
7 
8  A note on name conversion between Fortran and C,
9  true for gfortran at the time of writing.
10 
11  A subroutine or variable named x in Fortran
12  will be named x_ (i.e. with a single trailing
13  underscore) in C++.
14  If the subroutine or variable is in a module named y,
15  then the object x in Fortran will be named
16  __y_MOD_x in C (i.e. TWO leading underscores, _MOD_
17  between the module and object names, and no
18  trailing underscore).
19  Note that a common block declared in the module
20  has the normal (i.e. single underscore) name, not
21  the module convention.
22  If in doubt, use nm to look for symbol names in
23  the Fortran .o file.
24 
25  Also note that we put 'extern "C"' around all the
26  variable and subroutine declarations to avoid
27  C++ name mangling.
28 
29  \author Thomas Burton
30  \date 10/9/12
31  \copyright 2012 BNL
32  */
33 
34 // I'm usually averse to macros, but let's use one to generate
35 // the C++ equivalent variable names of Fortran variables.
36 // This should work for objects and subroutines:
37 // FROM_FORTRAN_MODULE(pythia6, object)
38 // FROM_FORTRAN_MODULE(pythia6, subroutine())
39 //#define FROM_FORTRAN_MODULE(module, variable) __##module##_MOD_##variable
40 
41 extern "C" {
42  // Initialisation subroutine.
45  void __pythia6_MOD_finish();
46 
47  // Flag for printing ASCII output or not.
48  // Set to 0 to suppress ASCII output, non-0 to generate it.
49  extern int __pythia6_MOD_printascii;
50  extern int __pythia6_MOD_genevent;
51  extern double __pythia6_MOD_truex;
52  extern double __pythia6_MOD_truew2;
53  extern double __pythia6_MOD_truenu;
54  extern double __pythia6_MOD_f1;
55  extern double __pythia6_MOD_f2;
56  extern double __pythia6_MOD_r;
57  extern double __pythia6_MOD_sigma_rad;
58  extern double __pythia6_MOD_sigradcor;
59  extern double __pythia6_MOD_ebrems;
60  extern double __pythia6_MOD_radgame;
61  extern double __pythia6_MOD_radgamp[3];
62 } // extern "C"
63 
64 #endif // _PYTHIAERHIC_PYTHIA_ERHIC_H_