| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Gaudi::IDataConnection Class Reference

`#include <IIODataManager.h>`

Collaboration diagram for Gaudi::IDataConnection:

[legend]
List of all members.

## Detailed Description

ABC describing basic data connection.

M.Frank

Version:
  1.0

Date:
  20/10/2007

Definition at line 28 of file IIODataManager.h.

## Public Types
enum | IoType { READ = 1<<1, UPDATE = 1<<2, CREATE = 1<<3, RECREATE = (1<<4)+(1<<3) }
| I/O Connection types. More...
enum | IoStatus { BAD_DATA_CONNECTION = 4 }
| Status Code on bad file connection. More...
## Public Member Functions
| IDataConnection (const IInterface *own, const std::string &nam)
| Standard constructor.
virtual | ~IDataConnection ()
| Standard destructor.
const std::string & | name () const
| Connection name.
void | setFID (const std::string &fid)
| Set file ID.
const std::string & | fid () const
| Access file id.
const std::string & | pfn () const
| Access physical file name.
void | setPFN (const std::string &fn)
| Set physical file name.
void | ageFile ()
| Increase age of I/O source.
void | resetAge ()
| Reset age.
int | age () const
| Access age counter.
const IInterface * | owner () const
| Owner instance.
virtual StatusCode | connectRead ()=0
| Open data stream in read mode.
virtual StatusCode | connectWrite (IoType type)=0
| Open data stream in write mode.
virtual StatusCode | disconnect ()=0
| Release data stream.
virtual bool | isConnected () const=0
| Check if connected to data source.
virtual StatusCode | read (void *const data, size_t len)=0
| Read raw byte buffer from input stream.
virtual StatusCode | write (const void *data, int len)=0
| Write raw byte buffer to output stream.
virtual long long int | seek (long long int where, int origin)=0
| Seek on the file described by ioDesc. Arguments as in seek().
## Protected Attributes
std::string | m_name
| Connection name/identifier.
std::string | m_fid
| File ID of the connection.
std::string | m_pfn
| Physical file name of the connection.
int | m_age
| Age counter.
const IInterface * | m_owner
| Owner pointer.

## Member Enumeration Documentation

enum Gaudi::IDataConnection::IoType

I/O Connection types.

Enumerator:

  READ |
  UPDATE |
  CREATE |
  RECREATE |

Definition at line 42 of file IIODataManager.h.

    00042 { READ=1<<1,UPDATE=1<<2,CREATE=1<<3,RECREATE=(1<<4)+(1<<3) };

enum Gaudi::IDataConnection::IoStatus

Status Code on bad file connection.

Enumerator:

  BAD_DATA_CONNECTION |

Definition at line 44 of file IIODataManager.h.

    00044 { BAD_DATA_CONNECTION=4 };

## Constructor & Destructor Documentation

Gaudi::IDataConnection::IDataConnection | ( | const IInterface * | own,
|  | const std::string & | nam |
| ) |  |  | `[inline]`

Standard constructor.

Definition at line 47 of file IIODataManager.h.

References m_owner.

    00048     : m_name(nam), m_owner(own) {}

virtual Gaudi::IDataConnection::~IDataConnection | ( |  | ) | `[inline, virtual]`

Standard destructor.

Definition at line 50 of file IIODataManager.h.

    00050 {}

## Member Function Documentation

const std::string& Gaudi::IDataConnection::name | ( | void |  | ) | const`[inline]`

Connection name.

Definition at line 52 of file IIODataManager.h.

References m_name.

    00052 {     return m_name;       }

void Gaudi::IDataConnection::setFID | ( | const std::string & | fid | ) | `[inline]`

Set file ID.

Definition at line 54 of file IIODataManager.h.

References m_fid, and setFID().

Referenced by setFID().

    00054 {     m_fid = fid;         }

const std::string& Gaudi::IDataConnection::fid | ( |  | ) | const`[inline]`

Access file id.

Definition at line 56 of file IIODataManager.h.

References fid(), and m_fid.

Referenced by fid().

    00056 {     return m_fid;        }

const std::string& Gaudi::IDataConnection::pfn | ( |  | ) | const`[inline]`

Access physical file name.

Definition at line 58 of file IIODataManager.h.

References m_pfn, and pfn().

Referenced by pfn().

    00058 {     return m_pfn;        }

void Gaudi::IDataConnection::setPFN | ( | const std::string & | fn | ) | `[inline]`

Set physical file name.

Definition at line 60 of file IIODataManager.h.

References m_pfn, and setPFN().

Referenced by setPFN().

    00060 {     m_pfn = fn;          }

void Gaudi::IDataConnection::ageFile | ( |  | ) | `[inline]`

Increase age of I/O source.

Definition at line 62 of file IIODataManager.h.

References ageFile(), and m_age.

Referenced by ageFile().

    00062 {     ++m_age;             }

void Gaudi::IDataConnection::resetAge | ( |  | ) | `[inline]`

Reset age.

Definition at line 64 of file IIODataManager.h.

References m_age, and resetAge().

Referenced by resetAge().

    00064 {     m_age = 0;           }

int Gaudi::IDataConnection::age | ( |  | ) | const`[inline]`

Access age counter.

Definition at line 66 of file IIODataManager.h.

References age(), and m_age.

Referenced by age().

    00066 {     return m_age;        }

const IInterface* Gaudi::IDataConnection::owner | ( |  | ) | const`[inline]`

Owner instance.

Definition at line 68 of file IIODataManager.h.

References m_owner, and owner().

Referenced by owner().

    00068 {     return m_owner;      }

virtual StatusCode Gaudi::IDataConnection::connectRead | ( |  | ) | `[pure virtual]`

Open data stream in read mode.

virtual StatusCode Gaudi::IDataConnection::connectWrite | ( | IoType | type | ) | `[pure virtual]`

Open data stream in write mode.

virtual StatusCode Gaudi::IDataConnection::disconnect | ( |  | ) | `[pure virtual]`

Release data stream.

virtual bool Gaudi::IDataConnection::isConnected | ( |  | ) | const`[pure virtual]`

Check if connected to data source.

virtual StatusCode Gaudi::IDataConnection::read | ( | void *const | data,
|  | size_t | len |
| ) |  |  | `[pure virtual]`

Read raw byte buffer from input stream.

virtual StatusCode Gaudi::IDataConnection::write | ( | const void * | data,
|  | int | len |
| ) |  |  | `[pure virtual]`

Write raw byte buffer to output stream.

virtual long long int Gaudi::IDataConnection::seek | ( | long long int | where,
|  | int | origin |
| ) |  |  | `[pure virtual]`

Seek on the file described by ioDesc. Arguments as in seek().

## Member Data Documentation

std::string Gaudi::IDataConnection::m_name`[protected]`

Connection name/identifier.

Definition at line 31 of file IIODataManager.h.

std::string Gaudi::IDataConnection::m_fid`[protected]`

File ID of the connection.

Definition at line 33 of file IIODataManager.h.

Referenced by fid(), and setFID().

std::string Gaudi::IDataConnection::m_pfn`[protected]`

Physical file name of the connection.

Definition at line 35 of file IIODataManager.h.

Referenced by pfn(), and setPFN().

int Gaudi::IDataConnection::m_age`[protected]`

Age counter.

Definition at line 37 of file IIODataManager.h.

Referenced by age(), ageFile(), and resetAge().

const IInterface* Gaudi::IDataConnection::m_owner`[protected]`

Owner pointer.

Definition at line 39 of file IIODataManager.h.

Referenced by IDataConnection(), and owner().

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiUtils/v2r0/GaudiUtils/IIODataManager.h