[i]I copied all pythia header files to the folder $ROOTSYS/include. Now the code compiles without any problem. But when executed, it gives upto 90% of the results and hangs showing the error
*** Break *** segmentation violation
I tried to cut down the code, so that i can find out the problem.
[b]#include
#include “TROOT.h”
#include “TFile.h”
#include <stdio.h>
#include “TChain.h”
#include “string.h”
#include “TSystem.h”
#include “TH1F.h”
#include “TClonesArray.h”
#include “TPythia8.h”
#include “TParticle.h”
#include “TCanvas.h”
using namespace std;
int myHiggs2(Int_t nev = 100, Int_t ndeb = 2) {
char* path = gSystem->ExpandPathName("$PYTHIA8DATA");
// Load libraries
gSystem->Load("$PYTHIA8/lib/libpythia8");
gSystem->Load(“libEG”);
gSystem->Load(“libEGPythia8”);
gSystem->Load(“libPythiaDict”);
gSystem->Load("$PYTHIA8/include/Pythia.h");
// Create pythia8 object
TPythia8 tpythia8;
Pythia8::Pythia *pythia8 = tpythia8.Pythia8();
// Configure
pythia8->readString(“HiggsSM:gg2H = on”);
//List changed settings
pythia8->particleData.listChanged();
// Initialize
pythia8->init(2212, 2212, 7000.);
// Event loop
for (Int_t iev = 0; iev < nev; iev++) {
if(!(pythia8->next())) continue;
if (iev < ndeb)
{
pythia8->process.list();
// pythia8->event.list();
}
}
pythia8->statistics();
return 0;
}[/b]
The code compiles without any problem. But after it prints out the statistics, it hangs saying
*** Break *** segmentation violation
It also shows the error.
Note: File “/usr/local/root/lib/libEG.so” already loaded
Error in TUnixSystem::DynamicPathName: libPythiaDict[.so | .sl | .dl | .a | .dll] does not exist in .:/usr/local/root/lib::/usr/local/root/lib:/usr/local/root/cint/cint/stl
Error in TUnixSystem::DynamicPathName: $PYTHIA8/include/Pythia.h[.so | .sl | .dl | .a | .dll] does not exist in .:/usr/local/root/lib::/usr/local/root/lib:/usr/local/root/cint/cint/stl[/i]