31 #include "B2bDetectorConstruction.hh"
32 #include "B2ActionInitialization.hh"
54 #include <tbb/task_scheduler_init.h>
67 tbb::task_list* tasks =
static_cast<tbb::task_list*
>(arg);
71 std::cout<<
"Now calling 'tbb::task::spawn_work_and_wait' "<<std::endl;
72 tbb::task::spawn_root_and_wait( *tasks );
73 }
catch(std::exception&
e) {
74 std::cerr<<
"Error occurred. Error info is:\""<<e.what()<<
"\""<<std::endl;
81 int main(
int argc,
char** argv)
88 unsigned int numberOfCoresToUse= (numCoresAvailable > 1 ) ? 2 : 1 ;
90 tbb::task_scheduler_init init( numberOfCoresToUse );
125 G4String command =
"/control/execute ";
133 runManager->
BeamOn(nEvents);
G4int ApplyCommand(const char *aCommand)
void SetNumberEventsPerTask(G4int nt)
G4int G4GetNumberOfCores()
static G4UImanager * GetUIpointer()
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
void SetTaskList(tbb::task_list *tl)
void RegisterPhysics(G4VPhysicsConstructor *)
virtual void SetUserInitialization(G4VUserPhysicsList *userPL)
int main(int argc, char **argv)
TFTFP_BERT< G4VModularPhysicsList > FTFP_BERT
G4ThreadFunReturnType startWork(G4ThreadFunArgType arg)
void * G4ThreadFunReturnType
void * G4ThreadFunArgType
#define G4THREADJOIN(worker)
virtual void Initialize()
void G4THREADCREATE(_Worker *&worker, _Func func, _Args...args)