Problems with starting pythia8 example


ROOT Version: Not Provided 6
Platform: Not Provided Ubuntu 6.4.0-8ubuntu1
Compiler: Not Provided gcc version 6.4.0 20171010


Dear colleagues,

I’m trying to start using PYTHIA with Root. I tried to start the given in tutorial example “pythia8 basic example” and got the errors:
pythia8_example.C:13:10: error: cannot initialize a variable of type ‘char *’ with an rvalue of type ‘const char *’
char *p8dataenv = gSystem->Getenv(“PYTHIA8DATA”);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/pythia8_example.C:16:13: error: cannot initialize a variable of type ‘char *’ with an rvalue of type ‘const char *’
char *p8env = gSystem->Getenv(“PYTHIA8”);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
/pythia8_example.C:48:4: error: unknown type name ‘TPythia8’
TPythia8* pythia8 = new TPythia8();
^
… and so on…
What can be the reason for that?
Thanks in advance,
Anna

It looks like you have an old version of the script. Compare with:
https://root.cern.ch/root/html/tutorials/pythia/pythia8.C.html

That’s true. Now it works. Thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.