Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Utilities
StorageFactory
src
IOChannel.cc
Go to the documentation of this file.
1
#include "
Utilities/StorageFactory/interface/IOChannel.h
"
2
#include "
Utilities/StorageFactory/src/Throw.h
"
3
#include <algorithm>
4
#include <cassert>
5
31
57
61
IOChannel::IOChannel
(
IOFD
fd
/* = EDM_IOFD_INVALID */
)
62
: m_fd (fd)
63
{}
64
65
IOChannel::~IOChannel
(
void
)
66
{}
67
71
72
IOFD
73
IOChannel::fd
(
void
)
const
74
{
return
m_fd
; }
75
78
void
79
IOChannel::fd
(
IOFD
value
)
80
{
81
// FIXME: close old one?
82
// FIXME: reset state?
83
m_fd
=
value
;
84
}
85
89
91
void
92
IOChannel::close
(
void
)
93
{
94
if
(
fd
() ==
EDM_IOFD_INVALID
)
95
return
;
96
97
int
error
= 0;
98
if
(!
sysclose
(
fd
(), &error))
99
throwStorageError
(
"FileCloseError"
,
"Calling IOChannel::close()"
,
100
"sysclose()"
, error);
101
102
fd
(
EDM_IOFD_INVALID
);
103
}
Throw.h
throwStorageError
void throwStorageError(const char *category, const char *context, const char *call, int error)
Definition:
Throw.cc:7
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
IOChannel::close
virtual void close(void)
Definition:
IOChannel.cc:92
IOChannel.h
IOChannel::sysclose
bool sysclose(IOFD fd, int *error=0)
Definition:
UnixIOChannel.cc:143
IOChannel::~IOChannel
virtual ~IOChannel(void)
Definition:
IOChannel.cc:65
IOFD
int IOFD
Definition:
IOTypes.h:22
IOChannel::IOChannel
IOChannel(IOFD fd=EDM_IOFD_INVALID)
Definition:
IOChannel.cc:61
relativeConstraints.error
tuple error
Definition:
relativeConstraints.py:55
EDM_IOFD_INVALID
#define EDM_IOFD_INVALID
Definition:
IOTypes.h:8
IOChannel::m_fd
IOFD m_fd
Definition:
IOChannel.h:39
IOChannel::fd
virtual IOFD fd(void) const
Definition:
IOChannel.cc:73
Generated for CMSSW Reference Manual by
1.8.5