Hello, I’m trying to write a function tu show the percent of the running progress
-
In the B1EventAction.cc I wrote:
a.B1EventAction::B1EventAction(B1RunAction* runAction) : G4UserEventAction(), fRunAction(runAction), fEdep(0.) fPrintModulo(10000) {}
b.
fPrintModulo= 10000;
c.
evtNb = evt->GetEventID();
NevTot=G4RunManager::GetRunManager()->GetCurrentRun()->GetNumberOfEventToBeProcessed();
if ((100/fPrintModulo*evtNb)%NevTot==0) G4cout <<"\n---> Begin of Event:"<<evtNb<<" of "<<NevTot<<" Progress % is "<<(100*evtNb)/NevTot<<G4endl;
- In the B1Eventaction.hh I wrote
virtual void BeginOfEventAction(const G4Event* evt);
G4int fPrintModulo;
but I get error
Notice that I assigned to fPrintModulo the number of events that I want to simulate