#include "KM3ActionInitialization.hh" void KM3ActionInitialization::Build() const{ KM3PrimaryGeneratorAction* myGeneratorAction = new KM3PrimaryGeneratorAction(); myGeneratorAction->evtAANET = evtAANETWriter; myGeneratorAction->useANTARESformat = useANTARESformat; myGeneratorAction->useAANETformat = useAANETformat; myGeneratorAction->fileParticles = infile; myGeneratorAction->verbosity = verbosity; myDet->MyGenerator = myGeneratorAction; KM3TrackingAction* myTracking = new KM3TrackingAction(); myTracking->evtAANETWriter = evtAANETWriter; myTracking->useANTARESformat = useANTARESformat; myTracking->max_event_time = max_event_time; myGeneratorAction->myTracking = myTracking; // link between generator and tracking (to provide number of initial particles to trackingAction) myGeneratorAction->Initialize(); KM3EventAction* event_action = new KM3EventAction(); event_action->evtAANETWriter = evtAANETWriter; event_action->useANTARESformat = useANTARESformat; event_action->useAANETformat = useAANETformat; myGeneratorAction->event_action = event_action; // generator knows event to // set the number of initial // particles KM3StackingAction* myStacking = new KM3StackingAction(); myStacking->max_event_time = max_event_time; myStacking->verbosity = verbosity; KM3SteppingAction* myStepping = new KM3SteppingAction(); myStacking->SetDetector(myDet); myStepping->myStDetector = myDet; myStepping->event_action = event_action; SetUserAction(myGeneratorAction); SetUserAction(event_action); SetUserAction(myTracking); SetUserAction(myStepping); SetUserAction(myStacking); } void KM3ActionInitialization::BuildForMaster() const{ } int KM3ActionInitialization::GetNumberOfEvents(){ return evtAANETWriter->GetNumberOfEvents();}