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/types.h>
20
#include <sys/stat.h>
21
22
namespace
OksSystem
{
23
24
class
File
;
25
33
34
class
Descriptor
{
35
36
public
:
37
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
57
void
open
(
const
File
* file,
int
flags
, mode_t perm);
58
59
private
:
60
61
int
m_fd
;
62
std::string
m_name
;
63
64
};
// Descriptor
65
66
}
// OksSystem
67
68
#endif
69
OksSystem::Descriptor::Descriptor
Descriptor(const File *file, int flags, mode_t perm)
Definition
Descriptor.cpp:40
OksSystem::Descriptor::read
int read(void *buffer, size_t number) const
Definition
Descriptor.cpp:98
OksSystem::Descriptor::fd
int fd() const
file descritptor
Definition
Descriptor.cpp:111
OksSystem::Descriptor::m_fd
int m_fd
Definition
Descriptor.hpp:61
OksSystem::Descriptor::flags
static int flags(bool read_mode, bool write_mode)
Definition
Descriptor.cpp:26
OksSystem::Descriptor::~Descriptor
~Descriptor()
Definition
Descriptor.cpp:45
OksSystem::Descriptor::open
void open(const File *file, int flags, mode_t perm)
internal open method
Definition
Descriptor.cpp:62
OksSystem::Descriptor::closeOnExec
void closeOnExec()
It flags the file descriptor to be closed after any call to the exec okssystem function.
Definition
Descriptor.cpp:119
OksSystem::Descriptor::close
void close()
close the descriptor
Definition
Descriptor.cpp:78
OksSystem::Descriptor::close_safe
void close_safe()
close the descriptor no exception
Definition
Descriptor.cpp:91
OksSystem::Descriptor::write
int write(const void *buffer, size_t number) const
Definition
Descriptor.cpp:105
OksSystem::Descriptor::m_name
std::string m_name
internal file descriptor
Definition
Descriptor.hpp:62
OksSystem::File
Wrapper for file operations.
Definition
File.hpp:37
OksSystem
Definition
Descriptor.hpp:22
Generated on
for DUNE-DAQ by
1.17.0