numass-framework/numass-client/src/main/java/inr/numass/client/ClientUtils.java
2017-04-15 22:15:53 +03:00

25 lines
651 B
Java

package inr.numass.client;
import hep.dataforge.meta.Meta;
import java.io.IOException;
/**
* Created by darksnake on 09-Oct-16.
*/
public class ClientUtils {
public static String getRunName(Meta config) {
if (config.hasValue("numass.run")) {
return config.getString("numass.run");
} else if (config.hasMeta("numass.server")) {
try {
return new NumassClient(config.getMeta("numass.server")).getCurrentRun().getString("path");
} catch (IOException e) {
return "";
}
} else {
return "";
}
}
}