13 #include "Pythia8/Pythia.h"
14 #include "CombineMatchingInput.h"
15 using namespace Pythia8;
23 pythia.readFile(
"main32.cmnd");
26 int nEvent = pythia.mode(
"Main:numberOfEvents");
27 int nAbort = pythia.mode(
"Main:timesAllowErrors");
28 int nSkip = pythia.mode(
"Main:spareMode1");
32 UserHooks* matching = combined.getHook(pythia);
33 if (!matching)
return 1;
34 pythia.setUserHooksPtr(matching);
38 cout <<
"Error: could not initialise Pythia" << endl;
43 pythia.LHAeventSkip( nSkip );
47 for (
int iEvent = 0; ; ++iEvent) {
48 if (nEvent > 0 && iEvent >= nEvent)
break;
52 if (pythia.info.atEndOfFile()) {
53 cout <<
"Info: end of input file reached" << endl;
56 if (++iAbort < nAbort)
continue;
57 cout <<
"Abort: too many errors in generation" << endl;