GPS Commands Not working w/ OpenGL on Windows

I’m having some issues with using GPS commands (they don’t seem to appear to be in the dropdown). It seems like OpenGL is not taking them. Has anybody else run into this issue?

1 Like

Does your application instantiate a G4GeneralParticleSource instance as a member of your G4PrimaryGeneratorAction? The Messenger (which creates the UI commands) isn’t instantiated until the object is.

1 Like

I have this under a particle generator class which is called by my main(). What else do I need to do?

particleGenerator::particleGenerator(G4int n_particle, G4String particleName, G4ThreeVector particlePosition)
numParticle = n_particle;
fParticleSource = new G4GeneralParticleSource();
fParticleSource → SetNumberOfParticles(numParticle);
particleTable = G4ParticleTable::GetParticleTable();
particle = particleTable → FindParticle(particleName);

delete fParticleSource;
delete particle;

void particleGenerator::GeneratePrimaries(G4Event* anEvent)

Ok. I see what’s going on. Looks like there was a separate wrapper like PrimaryGeneratorAction.hh class that calls G4VUserActionInitialization that needs to be declared in order to prevent a different class like G4MTRunManager from calling SetUserAction instead …

1 Like

Hi siygu,

can you please elaborate? I’m facing the same issue and I’m uncertain what to do.

Thank you!