numass-framework/numass-client/src/main/java/inr/numass/client/ClientUtils.java

25 lines
651 B
Java
Raw Normal View History

2016-10-09 20:13:25 +03:00
package inr.numass.client;
import hep.dataforge.meta.Meta;
import java.io.IOException;
/**
* Created by darksnake on 09-Oct-16.
*/
public class ClientUtils {
2016-10-14 16:31:21 +03:00
public static String getRunName(Meta config) {
2016-10-09 20:13:25 +03:00
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) {
2016-10-14 16:31:21 +03:00
return "";
2016-10-09 20:13:25 +03:00
}
} else {
2016-10-14 16:31:21 +03:00
return "";
2016-10-09 20:13:25 +03:00
}
}
}