Can anyone helpe me to read IAEAPhaseSpace file as a source?

Dear all,
As my title, I want to read an IAEA Phasespace file as a source. I tried to read the file as an example code but it did not work. Please help me.

#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
class G4Event;
class G4IAEAphspReader;
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
void GeneratePrimaries(G4Event*);
// Phase space reader
G4IAEAphspReader* theIAEAReader;
#include "PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4IAEAphspReader.hh"
G4String fileName = "PSF";
theIAEAReader = new G4IAEAphspReader(fileName);
if (theIAEAReader) delete theIAEAReader;
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
1 Like

The source codes look fine to me.
What error did the program report?

Sir, this is the error

It seems some functions get passed 1 argument, but they need more or (more likely) 0 arguments.
Could you show me which function it is in your G4IAEAphspReader (154,50), (217,73) …
In my version of G4IAEAphspReader, there is no function in those positions at all.

Dear sir,
I dowloaded the IAEA file at here: Phase-space database for external beam radiotherapy