1 // Pythia6Interface.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2008 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
6 // Header file for the Pythia 6.4 f77 external linkage to C++.
7 // All required code is contained here, i.e. there is no matching .cc file.
9 #ifndef Pythia8_Pythia6Interface_H
10 #define Pythia8_Pythia6Interface_H
14 //**************************************************************************
16 // Declare the f77 subroutines that may be used.
20 extern void pygive_(const char*, int);
22 extern void pyinit_(const char*, const char*, const char*, double&,
25 extern void pyupin_();
27 extern void pyupev_();
29 extern void pylist_(int&);
31 extern void pystat_(int&);
35 //**************************************************************************
37 // Interfaces to the above routines, to make the C++ calls similar to f77.
39 class Pythia6Interface {
43 // Give in a command to change a setting.
44 static void pygive(const string cmnd) {
45 const char* cstring = cmnd.c_str(); int len = cmnd.length();
46 pygive_(cstring, len);
49 // Initialize the generation for the given beam confiuration.
50 static void pyinit(const string frame, const string beam,
51 const string target, double wIn) {
52 const char* cframe = frame.c_str(); int lenframe = frame.length();
53 const char* cbeam = beam.c_str(); int lenbeam = beam.length();
54 const char* ctarget = target.c_str(); int lentarget = target.length();
55 pyinit_(cframe, cbeam, ctarget, wIn, lenframe, lenbeam, lentarget);
58 // Fill the initialization information in the HEPRUP commonblock.
59 static void pyupin() {pyupin_();}
61 // Generate the next hard process and
62 // fill the event information in the HEPEUP commonblock
63 static void pyupev() {pyupev_();}
65 // List the event at the process level.
66 static void pylist(int mode) {pylist_(mode);}
68 // Print statistics on the event generation process.
69 static void pystat(int mode) {pystat_(mode);}
73 //**************************************************************************
76 } // end namespace Pythia8
78 #endif // Pythia8_Pythia6Interface_H