Commit 6adffe36 authored by Kipp Cannon's avatar Kipp Cannon

lalmetaio adjustments:

- move CreateMetaTableDir.c to lalinspiral, the only lalsuite package that
  uses its contents.
- switch lalsuite's configure scripts' liblalmetaio link tests from
  checking for (the now removed) XLALCreateMetaTableDir() to
  XLALLIGOLwHasTable()
- remove some defunct LALStatus-style error codes from LIGOLwXMLRead.h
- fix prototype for XLALSearchSummaryTableFromLIGOLw()
parent 6a475b1b
......@@ -352,7 +352,7 @@ LALSUITE_CHECK_BOINC
LALSUITE_CHECK_LIB([LAL],[${MIN_LAL_VERSION}],[XLALPerror],[lal/XLALError.h])
LALSUITE_CHECK_LIB([LALSupport],[${MIN_LAL_VERSION}],[XLALCacheImport],[lal/LALCache.h])
LALSUITE_CHECK_OPT_LIB([LALFrame],[${MIN_LALFRAME_VERSION}],[LALFrOpen],[lal/LALFrameL.h])
LALSUITE_CHECK_OPT_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_OPT_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALLIGOLwHasTable],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_OPT_LIB([LALSimulation],[${MIN_LALSIMULATION_VERSION}],[XLALSimDetectorStrainREAL8TimeSeries],[lal/LALSimulation.h])
LALSUITE_CHECK_OPT_LIB([LALBurst],[${MIN_LALBURST_VERSION}],[XLALEPSearch],[lal/EPSearch.h])
LALSUITE_CHECK_OPT_LIB([LALInspiral],[${MIN_LALINSPIRAL_VERSION}],[LALInspiralParameterCalc],[lal/LALInspiral.h])
......
......@@ -136,7 +136,7 @@ AC_CHECK_HEADERS([metaio.h],,[AC_MSG_ERROR([could not find the metaio.h header])
# check for lal libraries and headers
LALSUITE_CHECK_LIB([LAL],[${MIN_LAL_VERSION}],[XLALPerror],[lal/XLALError.h])
LALSUITE_CHECK_LIB([LALSupport],[${MIN_LAL_VERSION}],[XLALCacheImport],[lal/LALCache.h])
LALSUITE_CHECK_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALLIGOLwHasTable],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALSimulation],[${MIN_LALSIMULATION_VERSION}],[XLALSimDetectorStrainREAL8TimeSeries],[lal/LALSimulation.h])
# configure SWIG wrapping modules
......
......@@ -192,7 +192,7 @@ fi
# check for lal libraries and headers
LALSUITE_CHECK_LIB([LAL],[${MIN_LAL_VERSION}],[XLALPerror],[lal/XLALError.h])
LALSUITE_CHECK_LIB([LALSupport],[${MIN_LAL_VERSION}],[XLALCacheImport],[lal/LALCache.h])
LALSUITE_CHECK_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALLIGOLwHasTable],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALFrame],[${MIN_LALFRAME_VERSION}],[LALFrOpen],[lal/LALFrameL.h])
LALSUITE_CHECK_LIB([LALSimulation],[${MIN_LALSIMULATION_VERSION}],[XLALSimDetectorStrainREAL8TimeSeries],[lal/LALSimulation.h])
LALSUITE_CHECK_LIB([LALInspiral],[${MIN_LALINSPIRAL_VERSION}],[LALInspiralParameterCalc],[lal/LALInspiral.h])
......
......@@ -150,7 +150,7 @@ AC_CHECK_HEADERS([FrameL.h],,[AC_MSG_ERROR([could not find the FrameL.h header])
# check for lal libraries and headers
LALSUITE_CHECK_LIB([LAL],[${MIN_LAL_VERSION}],[XLALPerror],[lal/XLALError.h])
LALSUITE_CHECK_LIB([LALSupport],[${MIN_LAL_VERSION}],[XLALCacheImport],[lal/LALCache.h])
LALSUITE_CHECK_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALMetaIO],[${MIN_LALMETAIO_VERSION}],[XLALLIGOLwHasTable],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_LIB([LALSimulation],[${MIN_LALSIMULATION_VERSION}],[XLALSimDetectorStrainREAL8TimeSeries],[lal/LALSimulation.h])
LALSUITE_CHECK_LIB([LALFrame],[${MIN_LALFRAME_VERSION}],[LALFrOpen],[lal/LALFrameL.h])
......
......@@ -29,7 +29,7 @@
/**
* \author Brown, D. A., and Brady, P. R.
* \file
* \ingroup lalmetaio_general
* \ingroup lalinspiral
* \brief Construct a \c MetaTableDirectory for a given LIGOLwXML table.
*
* ### Description ###
......@@ -61,16 +61,14 @@
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <metaio.h>
#include <string.h>
#include "CreateMetaTableDir.h"
#include <lal/LALStdio.h>
#include <lal/LALStdlib.h>
#include <lal/LALConstants.h>
#include <lal/LIGOMetadataTables.h>
#include <lal/LIGOLwXMLRead.h>
#include <lal/XLALError.h>
#ifdef __GNUC__
#define UNUSED __attribute__ ((unused))
......@@ -342,59 +340,3 @@ MetaTableDirectory* XLALCreateMetaTableDir(
return tableDir;
}
void
LALCreateMetaTableDir(
LALStatus *status,
MetaTableDirectory **tableDir,
struct MetaioParseEnvironment *const env UNUSED,
MetadataTableType table
)
{
INITSTATUS(status);
ATTATCHSTATUSPTR (status);
/* check the inputs */
ASSERT( !*tableDir, status, LIGOLWXMLREADH_ENNUL, LIGOLWXMLREADH_MSGENNUL );
switch( table )
{
case no_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case process_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case process_params_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case search_summary_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case search_summvars_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case sngl_inspiral_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case multi_inspiral_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case sim_inspiral_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
case summ_value_table:
ABORT( status, LIGOLWXMLREADH_EMTAB, LIGOLWXMLREADH_MSGEMTAB );
break;
default:
ABORT( status, LIGOLWXMLREADH_EUTAB, LIGOLWXMLREADH_MSGEUTAB );
}
(void)tableDir;
/* Normal exit */
DETATCHSTATUSPTR (status);
RETURN( status );
}
/*
* Copyright (C) 2007 Alexander Dietz, Duncan Brown, Jolien Creighton, Kipp Cannon, Lisa M. Goggin, Patrick Brady, Robert Adam Mercer, Stephen Fairhurst, Thomas Cokelaer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
/**
* \author Brown, D. A. and Fairhurst, S.
* \file
* \ingroup lalinspiral
* \brief Provides functions for reading LIGO lightweight XML files to LIGO metadata database tables.
*
* ### Synopsis ###
*
* \code
* #include <lal/CreateMetaTableDir.h>
* \endcode
*
*/
#ifndef _CREATEMETATABLEDIR_H
#define _CREATEMETATABLEDIR_H
#include <lal/LIGOLwXMLRead.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* This structure allows for the association of entries in a MetaDataTable
* with columns in an xml file.
* <dl>
* <dt>name</dt><dd> The name of the column in the XML table.</dd>
* <dt>pos</dt><dd> The position of this column in the XML table.</dd>
* <dt>idx</dt><dd> The id number of the column.</dd>
* </dl>
*
*/
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(IMMUTABLE_MEMBERS(tagMetaTableDirectory, name));
#endif /* SWIG */
typedef struct
tagMetaTableDirectory
{
const CHAR *name;
INT4 pos;
INT4 idx;
}
MetaTableDirectory;
MetaTableDirectory* XLALCreateMetaTableDir(
struct MetaioParseEnvironment *const env,
MetadataTableType table
);
#ifdef __cplusplus
}
#endif
#endif /* _CREATEMETATABLEDIR_H */
......@@ -17,11 +17,10 @@
* 02111-1307 USA
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <metaio.h>
#include "CreateMetaTableDir.h"
#include <lal/LIGOMetadataTables.h>
#include <lal/LIGOLwXMLInspiralRead.h>
......
......@@ -31,6 +31,7 @@
#include <string.h>
#include <metaio.h>
#include "CreateMetaTableDir.h"
#include <lal/LALStdio.h>
#include <lal/LALStdlib.h>
#include <lal/LALConstants.h>
......
......@@ -4,6 +4,9 @@ include $(top_srcdir)/gnuscripts/lalsuite_header_links.am
include $(top_srcdir)/gnuscripts/lalsuite_vcs_info.am
include $(top_srcdir)/gnuscripts/lalsuite_cuda.am
noinst_HEADERS = \
CreateMetaTableDir.h
pkginclude_HEADERS = \
BBHPhenomCoeffs.h \
Chisq_CPU.h \
......@@ -58,13 +61,12 @@ lib_LTLIBRARIES = liblalinspiral.la
liblalinspiral_la_SOURCES = \
BandPassInspiralTemplate.c \
Chisq_CPU.c \
InjectTimeSeries.c \
LALInspiralPyCBCTemplate.c \
CoherentInspiralFilter.c \
CoherentInspiralInput.c \
CoincInspiralEllipsoid.c \
CoincInspiralUtils.c \
CoincRingdownUtils.c \
CreateMetaTableDir.c \
FindChirpBCVChisq.c \
FindChirpBCVData.c \
FindChirpBCVSpinData.c \
......@@ -96,6 +98,7 @@ liblalinspiral_la_SOURCES = \
GenerateRing.c \
GetErrorMatrixFromSnglInspiral.c \
GetInspiralParams.c \
InjectTimeSeries.c \
InspiralBankGeneration.c \
InspiralInjectionParams.c \
InspiralSpinBank.c \
......@@ -149,6 +152,7 @@ liblalinspiral_la_SOURCES = \
LALInspiralPhasing3.c \
LALInspiralPhiofVIntegrand.c \
LALInspiralPolarizations.c \
LALInspiralPyCBCTemplate.c \
LALInspiralRingdownWave.c \
LALInspiralSBankOverlap.c \
LALInspiralSetParams.c \
......
......@@ -73,7 +73,7 @@
* ### Uses ###
*
* <tt>fopen()</tt>
* <tt>fprintf()</tt>
* <tt>XLALFilePrintf()</tt>
* <tt>fclose()</tt>
*
* ### Notes ###
......@@ -95,7 +95,7 @@
* \ref LIGOLwXMLHeaders.h. For example, to change the <tt> sngl_inspiral</tt>
* table, you must edit \c SNGL_INSPIRAL_ROW.</li>
*
* <li> Change the fprintf command which writes the table rows. This is contained
* <li> Change the XLALFilePrintf command which writes the table rows. This is contained
* in \ref LIGOLwXML.c.
* </ol>
*
......
......@@ -43,80 +43,18 @@
#ifndef _LIGOLWXMLREAD_H
#define _LIGOLWXMLREAD_H
#include <stdio.h>
#include <stdlib.h>
#include <lal/LALDatatypes.h>
#include <lal/LALConstants.h>
#include <lal/LIGOMetadataTables.h>
#ifdef __cplusplus
extern "C" {
#endif
/**\name Error Codes */ /*@{*/
#define LIGOLWXMLREADH_ENULL 1
#define LIGOLWXMLREADH_ENNUL 2
#define LIGOLWXMLREADH_EALOC 3
#define LIGOLWXMLREADH_EUTAB 4
#define LIGOLWXMLREADH_ENCOL 5
#define LIGOLWXMLREADH_ENTAB 6
#define LIGOLWXMLREADH_EPARS 7
#define LIGOLWXMLREADH_EMTAB 8
#define LIGOLWXMLREADH_EENDT 9
#define LIGOLWXMLREADH_ETMSM 10
#define LIGOLWXMLREADH_ETNOP 11
#define LIGOLWXMLREADH_MSGENULL "Null pointer"
#define LIGOLWXMLREADH_MSGENNUL "Non-null pointer"
#define LIGOLWXMLREADH_MSGEALOC "Memory allocation error"
#define LIGOLWXMLREADH_MSGEUTAB "Unknown metadata table type"
#define LIGOLWXMLREADH_MSGENCOL "Unable to find table column"
#define LIGOLWXMLREADH_MSGENTAB "Requested table not found in file"
#define LIGOLWXMLREADH_MSGEPARS "Error parsing table"
#define LIGOLWXMLREADH_MSGEMTAB "No table type specified"
#define LIGOLWXMLREADH_MSGEENDT "Ending a table without an beginning a table"
#define LIGOLWXMLREADH_MSGETMSM "Table type mismatch"
#define LIGOLWXMLREADH_MSGETNOP "Table not begun for writing"
/*@}*/
/* Forward declarations of MetaIO types */
/* Forward declarations of MetaIO types. Note that metaio.h is not
* included by this header file, so the metaio API does not become part of
* the API exported by lalmetaio. The MetaioParseEnvironment structure is
* an opaque type, here, and is why the forward declaration is neeed. */
struct MetaioParseEnvironment;
/**
* This structure allows for the association of entries in a MetaDataTable
* with columns in an xml file.
* <dl>
* <dt>name</dt><dd> The name of the column in the XML table.</dd>
* <dt>pos</dt><dd> The position of this column in the XML table.</dd>
* <dt>idx</dt><dd> The id number of the column.</dd>
* </dl>
*
*/
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(IMMUTABLE_MEMBERS(tagMetaTableDirectory, name));
#endif /* SWIG */
typedef struct
tagMetaTableDirectory
{
const CHAR *name;
INT4 pos;
INT4 idx;
}
MetaTableDirectory;
MetaTableDirectory* XLALCreateMetaTableDir(
struct MetaioParseEnvironment *const env,
MetadataTableType table
);
void
LALCreateMetaTableDir(
LALStatus *status,
MetaTableDirectory **tableDir,
struct MetaioParseEnvironment *const env,
MetadataTableType table
);
int
XLALLIGOLwFindColumn(
struct MetaioParseEnvironment *env,
......@@ -157,7 +95,7 @@ XLALTimeSlideTableFromLIGOLw (
SearchSummaryTable *
XLALSearchSummaryTableFromLIGOLw (
const CHAR *fileName
const char *fileName
);
#ifdef __cplusplus
......
......@@ -20,7 +20,6 @@ pkginclude_HEADERS = \
lib_LTLIBRARIES = liblalmetaio.la
liblalmetaio_la_SOURCES = \
CreateMetaTableDir.c \
LIGOLwXML.c \
LIGOLwXMLArray.c \
LIGOLwXMLRead.c \
......
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