DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
okssystem
include
okssystem
Descriptor.hpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS system source for the DUNE DAQ project.
3
// Fork baseline commit: system-00-00-20 (2020-09-25).
4
// Renamed since fork: yes (from system/Descriptor.h to include/okssystem/Descriptor.hpp).
5
6
/*
7
* Descriptor.h
8
* Test
9
*
10
* Created by Matthias Wiesmann on 08.02.05.
11
* Copyright 2005 CERN. All rights reserved.
12
*
13
*/
14
15
#ifndef OKSSYSTEM_DESCRIPTOR
16
#define OKSSYSTEM_DESCRIPTOR
17
18
#include <string>
19
#include <sys/stat.h>
20
#include <sys/types.h>
21
22
namespace
OksSystem
{
23
24
class
File
;
25
33
34
class
Descriptor
35
{
36
37
public
:
38
Descriptor
(
const
File
* file,
int
flags
, mode_t perm);
39
~Descriptor
();
40
41
static
int
flags
(
bool
read_mode,
bool
write_mode);
42
43
operator
int()
const
throw
();
44
45
void
close
();
46
void
close_safe
()
throw
();
47
48
int
read
(
void
* buffer,
size_t
number)
const
;
49
int
write
(
const
void
* buffer,
size_t
number)
const
;
50
51
int
fd
()
const
throw
();
52
53
void
closeOnExec
();
54
55
protected
:
56
void
open
(
const
File
* file,
int
flags
, mode_t perm);
57
58
private
:
59
int
m_fd
;
60
std::string
m_name
;
61
62
};
// Descriptor
63
64
}
// OksSystem
65
66
#endif
OksSystem::Descriptor::Descriptor
Descriptor(const File *file, int flags, mode_t perm)
Definition
Descriptor.cpp:41
OksSystem::Descriptor::read
int read(void *buffer, size_t number) const
Definition
Descriptor.cpp:108
OksSystem::Descriptor::fd
int fd() const
file descritptor
Definition
Descriptor.cpp:126
OksSystem::Descriptor::m_fd
int m_fd
Definition
Descriptor.hpp:59
OksSystem::Descriptor::flags
static int flags(bool read_mode, bool write_mode)
Definition
Descriptor.cpp:27
OksSystem::Descriptor::open
void open(const File *file, int flags, mode_t perm)
internal open method
Definition
Descriptor.cpp:66
OksSystem::Descriptor::closeOnExec
void closeOnExec()
It flags the file descriptor to be closed after any call to the exec okssystem function.
Definition
Descriptor.cpp:136
OksSystem::Descriptor::close
void close()
close the descriptor
Definition
Descriptor.cpp:85
OksSystem::Descriptor::close_safe
void close_safe()
close the descriptor no exception
Definition
Descriptor.cpp:99
OksSystem::Descriptor::write
int write(const void *buffer, size_t number) const
Definition
Descriptor.cpp:117
OksSystem::Descriptor::m_name
std::string m_name
internal file descriptor
Definition
Descriptor.hpp:60
OksSystem::File
Wrapper for file operations.
Definition
File.hpp:38
OksSystem
Definition
Descriptor.hpp:22
Generated on
for DUNE-DAQ by
1.18.0