Go to the documentation of this file.
11 #ifndef GAUDIUTILS_IIODATAMANAGER_H
12 #define GAUDIUTILS_IIODATAMANAGER_H
49 enum IoType {
READ = 1 << 1, UPDATE = 1 << 2,
CREATE = 1 << 3, RECREATE = ( 1 << 4 ) + ( 1 << 3 ) };
73 int age()
const {
return m_age; }
89 virtual long long int seek(
long long int where,
int origin ) = 0;
128 #endif // GAUDIUTILS_IIODATAMANAGER_H
const std::string & name() const
Connection name.
int ageFile()
Increase age of I/O source.
virtual StatusCode read(IDataConnection *con, void *const data, size_t len)=0
Read raw byte buffer from input stream.
void setFID(std::string fid)
Set file ID.
int age() const
Access age counter.
void resetAge()
Reset age.
IDataConnection Connection
Connection type definition.
virtual long long int seek(long long int where, int origin)=0
Seek on the file described by ioDesc. Arguments as in ::seek()
virtual StatusCode connectRead()=0
Open data stream in read mode.
virtual Connections connections(const IInterface *owner) const =0
Get connection by owner instance (0=ALL)
virtual ~IDataConnection()=default
Standard destructor.
virtual Connection * connection(const std::string &dsn) const =0
Retrieve known connection.
virtual StatusCode disconnect()=0
Release data stream.
Connection::IoType IoType
std::string m_name
Connection name/identifier.
virtual bool isConnected() const =0
Check if connected to data source.
IoType
I/O Connection types.
IDataConnection(const IInterface *own, std::string nam)
Standard constructor.
std::string m_fid
File ID of the connection.
virtual StatusCode connectWrite(IoType type)=0
Open data stream in write mode.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
virtual StatusCode disconnect(IDataConnection *con)=0
Release data stream.
virtual StatusCode connectWrite(IDataConnection *con, IoType mode=Connection::CREATE, const std::string &doctype="UNKNOWN")=0
Open data stream in write mode.
virtual StatusCode write(IDataConnection *con, const void *data, int len)=0
Write raw byte buffer to output stream.
IoStatus
Status Code on bad file connection.
virtual StatusCode connectRead(bool keep_open, IDataConnection *con)=0
Open data stream in read mode.
const std::string & fid() const
Access file id.
DeclareInterfaceID(IIODataManager, 2, 0)
InterfaceID.
const IInterface * owner() const
Owner instance.
std::string m_pfn
Physical file name of the connection.
const std::string & pfn() const
Access physical file name.
void setPFN(std::string fn)
Set physical file name.
virtual StatusCode write(const void *data, int len)=0
Write raw byte buffer to output stream.
virtual long long int seek(IDataConnection *con, long long int where, int origin)=0
Seek on the file described by ioDesc. Arguments as in ::seek()
std::vector< Connection * > Connections
virtual StatusCode read(void *const data, size_t len)=0
Read raw byte buffer from input stream.