]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8130/include/Pythia6Interface.h
using option '-treename HLTesdTree' for EsdCollector, adding default parameter for...
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8130 / include / Pythia6Interface.h
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.
5
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.
8
9 #ifndef Pythia8_Pythia6Interface_H
10 #define Pythia8_Pythia6Interface_H
11
12 namespace Pythia8 {
13
14 //**************************************************************************
15
16 // Declare the f77 subroutines that may be used.
17
18 extern "C" {
19
20   extern void pygive_(const char*, int);
21
22   extern void pyinit_(const char*, const char*, const char*, double&,
23     int, int, int);
24
25   extern void pyupin_();
26
27   extern void pyupev_();
28
29   extern void pylist_(int&);
30
31   extern void pystat_(int&);
32
33 }
34
35 //**************************************************************************
36
37 // Interfaces to the above routines, to make the C++ calls similar to f77.
38
39 class Pythia6Interface {
40
41 public:
42
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);
47   }
48
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); 
56   }
57   
58   // Fill the initialization information in the HEPRUP commonblock.
59   static void pyupin() {pyupin_();}
60
61   // Generate the next hard process and 
62   // fill the event information in the HEPEUP commonblock
63   static void pyupev() {pyupev_();}
64
65   // List the event at the process level.
66   static void pylist(int mode) {pylist_(mode);}
67
68   // Print statistics on the event generation process.
69   static void pystat(int mode) {pystat_(mode);}
70
71 };
72
73 //**************************************************************************
74
75
76 } // end namespace Pythia8
77
78 #endif // Pythia8_Pythia6Interface_H