FrameCacheTest.c

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Bernd Machenschalk, Jolien Creighton
00003 *
00004 *  This program is free software; you can redistribute it and/or modify
00005 *  it under the terms of the GNU General Public License as published by
00006 *  the Free Software Foundation; either version 2 of the License, or
00007 *  (at your option) any later version.
00008 *
00009 *  This program is distributed in the hope that it will be useful,
00010 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 *  GNU General Public License for more details.
00013 *
00014 *  You should have received a copy of the GNU General Public License
00015 *  along with with program; see the file COPYING. If not, write to the
00016 *  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00017 *  MA  02111-1307  USA
00018 */
00019 
00020 #include <lal/LALStdlib.h>
00021 #include <lal/FrameCache.h>
00022 
00023 #include <lal/LALRCSID.h>
00024 NRCSID (FRAMECACHETESTC,"$Id: FrameCacheTest.c,v 1.3 2007/06/08 14:41:46 bema Exp $");
00025 
00026 #define TESTSTATUS( pstat ) \
00027   if ( (pstat)->statusCode ) { REPORTSTATUS(pstat); return 1; } else ((void)0)
00028 
00029 int lalDebugLevel = 1;
00030 
00031 int main( void )
00032 {
00033   static LALStatus     status;
00034   static FrCache      *input;
00035   static FrCache      *cache;
00036   static FrCacheSieve  sieve;
00037 
00038   LALFrCacheImport( &status, &input, "catalog.test" );
00039   TESTSTATUS( &status );
00040 
00041   sieve.srcRegEx = "[F]";
00042   LALFrCacheSieve( &status, &cache, input, &sieve );
00043   TESTSTATUS( &status );
00044 
00045   LALFrCacheExport( &status, cache, "catalog.out" );
00046   TESTSTATUS( &status );
00047   LALDestroyFrCache( &status, &cache );
00048   TESTSTATUS( &status );
00049   LALDestroyFrCache( &status, &input );
00050   TESTSTATUS( &status );
00051 
00052   LALCheckMemoryLeaks();
00053   return 0;
00054 }

Generated on Sat Sep 6 03:06:56 2008 for LAL by  doxygen 1.5.2