GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSP / dev > qsp / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QFCP_cache.c File Reference

Cache of the all the handlers master and configuration file keys. More...

#include <QSP/QFCP_cache.h>
#include <QSP/QSP_templates.h>
#include <QSD/QFC_cache.h>
#include <QSD/QFC_member.h>

Classes

struct  _QFCP_cachesNamed
 The caches by name. More...
struct  _QFCP_cache
 The file cache for the standard set of physics files. More...

Defines

#define NMASTERS   32
#define NCFGS   32
#define NULL   ((void *)0)
#define NCACHES   (sizeof (QFCP_cachesNamed) / sizeof (QFC_cache *))

Typedefs

typedef struct _QFCP_cachesNamed QFCP_cachesNamed
 Typedef for struct _QFCP_cachesNamed.
typedef struct _QFCP_cache QFCP_cache
 Typedef for struct _QFCP_cache.

Functions

int QFCP_sizeof (int depth)
 Returns the size, in bytes, of a standard physics file cache.
void * QFCP_construct (QFCP_cache *cache, QFR_fileCtx *qfr, const QSP_templates *templates, int depth)
 Constructs a handler cache of the requested depth.
void QFCP_destruct (QFCP_cache *cache)
 Destroys the cache.
QFC_cache * QFCP_sbsLocate (QFCP_cache *cache)
 Returns a pointer to the SBS's (Secondary Boot Script) cache.
QFC_cache * QFCP_latcLocate (QFCP_cache *cache)
 Returns a pointer to the LATc (LAT hardware configuration) cache.
QFC_cache * QFCP_lpaLocate (QFCP_cache *cache)
 Returns a pointer to the LPA's cache.
QFC_cache * QFCP_masterLocate (QFCP_cache *cache, unsigned int hid)
 Returns a pointer to the requested handler's master cache.
QFC_cache * QFCP_cfgLocate (QFCP_cache *cache, unsigned int hid, unsigned int cid)
 Returns a pointer to the requested handler's configuration cache.
int QFCP_sbsResolve (QFCP_cache *cache, QFC_file *file, unsigned int key)
 Resolves the reference for the SBS (Secondary Boot Script) file.
int QFCP_latcResolve (QFCP_cache *cache, QFC_file *file, unsigned int key)
 Resolves the reference for the LATc (LAT hardware configuration file.
int QFCP_lpaResolve (QFCP_cache *cache, QFC_file *file, unsigned int key)
 Resolves the reference for the LPA (LAT Physics Analysis) file.
int QFCP_masterResolve (QFCP_cache *cache, QFC_file *file, unsigned int key, unsigned int hid)
 Resolves the reference for the requested handler's master file.
int QFCP_cfgResolve (QFCP_cache *cache, QFC_file *file, unsigned int key, unsigned int hid, unsigned int cid)
 Resolves the reference for the requested handler's configuration file.


Detailed Description

Cache of the all the handlers master and configuration file keys.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QFCP_cache.c,v 1.2 2011/03/28 22:58:45 russell Exp $

Function Documentation

QFC_cache * QFCP_cfgLocate ( QFCP_cache cache,
unsigned int  hid,
unsigned int  cid 
)

Returns a pointer to the requested handler's configuration cache.

Returns:
A pointer to the requested handler's master cache or NULL if the hid is invalid (>= 32) or cid is invalid (>= 32)
Parameters:
cache The file cache
hid The handler identifier
cid The configuration identifier

References _QFCP_cachesNamed::cfgs, and _QFCP_cache::name.

int QFCP_cfgResolve ( QFCP_cache cache,
QFC_file *  file,
unsigned int  key,
unsigned int  hid,
unsigned int  cid 
)

Resolves the reference for the requested handler's configuration file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The file cache
file The file structure to receive the resolved file
key The file key
hid The handler identifier
cid The configuration identifier

References _QFCP_cachesNamed::cfgs, _QFCP_cache::name, _QFCP_cache::qfr, and _QFCP_cache::templates.

void * QFCP_construct ( QFCP_cache cache,
QFR_fileCtx *  qfr,
const QSP_templates templates,
int  depth 
)

Constructs a handler cache of the requested depth.

Returns:
Pointer to the next available memory location after the constructed cache
Parameters:
cache The memory in which the cache will be constructed. It is assumed that this memory has been properly sized using QFCP_sizeof.
qfr The file resolution context. This contains things like the FMX handle.
templates The set of template file names. This is used when the resolving key is a CMX style key. This may be NULL, in which case the standard default names will be used.
depth The depth of the cache

References _QFCP_cache::caches, _QFCP_cache::qfr, and _QFCP_cache::templates.

void QFCP_destruct ( QFCP_cache cache  ) 

Destroys the cache.

Parameters:
cache The cache to destroy

References _QFCP_cache::caches.

QFC_cache * QFCP_latcLocate ( QFCP_cache cache  ) 

Returns a pointer to the LATc (LAT hardware configuration) cache.

Returns:
A pointer to the requested cache
Parameters:
cache The file cache

References _QFCP_cachesNamed::latc, and _QFCP_cache::name.

int QFCP_latcResolve ( QFCP_cache cache,
QFC_file *  file,
unsigned int  key 
)

Resolves the reference for the LATc (LAT hardware configuration file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The file cache
file The file structure to receive the resolved file
key The file key

References _QFCP_cachesNamed::latc, _QFCP_cache::name, _QFCP_cache::qfr, and _QFCP_cache::templates.

QFC_cache * QFCP_lpaLocate ( QFCP_cache cache  ) 

Returns a pointer to the LPA's cache.

Returns:
A pointer to the requested cache
Parameters:
cache The file cache

References _QFCP_cachesNamed::lpa, and _QFCP_cache::name.

int QFCP_lpaResolve ( QFCP_cache cache,
QFC_file *  file,
unsigned int  key 
)

Resolves the reference for the LPA (LAT Physics Analysis) file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The file cache
file The file structure to receive the resolved file
key The file key

References _QFCP_cache::name, _QFCP_cache::qfr, _QFCP_cachesNamed::sbs, and _QFCP_cache::templates.

QFC_cache * QFCP_masterLocate ( QFCP_cache cache,
unsigned int  hid 
)

Returns a pointer to the requested handler's master cache.

Returns:
A pointer to the requested handler's master cache or NULL if the hid is invalid (>= 32)
Parameters:
cache The file cache
hid The handler identifier

References _QFCP_cachesNamed::masters, and _QFCP_cache::name.

int QFCP_masterResolve ( QFCP_cache cache,
QFC_file *  file,
unsigned int  key,
unsigned int  hid 
)

Resolves the reference for the requested handler's master file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The file cache
file The file structure to receive the resolved file
key The file key
hid The handler identifier

References _QFCP_cachesNamed::masters, _QFCP_cache::name, _QFCP_cache::qfr, and _QFCP_cache::templates.

QFC_cache * QFCP_sbsLocate ( QFCP_cache cache  ) 

Returns a pointer to the SBS's (Secondary Boot Script) cache.

Returns:
A pointer to the requested cache
Parameters:
cache The file cache

References _QFCP_cache::name, and _QFCP_cachesNamed::sbs.

int QFCP_sbsResolve ( QFCP_cache cache,
QFC_file *  file,
unsigned int  key 
)

Resolves the reference for the SBS (Secondary Boot Script) file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The file cache
file The file structure to receive the resolved file
key The file key

References _QFCP_cache::name, _QFCP_cache::qfr, _QFCP_cachesNamed::sbs, and _QFCP_cache::templates.

int QFCP_sizeof ( int  depth  ) 

Returns the size, in bytes, of a standard physics file cache.

Returns:
The size, in bytes, of a handler file cache
Parameters:
depth The depth of the cache. This determines how many versions of each file may be cached at any given time.


Generated on Mon Mar 28 16:00:45 2011 by  doxygen 1.5.8