29 #include "G4String.hh"
43 tbb::concurrent_queue<const G4Run*>* out,
48 beamOnCondition(false)
56 #include <tbb/atomic.h>
58 tbb::atomic<int> counter;
115 G4int thisId = counter.fetch_and_increment();
154 localRM->G4RunManager::SetUserInitialization(
155 const_cast<G4VUserDetectorConstruction*>(detector));
157 localRM->SetUserInitialization(const_cast<G4VUserPhysicsList*>(physicslist));
166 localRM->Initialize();
172 std::vector<G4String>::const_iterator it = cmds.begin();
173 for(;it!=cmds.end();it++)
178 if ( macroFile ==
"" || macroFile ==
" " )
180 localRM->BeamOn(nEvents,0,numSelect);
184 localRM->BeamOn(nEvents,macroFile,numSelect);
191 beamOnCondition = localRM->ConfirmBeamOnCondition();
192 if (beamOnCondition) {
193 localRM->SetNumberOfEventsToBeProcessed( nEvents );
194 localRM->ConstructScoringWorlds();
195 localRM->RunInitialization();
205 if ( beamOnCondition ) {
206 localRM->DoEventLoop( nEvents );
232 return static_cast<tbb::task*
>(NULL);
std::vector< G4String > GetCommandStack()
void SetUpForAThread(G4int tId)
virtual void SetupRNGEngine(const CLHEP::HepRandomEngine *aRNGEngine) const
virtual void WorkerInitialize() const
G4String GetSelectMacro() const
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
virtual void WorkerStart() const
static void BuildGeometryAndPhysicsVector()
void G4SetThreadId(G4int aNewValue)
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
virtual G4WorkerRunManager * CreateWorkerRunManager() const
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
static G4MTRunManager * GetMasterRunManager()
tbbTask(G4int anId, tbb::concurrent_queue< const G4Run * > *output=0, G4int nEvts=1)
virtual void Build() const =0
const G4VUserActionInitialization * GetUserActionInitialization() const
G4int GetNumberOfSelectEvents() const
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
static void SetInstance(G4VSteppingVerbose *Instance)
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
const CLHEP::HepRandomEngine * getMasterRandomEngine() const
virtual G4VSteppingVerbose * InitializeSteppingVerbose() const
const G4VUserPhysicsList * GetUserPhysicsList() const
G4int ApplyCommand(const char *aCommand)