LALCache.h File Reference

Author:
Creighton, J.This header covers routines to create and manipulate LALCache structures and to read LAL cache files.
More...

#include <stdio.h>
#include <lal/LALDatatypes.h>
#include <lal/FileIO.h>

Include dependency graph for LALCache.h:

Go to the source code of this file.

Data Structures

struct  tagLALCacheEntry
 An entry in a LAL cache. More...
struct  tagLALCache
 The LALCache structure is an array of entries. More...

Typedefs

typedef tagLALCacheEntry LALCacheEntry
 An entry in a LAL cache.
typedef tagLALCache LALCache
 The LALCache structure is an array of entries.

Functions

 NRCSID (LALCACHEH,"$Id: LALCache.h,v 1.1 2007/07/25 18:15:42 jolien Exp $")
LALCacheXLALCreateCache (UINT4 length)
 Creates a LALCache structure.
void XLALDestroyCache (LALCache *cache)
 Destroys a LALCache structure.
LALCacheXLALCacheDuplicate (LALCache *cache)
 Duplicates a LALCache structure.
LALCacheXLALCacheMerge (LALCache *cache1, LALCache *cache2)
 Returns a new LALCache structure that is the merge of two.
LALCacheXLALCacheFileRead (LALFILE *fp)
 Reads a LAL cache file and produces a LALCache structure.
LALCacheXLALCacheGlob (const char *dirstr, const char *fnptrn)
 Globs a directory and construct LALCache from matching entries.
int XLALCacheFileWrite (LALFILE *fp, LALCache *cache)
 Writes a LALCache structure to an output LAL cache file.
int XLALCacheSort (LALCache *cache)
 Sorts entries in a LALCache structure.
int XLALCacheUniq (LALCache *cache)
 Prunes duplicate entries keeping the second one; cache is reduced in length if there are.
int XLALCacheSieve (LALCache *cache, INT4 t0, INT4 t1, const char *srcregex, const char *dscregex, const char *urlregex)
 Selects only matching entries in a LALCache structure -- other entries are deleted from the LALCache structure.
LALFILEXLALCacheEntryOpen (LALCacheEntry *entry)
 Open a file identified by an entry in a LALCache structure.


Detailed Description

Author:
Creighton, J.This header covers routines to create and manipulate LALCache structures and to read LAL cache files.

D. E.

Date:
2007

Definition in file LALCache.h.


Typedef Documentation

typedef struct tagLALCacheEntry LALCacheEntry

An entry in a LAL cache.

typedef struct tagLALCache LALCache

The LALCache structure is an array of entries.


Function Documentation

NRCSID ( LALCACHEH  ,
"$Id: LALCache.  h,
v 1.1 2007/07/25 18:15:42 jolien Exp $"   
)

LALCache* XLALCreateCache ( UINT4  length  ) 

Creates a LALCache structure.

Definition at line 154 of file LALCache.c.

void XLALDestroyCache ( LALCache cache  ) 

Destroys a LALCache structure.

Definition at line 173 of file LALCache.c.

LALCache* XLALCacheDuplicate ( LALCache cache  ) 

Duplicates a LALCache structure.

Definition at line 188 of file LALCache.c.

LALCache* XLALCacheMerge ( LALCache cache1,
LALCache cache2 
)

Returns a new LALCache structure that is the merge of two.

Definition at line 203 of file LALCache.c.

LALCache* XLALCacheFileRead ( LALFILE fp  ) 

Reads a LAL cache file and produces a LALCache structure.

Definition at line 228 of file LALCache.c.

LALCache* XLALCacheGlob ( const char *  dirstr,
const char *  fnptrn 
)

Globs a directory and construct LALCache from matching entries.

Parameters:
dirstr  colon-delimited list of directories
fnptrn  glob pattern for matching files

Definition at line 305 of file LALCache.c.

int XLALCacheFileWrite ( LALFILE fp,
LALCache cache 
)

Writes a LALCache structure to an output LAL cache file.

Definition at line 367 of file LALCache.c.

int XLALCacheSort ( LALCache cache  ) 

Sorts entries in a LALCache structure.

Definition at line 453 of file LALCache.c.

int XLALCacheUniq ( LALCache cache  ) 

Prunes duplicate entries keeping the second one; cache is reduced in length if there are.

Entries are duplicates if their metadata are the same (even if the urls are different

Definition at line 461 of file LALCache.c.

int XLALCacheSieve ( LALCache cache,
INT4  t0,
INT4  t1,
const char *  srcregex,
const char *  dscregex,
const char *  urlregex 
)

Selects only matching entries in a LALCache structure -- other entries are deleted from the LALCache structure.

Parameters:
cache  The LALCache structure - modified
t0  Remove entries ending before t0 (0 to disable)
t1  Remove entries ending after t1 (0 to disable)
srcregex  Regular expression to match src field (NULL to disable)
dscregex  Regular expression to match dsc field (NULL to disable)
urlregex  Regular expression to match url field (NULL to disable)

Definition at line 524 of file LALCache.c.

LALFILE* XLALCacheEntryOpen ( LALCacheEntry entry  ) 

Open a file identified by an entry in a LALCache structure.

Definition at line 589 of file LALCache.c.


Generated on Sat Sep 6 03:08:10 2008 for LAL by  doxygen 1.5.2