Commit eb59bd65 authored by Jan Becker's avatar Jan Becker
Browse files

[hypo71] Set default directories according to documentation and install example files to doc/hypo71

parent 7deb3754
......@@ -5,24 +5,18 @@ IF (CMAKE_COMPILER_IS_GNUCC)
ENDIF (CMAKE_COMPILER_IS_GNUCC)
SET(
${PACKAGE_NAME}_SOURCES
configfile.cpp
hypo71.cpp
)
SET(
${PACKAGE_NAME}_HEADERS
configfile.h
hypo71.h
)
INCLUDE_DIRECTORIES(${CONFIGFILE_SOURCE_DIR})
SET(${PACKAGE_NAME}_SOURCES configfile.cpp hypo71.cpp)
SET(${PACKAGE_NAME}_HEADERS configfile.h hypo71.h)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_INCLUDE_DIR})
SC_ADD_PLUGIN_LIBRARY(${PACKAGE_NAME} hypo71 "")
SC_LINK_LIBRARIES_INTERNAL(hypo71 core)
FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml")
INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR})
INSTALL(DIRECTORY config/hypo71 DESTINATION ${SC3_PACKAGE_SHARE_DIR}/doc/hypo71/examples)
INSTALL(FILES README DESTINATION ${SC3_PACKAGE_SHARE_DIR}/doc/hypo71/)
INSTALL(FILES config/hypo71.cfg DESTINATION ${SC3_PACKAGE_SHARE_DIR}/doc/hypo71/examples/)
......@@ -40,9 +40,9 @@
# How to make it work: #
# #
# Load the plugin in scolv.cfg -> plugins = hypo71 #
# Add content of config/hypo71.cfg, edit properly paths, permissions #
# Add content of examples/hypo71.cfg, edit properly paths, permissions #
# #
# Copy config/hypo71/ into ${HOME}/hypo71/ #
# Copy examples/hypo71/ into share/hypo71/ #
# Edit run.sh and make paths match accordingly to those specified #
# in scolv.cfg #
# #
......
......@@ -27,28 +27,24 @@
########################################################################
# Hypo71 root directory (working directory)
HYPO71ROOT = ${HOME}/hypo71
# Hypo71 input file to process (generated by plugin)
hypo71.inputFile = ${HYPO71ROOT}/HYPO71.INP
hypo71.inputFile = @DATADIR@/hypo71/HYPO71.INP
# Hypo71 log file to store ZTR calculation and final results
hypo71.logFile = ${HYPO71ROOT}/HYPO71.LOG
hypo71.logFile = @DATADIR@/hypo71/HYPO71.LOG
# Hypo71 output file to read results from (generated by binary)
hypo71.outputFile = ${HYPO71ROOT}/HYPO71.PRT
hypo71.outputFile = @DATADIR@/hypo71/HYPO71.PRT
# Hypo71 script called by plugin
hypo71.hypo71ScriptFile = ${HYPO71ROOT}/run.sh
hypo71.hypo71ScriptFile = @DATADIR@/hypo71/run.sh
# Hypo71 default profile
hypo71.defaultControlFile = ${HYPO71ROOT}/profiles/default.hypo71.conf
hypo71.defaultControlFile = @DATADIR@/hypo71/profiles/default.hypo71.conf
# Hypo71 origin patternID
......@@ -62,6 +58,4 @@ hypo71.useHypo71PatternID = false
hypo71.profiles = ModelA
hypo71.profile.Tectonic.earthModelID = "My Velocity Model A"
hypo71.profile.Tectonic.methodID = Hypo71PC
hypo71.profile.Tectonic.controlFile = ${HYPO71ROOT}/profiles/profile.a.conf
hypo71.profile.Tectonic.controlFile = @DATADIR@/hypo71/profiles/profile.a.conf
......@@ -133,7 +133,7 @@ Futhermore add the plugin configuration:
hypo71.inputFile = @DATADIR@/hypo71/HYPO71.INP
# Hypo71 log file to store ZTR calculation and final results
hypo71.logFile = @LOGDIR@/HYPO71.LOG
hypo71.logFile = @DATADIR@/hypo71/HYPO71.LOG
# Hypo71 output file to read results from (generated by binary)
hypo71.outputFile = @DATADIR@/hypo71/HYPO71.PRT
......@@ -310,5 +310,3 @@ Take a look at `Fred Klein HYPOINVERSE Earthquake Location` software
Hypo71PC original manual and binary are available on JC Lahr website.
`<http://jclahr.com/science/software/hypo71/>`_
......@@ -171,8 +171,8 @@ bool Hypo71::init(const Config::Config& config) {
SEISCOMP_DEBUG("%s | logFile | %s", MSG_HEADER, _logFile.c_str());
}
catch ( ... ) {
_logFile = env->absolutePath("@LOGDIR@/HYPO71.LOG");
SEISCOMP_ERROR("%s | logFile | DEFAULT value: %s",
_logFile = env->absolutePath("@DATADIR@/hypo71/HYPO71.LOG");
SEISCOMP_DEBUG("%s | logFile | DEFAULT value: %s",
MSG_HEADER, _logFile.c_str());
}
......@@ -182,7 +182,7 @@ bool Hypo71::init(const Config::Config& config) {
}
catch ( ... ) {
_h71inputFile = env->absolutePath("@DATADIR@/hypo71/HYPO71.INP");
SEISCOMP_ERROR("%s | inputFile | DEFAULT value: %s",
SEISCOMP_DEBUG("%s | inputFile | DEFAULT value: %s",
MSG_HEADER, _h71inputFile.c_str());
}
......@@ -192,7 +192,7 @@ bool Hypo71::init(const Config::Config& config) {
}
catch ( ... ) {
_h71outputFile = env->absolutePath("@DATADIR@/hypo71/HYPO71.PRT");
SEISCOMP_ERROR("%s | outputFile | DEFAULT value: %s",
SEISCOMP_DEBUG("%s | outputFile | DEFAULT value: %s",
MSG_HEADER, _h71outputFile.c_str());
}
......@@ -202,7 +202,7 @@ bool Hypo71::init(const Config::Config& config) {
}
catch ( ... ) {
_controlFilePath = env->absolutePath("@DATADIR@/hypo71/profiles/default.hypo71.conf");
SEISCOMP_ERROR("%s | defaultControlFile | DEFAULT value: %s",
SEISCOMP_DEBUG("%s | defaultControlFile | DEFAULT value: %s",
MSG_HEADER, _controlFilePath.c_str());
}
if ( !Util::fileExists(_controlFilePath) ) {
......@@ -218,7 +218,7 @@ bool Hypo71::init(const Config::Config& config) {
}
catch ( ... ) {
_hypo71ScriptFile = env->absolutePath("@DATADIR@/hypo71/run.sh");
SEISCOMP_ERROR("%s | hypo71ScriptFile | DEFAULT value: %s",
SEISCOMP_DEBUG("%s | hypo71ScriptFile | DEFAULT value: %s",
MSG_HEADER, _hypo71ScriptFile.c_str());
}
if ( !Util::fileExists(_hypo71ScriptFile) ) {
......@@ -250,7 +250,7 @@ bool Hypo71::init(const Config::Config& config) {
SEISCOMP_DEBUG("%s | earthModelID | %s", MSG_HEADER, prof.earthModelID.c_str());
}
catch ( ... ) {
SEISCOMP_ERROR("%s | earthModelID | can't read value", MSG_HEADER);
SEISCOMP_WARNING("%s | earthModelID | can't read value", MSG_HEADER);
}
try {
......@@ -259,7 +259,7 @@ bool Hypo71::init(const Config::Config& config) {
}
catch ( ... ) {
prof.methodID = "Hypo71";
SEISCOMP_ERROR("%s | methodID | DEFAULT value: %s",
SEISCOMP_DEBUG("%s | methodID | DEFAULT value: %s",
MSG_HEADER, prof.methodID.c_str());
}
......@@ -268,7 +268,7 @@ bool Hypo71::init(const Config::Config& config) {
SEISCOMP_DEBUG("%s | configFile | %s", MSG_HEADER, prof.controlFile.c_str());
}
catch ( ... ) {
SEISCOMP_ERROR("%s | configFile | can't read value", MSG_HEADER);
SEISCOMP_WARNING("%s | configFile | can't read value", MSG_HEADER);
}
try {
......
Supports Markdown
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