diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2020-02-01 13:07:46 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2020-02-01 13:07:46 +0100 |
commit | 0ce4e8d52fd491268a56c10dbb32fd5c996e2589 (patch) | |
tree | afe5defc2a845f0b65936a1874e4658412eff2cd /src/ufo-roof-config.c | |
parent | 44cef2cb16dd2bc55ad34d0b8313f7f314b0107a (diff) | |
download | ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.tar.gz ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.tar.bz2 ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.tar.xz ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.zip |
Initial Python infrastructure to build more complex processing pipelines and the corresponding changes in ROOF filters
Diffstat (limited to 'src/ufo-roof-config.c')
-rw-r--r-- | src/ufo-roof-config.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ufo-roof-config.c b/src/ufo-roof-config.c index 4788a2a..17f4b30 100644 --- a/src/ufo-roof-config.c +++ b/src/ufo-roof-config.c @@ -43,9 +43,6 @@ void ufo_roof_config_free(UfoRoofConfig *cfg) { if (cfg) { UfoRoofConfigPrivate *priv = (UfoRoofConfigPrivate*)cfg; - if (cfg->path) - g_free(cfg->path); - if (priv->parser) g_object_unref (priv->parser); @@ -53,7 +50,7 @@ void ufo_roof_config_free(UfoRoofConfig *cfg) { } } -UfoRoofConfig *ufo_roof_config_new(const char *config, GError **error) { +UfoRoofConfig *ufo_roof_config_new(const char *config, UfoRoofConfigFlags flags, GError **error) { UfoRoofConfigPrivate *priv; UfoRoofConfig *cfg; @@ -66,6 +63,7 @@ UfoRoofConfig *ufo_roof_config_new(const char *config, GError **error) { JsonObject *performance = NULL; JsonObject *simulation = NULL; JsonObject *reconstruction = NULL; + JsonObject *data = NULL; GError *gerr = NULL; @@ -97,7 +95,6 @@ UfoRoofConfig *ufo_roof_config_new(const char *config, GError **error) { cfg->dataset_size = 0; cfg->buffer_size = 2; cfg->drop_buffers = 0; - cfg->path = NULL; // Read configuration @@ -118,8 +115,11 @@ UfoRoofConfig *ufo_roof_config_new(const char *config, GError **error) { roof_config_node_get(optics, root, object, "optics"); roof_config_node_get(network, root, object, "network"); roof_config_node_get(reconstruction, root, object, "reconstruction"); - roof_config_node_get(simulation, root, object, "simulation"); roof_config_node_get(performance, root, object, "performance"); + roof_config_node_get(data, root, object, "data"); + + if (flags&UFO_ROOF_CONFIG_SIMULATION) + roof_config_node_get(simulation, root, object, "simulation"); } if (hardware) { @@ -183,8 +183,6 @@ UfoRoofConfig *ufo_roof_config_new(const char *config, GError **error) { } if (simulation) { - roof_config_node_get_string(cfg->path, simulation, "path"); - roof_config_node_get(cfg->first_file_number, simulation, int, "first_file_number"); roof_config_node_get(cfg->header_size, simulation, int, "header_size"); if (!cfg->payload_size) |