sends::frame_source Class Reference
[Sends Data Classes]

Frame data location lists. More...

#include <frame_source.hh>

List of all members.

Public Types

typedef frame_loc::gps_type gps_type
typedef frame_loc::arch_type arch_type
typedef std::vector< frame_locloc_vector
typedef std::map< std::string,
loc_vector
frame_map
typedef frame_map::value_type frmap_node
typedef frame_map::const_iterator const_frmap_iter
typedef frame_map::iterator frmap_iter

Public Member Functions

 frame_source (void)
 Default frame_source database constructor.
 ~frame_source (void)
 Destructor.
std::ostream & dump (std::ostream &out, int level=1) const
 Dump the lists.
const frame_locfind (const std::string &type, gps_type gps) const
 Find a frame location.
void insert (const frame_loc &loc)
 Insert frame location int a source list.
void read (const std::string &file)
 Read a frame source file.


Detailed Description

Frame data location lists.

The frame_source class contains several lists of frame locastions, one list for each archive level. The lists contain all information necessary to decide on a most easily available source and to get the driver and file name for the source. The lists are populated from one or more ascii files read by the read() method. The read() method documentation descries these files.

Author:
John Zweizig
Version:
1.0; Last modified: January 22, 2008

Member Typedef Documentation

GPS time representation type.

Archive level ennumeration type .

Frame location list (vector) type.

typedef std::map<std::string, loc_vector> sends::frame_source::frame_map

Define frame source map type.

typedef frame_map::value_type sends::frame_source::frmap_node

Define frame source map node type.

typedef frame_map::const_iterator sends::frame_source::const_frmap_iter

Define constant frame source map iterator type.

typedef frame_map::iterator sends::frame_source::frmap_iter

Define frame map iterator type.


Constructor & Destructor Documentation

sends::frame_source::frame_source ( void   ) 

Default frame_source database constructor.

Construct a Frame Source database. All the lists are constructed but left empty.

sends::frame_source::~frame_source ( void   ) 

Destructor.

Frame source database destructor.


Member Function Documentation

std::ostream& sends::frame_source::dump ( std::ostream &  out,
int  level = 1 
) const

Dump the lists.

Dump the contents of all the frame source lists.

Parameters:
out Output stream.
Returns:
Reference to the output stream.

const frame_loc& sends::frame_source::find ( const std::string &  type,
gps_type  gps 
) const

Find a frame location.

Find a frame location for the specified type and gps time. The search iterates over all the lists in the order online, cache, archive, offline. The first valid location found in this sequence is returned.

Parameters:
type Frame type prefix string.
gps GPS time to be found.
Returns:
Constant reference to the frame location.
Exceptions:
runtime_error is thrown if no frame is found.

void sends::frame_source::insert ( const frame_loc loc  ) 

Insert frame location int a source list.

Insert the specified frame location into the appropriate list. The list is selected by the archive type field in the frame_loc and the frame type (key) is provided by the prefix field of the frame_loc.

Parameters:
loc Frame_loc block to be inserted into the list.

void sends::frame_source::read ( const std::string &  file  ) 

Read a frame source file.

Read a list of frame locations from a flat ascii file and use them to fill in the frame source tables. The input file contains a 7-column table with one row per line. Comments may be added by including a '#' at the start of the line or after all text on the line, and lines may be continued by terminating the line with a backslash. The columns are separated by one or more white-space (space or tab) characters and contain the following information.
ColumnContents
1Frame site and type, e.g "H-RDS_R_L1"
2Start GPS of first frame
3End GPS of last frame
4Time duration of all frame in list
5Archive type, i.e. "online", "cache", "archive", or offline
6Driver type, i.e. "local", "qfs", "sends", "smem" or "unknown". "-" may be specified for a arch-dependent default.
7Source path. The path for local and qfs data may contain fields derived from the GPS time, e.g. "%d" will be replaced byb the gps time and "%3d" ill be replace by the first 3 decimal digits of the gps

Parameters:
file Path to source file.


The documentation for this class was generated from the following file:

Generated on Tue Jun 10 12:18:12 2008 for SENDS by  doxygen 1.5.5