Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALMetaIO 4.0.6.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LIGOMetadataUtils.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Drew Keppel, Duncan Brown, Jolien Creighton, Patrick Brady, Stephen Fairhurst, Thomas Cokelaer
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20/*-----------------------------------------------------------------------
21 *
22 * File Name: LIGOMetadataUtils.c
23 *
24 * Author: Brown, D. A.
25 *
26 *-----------------------------------------------------------------------
27 */
28
29/**
30 * \author Brown, D. A.
31 * \file
32 * \ingroup lalmetaio_general
33 * \brief General routines for manipulating LIGO metadatabase tables.
34 *
35 * ### Description ###
36 *
37 * ### Algorithm ###
38 *
39 * None.
40 *
41 * ### Uses ###
42 *
43 * LALCalloc, LALMalloc, LALFree.
44 *
45 * ### Notes ###
46 *
47 * %% Any relevant notes.
48 *
49 */
50
51#include <math.h>
52#include <stdio.h>
53#include <stdlib.h>
54#include <string.h>
55#include <lal/LALStdlib.h>
56#include <lal/LALStdio.h>
57#include <lal/LIGOMetadataTables.h>
58#include <lal/LIGOMetadataUtils.h>
59#include <lal/Date.h>
60
61
62void
64 char *ifo,
65 InterferometerNumber IFONumber
66 )
67
68{
69 switch( IFONumber )
70 {
71 case LAL_IFO_G1:
72 snprintf( ifo, LIGOMETA_IFO_MAX, "G1");
73 break;
74
75 case LAL_IFO_H1:
76 snprintf( ifo, LIGOMETA_IFO_MAX, "H1");
77 break;
78
79 case LAL_IFO_H2:
80 snprintf( ifo, LIGOMETA_IFO_MAX, "H2");
81 break;
82
83 case LAL_IFO_L1:
84 snprintf( ifo, LIGOMETA_IFO_MAX, "L1");
85 break;
86
87 case LAL_IFO_T1:
88 snprintf( ifo, LIGOMETA_IFO_MAX, "T1");
89 break;
90
91 case LAL_IFO_V1:
92 snprintf( ifo, LIGOMETA_IFO_MAX, "V1");
93 break;
94
95 default:
96 /* Invalid Detector Site */
97 snprintf( ifo, LIGOMETA_IFO_MAX, " ");
98 }
99}
100
101
102
103void
105 LALDetector *det,
106 InterferometerNumber IFONumber
107 )
108
109{
110 switch( IFONumber )
111 {
112 case LAL_IFO_G1:
114 break;
115
116 case LAL_IFO_H1:
118 break;
119
120 case LAL_IFO_H2:
122 break;
123
124 case LAL_IFO_L1:
126 break;
127
128 case LAL_IFO_T1:
130 break;
131
132 case LAL_IFO_V1:
134 break;
135
136 default:
137 /* Invalid Detector Site */
138 memset(det, 0, sizeof(LALDetector) );
139 }
140}
LALDetectorIndexLLODIFF
LALDetectorIndexGEO600DIFF
LALDetectorIndexTAMA300DIFF
LALDetectorIndexVIRGODIFF
LALDetectorIndexLHODIFF
#define LIGOMETA_IFO_MAX
InterferometerNumber
The InterferometerNumber contains an enum type for describing the interferometer.
@ LAL_IFO_G1
@ LAL_IFO_H1
@ LAL_IFO_H2
@ LAL_IFO_T1
@ LAL_IFO_V1
@ LAL_IFO_L1
void XLALReturnDetector(LALDetector *det, InterferometerNumber IFONumber)
void XLALReturnIFO(char *ifo, InterferometerNumber IFONumber)
const LALDetector lalCachedDetectors[LAL_NUM_DETECTORS]