Commit 6eb60cca authored by ext-calvo_p's avatar ext-calvo_p

fix hasTime condition

parent 9170b265
......@@ -241,11 +241,14 @@ void LossDataSink::writeHeaderH5() {
void LossDataSink::writeHeaderASCII() {
os_m << "# Element " << element_m << " x (m), y (m), z (m), px ( ), py ( ), pz ( ), id";
if (hasTimeAttribute()) {
os_m << ", turn, bunchNumber, time (ns) ";
bool hasTime = hasTimeAttribute();
if(Ippl::myNode() == 0) {
os_m << "# Element " << element_m << " x (m), y (m), z (m), px ( ), py ( ), pz ( ), id";
if (hasTime) {
os_m << ", turn, bunchNumber, time (ns) ";
}
os_m << std::endl;
}
os_m << std::endl;
}
......
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