Commit 44eb0770 authored by kraus's avatar kraus Committed by kraus

fixing H5Part output of simulation with follow-up tracks

parent 8835961b
......@@ -226,11 +226,12 @@ void TrackRun::execute() {
void TrackRun::setupSliceTracker() {
OpalData::getInstance()->setInOPALEnvMode();
bool isFollowupTrack = OPAL->hasSLBunchAllocated() && !Options::scan;
if(!OPAL->hasSLBunchAllocated()) {
*gmsg << "* ********************************************************************************** " << endl;
*gmsg << "* Selected Tracking Method == PARALLEL-SLICE, NEW TRACK" << endl;
*gmsg << "* ********************************************************************************** " << endl;
} else if(OPAL->hasSLBunchAllocated() && !Options::scan) {
} else if(isFollowupTrack) {
*gmsg << "* ********************************************************************************** " << endl;
*gmsg << "* Selected Tracking Method == PARALLEL-SLICE, FOLLOWUP TRACK" << endl;
*gmsg << "* ********************************************************************************** " << endl;
......@@ -247,6 +248,11 @@ void TrackRun::setupSliceTracker() {
OPAL->getRestartStep(),
OpalData::getInstance()->getRestartFileName(),
H5_O_WRONLY);
} else if (isFollowupTrack) {
phaseSpaceSink_m = new H5PartWrapperForPS(OPAL->getInputBasename() + std::string(".h5"),
-1,
OPAL->getInputBasename() + std::string(".h5"),
H5_O_WRONLY);
} else {
phaseSpaceSink_m = new H5PartWrapperForPS(OPAL->getInputBasename() + std::string(".h5"),
H5_O_WRONLY);
......@@ -385,6 +391,11 @@ void TrackRun::setupTTracker(){
OPAL->getRestartStep(),
OpalData::getInstance()->getRestartFileName(),
H5_O_WRONLY);
} else if (isFollowupTrack) {
phaseSpaceSink_m = new H5PartWrapperForPT(OPAL->getInputBasename() + std::string(".h5"),
-1,
OPAL->getInputBasename() + std::string(".h5"),
H5_O_WRONLY);
} else {
phaseSpaceSink_m = new H5PartWrapperForPT(OPAL->getInputBasename() + std::string(".h5"),
H5_O_WRONLY);
......@@ -508,6 +519,11 @@ void TrackRun::setupCyclotronTracker(){
OPAL->getRestartStep(),
OpalData::getInstance()->getRestartFileName(),
H5_O_WRONLY);
} else if (OPAL->hasBunchAllocated() && !Options::scan) {
phaseSpaceSink_m = new H5PartWrapperForPC(OPAL->getInputBasename() + std::string(".h5"),
-1,
OPAL->getInputBasename() + std::string(".h5"),
H5_O_WRONLY);
} else {
phaseSpaceSink_m = new H5PartWrapperForPC(OPAL->getInputBasename() + std::string(".h5"),
H5_O_WRONLY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment