ppf::system Class Reference

The main PPF system class through which all PPF access is performed. More...

#include <ppfsystem.hpp>

List of all members.

Public Member Functions

void connect () const
 Opens a connection to the public (user = "JETPPF") PPF system for reading only.
void connect (string user) const
 Opens a connection to the PPF system using the supplied user name for reading only.
void connect (string user, const accessflag flag) const
 Opens a connection to the PPF system using the supplied parameters.
void read (datatype &d, const long shot, string DDA, string dtype) const
 Reads in data for the given shot, DDA and dataype.
void read (datatype &d, const long shot, string DDA, string dtype, const ioflag flag) const
 Reads in data for the given shot, DDA and dataype using I/O flags.
void read (datatype &d, const long shot, const long sequence, string DDA, string dtype) const
 Reads in data for the given shot, sequence, DDA and dataype.
void read (datatype &d, const long shot, const long sequence, string DDA, string dtype, const ioflag flag) const
 Reads in data for the given shot, sequence, DDA and dataype using I/O flags.
void create (const long shot)
 Creates a new temporary PPF for writing.
void create (const long shot, const long status)
 Creates a new temporary PPF for writing.
void create (const long shot, const string comment)
 Creates a new temporary PPF for writing.
void create (const long shot, const long status, const string comment)
 Creates a new temporary PPF for writing.
void write (datatype &d, string DDA, string dtype)
 Writes the provided datatype to an open PPF.
void write (datatype &d, string DDA, string dtype, const ioflag flag)
 Writes the provided datatype to an open PPF using I/O flags.
void closeDDA () const
 Closes DDA to futher writing.
void closeDDA (const int status) const
 Closes DDA to futher writing.
void closeDDA (string comment) const
 Closes DDA to futher writing.
void closeDDA (const int status, string comment) const
 Closes DDA to futher writing.
void abort () const
 Deletes the temporary PPF without writing it to the PPF system.
int commit () const
 Commits a temporary PPF to the PPF system.
int commit (const string program, const int version) const
 Commits a temporary PPF to the PPF system.


Detailed Description

The main PPF system class through which all PPF access is performed.


Member Function Documentation

void ppf::system::connect (  )  const

Opens a connection to the public (user = "JETPPF") PPF system for reading only.

To use an alternate user name or open a write connection one of the alternate versions of this routine, connect(const string user) or connect(const string user, const accessflag flag), must be used.

void ppf::system::connect ( string  user  )  const

Opens a connection to the PPF system using the supplied user name for reading only.

To open a write connection the full version this routine, connect(const string user, const accessflag flag), must be used.

Parameters:
user A string containing the user name to connect with.

void ppf::system::connect ( string  user,
const accessflag  flag 
) const

Opens a connection to the PPF system using the supplied parameters.

The access flags are used to determine if the connection is for read access, write access or both. Valid access flags are: read, write

Parameters:
user String containing the user name to connect with.
flag List of access flags.

void ppf::system::read ( datatype d,
const long  shot,
string  DDA,
string  dtype 
) const

Reads in data for the given shot, DDA and dataype.

Parameters:
d Datatype object to write data to
shot Shot number
DDA String containing the (up to) 4 character DDA name
dtype String containing the (up to) 4 character datatype name
Exceptions:
ppf_error thrown if a read error occurs, error details are returned in ppf_error

void ppf::system::read ( datatype d,
const long  shot,
string  DDA,
string  dtype,
const ioflag  flag 
) const

Reads in data for the given shot, DDA and dataype using I/O flags.

I/O flags modify the loading of the datatype.

Parameters:
d Datatype object to write data to
shot Shot number
DDA String containing the (up to) 4 character DDA name
dtype String containing the (up to) 4 character datatype name
flag List of I/O flags
Exceptions:
ppf_error thrown if a read error occurs, error details are returned in ppf_error

void ppf::system::read ( datatype d,
const long  shot,
const long  sequence,
string  DDA,
string  dtype 
) const

Reads in data for the given shot, sequence, DDA and dataype.

Parameters:
d Datatype object to write data to
shot Shot number
sequence Sequence number
DDA String containing the (up to) 4 character DDA name
dtype String containing the (up to) 4 character datatype name
Exceptions:
ppf_error thrown if a read error occurs, error details are returned in ppf_error

void ppf::system::read ( datatype d,
const long  shot,
const long  sequence,
string  DDA,
string  dtype,
const ioflag  flag 
) const

Reads in data for the given shot, sequence, DDA and dataype using I/O flags.

I/O flags modify the loading of the datatype.

Parameters:
d Datatype object to write data to
shot Shot number
sequence Sequence number
DDA String containing the (up to) 4 character DDA name
dtype String containing the (up to) 4 character datatype name
flag List of I/O flags
Exceptions:
ppf_error thrown if a read error occurs, error details are returned in ppf_error

void ppf::system::create ( const long  shot  ) 

Creates a new temporary PPF for writing.

Write access is required to create a new PPF. The new PPF will not be added to the system until at least one datatype is written to it and commit() has been called.

Parameters:
shot Shot Number
Exceptions:
ppf_error thrown if an error occurs, error details are returned in ppf_error

void ppf::system::create ( const long  shot,
const long  status 
)

Creates a new temporary PPF for writing.

Write access is required to create a new PPF. A status flag for the PPF can be provided. The new PPF will not be added to the system until at least one datatype is written to it and commit() has been called.

Parameters:
shot Shot Number
status PPF system status flag
Exceptions:
ppf_error thrown if an error occurs, error details are returned in ppf_error

void ppf::system::create ( const long  shot,
const string  comment 
)

Creates a new temporary PPF for writing.

Write access is required to create a new PPF. A descriptive text comment for the PPF can be provided. The new PPF will not be added to the system until at least one datatype is written to it and commit() has been called.

Parameters:
shot Shot Number
comment String holding a comment
Exceptions:
ppf_error thrown if an error occurs, error details are returned in ppf_error

void ppf::system::create ( const long  shot,
const long  status,
const string  comment 
)

Creates a new temporary PPF for writing.

Write access is required to create a new PPF. A descriptive text comment and status flag for the PPF can be provided. The new PPF will not be added to the system until at least one datatype is written to it and commit() has been called.

Parameters:
shot Shot Number
status PPF system status flag
comment String holding a comment
Exceptions:
ppf_error thrown if an error occurs, error details are returned in ppf_error

void ppf::system::write ( datatype d,
string  DDA,
string  dtype 
)

Writes the provided datatype to an open PPF.

Writing can only be performed provided a new temporary PPF has been previously opened via a call to create(long shot).

Parameters:
d Datatype object to write to PPF
DDA String containing the (up to) 4 character DDA name
dtype String containing the (up to) 4 character datatype name
Exceptions:
ppf_error thrown if a write error occurs, error details are returned in ppf_error

void ppf::system::write ( datatype d,
string  DDA,
string  dtype,
const ioflag  flag 
)

Writes the provided datatype to an open PPF using I/O flags.

Writing can only be performed provided a new temporary PPF has been previously opened via a call to create(long shot).

Parameters:
d Datatype object to write to PPF
DDA String containing the (up to) 4 character DDA name
dtype String containing the (up to) 4 character datatype name
flag List of I/O flags
Exceptions:
ppf_error thrown if a write error occurs, error details are returned in ppf_error

void ppf::system::closeDDA (  )  const

Closes DDA to futher writing.

Exceptions:
ppf_error thrown if the DDA can not be closed properly, error details are returned in ppf_error

void ppf::system::closeDDA ( const int  status  )  const

Closes DDA to futher writing.

A DDA status flag can be provided which will be written to the DDA.

Parameters:
status DDA status flag
Exceptions:
ppf_error thrown if the DDA can not be closed properly, error details are returned in ppf_error

void ppf::system::closeDDA ( string  comment  )  const

Closes DDA to futher writing.

A comment can be provided which will be written to the DDA.

Parameters:
comment String holding a comment
Exceptions:
ppf_error thrown if the DDA can not be closed properly, error details are returned in ppf_error

void ppf::system::closeDDA ( const int  status,
string  comment 
) const

Closes DDA to futher writing.

A comment and DDA status flag can be provided which will be written to the DDA.

Parameters:
status DDA status flag
comment String holding a comment
Exceptions:
ppf_error thrown if the DDA can not be closed properly, error details are returned in ppf_error

void ppf::system::abort (  )  const

Deletes the temporary PPF without writing it to the PPF system.

All data written to the temporary PPF will be lost.

Exceptions:
ppf_error thrown if there is a problem, error details are returned in ppf_error

int ppf::system::commit (  )  const

Commits a temporary PPF to the PPF system.

The temporary PPF will be finalised and written to the PPF system.

Exceptions:
ppf_error thrown if the temporary PPF can not be written, error details are returned in ppf_error

int ppf::system::commit ( const string  program,
const int  version 
) const

Commits a temporary PPF to the PPF system.

The temporary PPF will be finalised and written to the PPF system. A string identifying the program used to create the PPF and a version number may be supplied.

Parameters:
program String containing the program name (max. 8 characters)
version Program version number
Exceptions:
ppf_error thrown if the temporary PPF can not be written, error details are returned in ppf_error


The documentation for this class was generated from the following files:
Generated on Tue Apr 8 16:45:13 2008 for PPF C++ by  doxygen 1.5.1