DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
ers
include
ers
RemoteContext.hpp
Go to the documentation of this file.
1
/*
2
* DUNE DAQ modification notice:
3
* This file has been modified from the original ATLAS ers source for the DUNE DAQ project.
4
* Fork baseline commit: 8267df82a4f6fe6bf02c4014923eba19eddc4614 (2020-04-14).
5
* Renamed since fork: yes (from ers/RemoteContext.h to include/ers/RemoteContext.hpp).
6
*
7
* Original copyright:
8
* Copyright (C) 2001-2020 CERN for the benefit of the ATLAS collaboration.
9
* Licensed under the Apache License, Version 2.0.
10
*/
11
12
/*
13
* RemoteContext.h
14
* ers
15
*
16
* Created by Serguei Kolos on 26.11.05.
17
* Copyright 2004 CERN. All rights reserved.
18
*
19
*/
20
21
#ifndef ERS_REMOTE_CONTEXT_H
22
#define ERS_REMOTE_CONTEXT_H
23
28
29
#include <
ers/Context.hpp
>
30
31
namespace
ers
{
32
struct
RemoteProcessContext
33
{
34
RemoteProcessContext
(
const
std::string& host_name,
35
int
pid,
36
int
tid,
37
const
std::string& cwd,
38
int
uid,
39
const
std::string& uname,
40
const
std::string& app_name)
41
:
m_host_name
(host_name)
42
,
m_pid
(pid)
43
,
m_tid
(tid)
44
,
m_cwd
(cwd)
45
,
m_uid
(uid)
46
,
m_uname
(uname)
47
,
m_app_name
(app_name)
48
{
49
;
50
}
51
52
const
std::string
m_host_name
;
53
const
pid_t
m_pid
;
54
const
pid_t
m_tid
;
55
const
std::string
m_cwd
;
56
const
int
m_uid
;
57
const
std::string
m_uname
;
58
const
std::string
m_app_name
;
59
};
60
61
class
RemoteContext
:
public
Context
62
{
63
public
:
70
RemoteContext
(
const
std::string& package,
71
const
std::string& filename,
72
int
line_number
,
73
const
std::string&
function_name
,
74
const
RemoteProcessContext
& pc)
75
:
m_process
(pc)
76
,
m_package_name
(package)
77
,
m_file_name
(
filename
)
78
,
m_function_name
(
function_name
)
79
,
m_line_number
(
line_number
)
80
{
81
;
82
}
83
84
virtual
~RemoteContext
() { ; }
85
86
virtual
Context
*
clone
() const {
return
new
RemoteContext
(*
this
); }
87
88
const
char
*
cwd
() const {
return
m_process
.
m_cwd
.c_str(); }
89
90
const
char
*
file_name
() const {
return
m_file_name
.c_str(); }
91
92
const
char
*
function_name
() const
93
{
94
return
m_function_name
.c_str();
95
}
96
97
const
char
*
host_name
() const
98
{
99
return
m_process
.
m_host_name
.c_str();
100
}
101
102
int
line_number
() const {
return
m_line_number
; }
103
104
const
char
*
package_name
() const {
return
m_package_name
.c_str(); }
105
106
pid_t
process_id
() const {
return
m_process
.
m_pid
; }
107
108
pid_t
thread_id
() const {
return
m_process
.
m_tid
; }
109
110
void
*
const
*
stack_symbols
() const {
return
0; }
111
112
int
stack_size
() const {
return
0; }
113
114
int
user_id
() const {
return
m_process
.
m_uid
; }
115
116
const
char
*
user_name
() const {
return
m_process
.
m_uname
.c_str(); }
117
118
const
char
*
application_name
() const {
return
m_process
.
m_app_name
.c_str(); }
119
120
private
:
121
const
RemoteProcessContext
m_process
;
122
const
std::string
m_package_name
;
123
const
std::string
m_file_name
;
124
const
std::string
m_function_name
;
125
const
int
m_line_number
;
126
};
127
}
128
129
#endif
Context.hpp
ers::Context
An abstract interface to access an Issue context.
Definition
Context.hpp:40
ers::RemoteContext::application_name
const char * application_name() const
Definition
RemoteContext.hpp:118
ers::RemoteContext::package_name
const char * package_name() const
Definition
RemoteContext.hpp:104
ers::RemoteContext::stack_size
int stack_size() const
Definition
RemoteContext.hpp:112
ers::RemoteContext::clone
virtual Context * clone() const
Definition
RemoteContext.hpp:86
ers::RemoteContext::function_name
const char * function_name() const
Definition
RemoteContext.hpp:92
ers::RemoteContext::RemoteContext
RemoteContext(const std::string &package, const std::string &filename, int line_number, const std::string &function_name, const RemoteProcessContext &pc)
Definition
RemoteContext.hpp:70
ers::RemoteContext::stack_symbols
void *const * stack_symbols() const
Definition
RemoteContext.hpp:110
ers::RemoteContext::m_line_number
const int m_line_number
Definition
RemoteContext.hpp:125
ers::RemoteContext::cwd
const char * cwd() const
Definition
RemoteContext.hpp:88
ers::RemoteContext::m_package_name
const std::string m_package_name
Definition
RemoteContext.hpp:122
ers::RemoteContext::user_id
int user_id() const
Definition
RemoteContext.hpp:114
ers::RemoteContext::thread_id
pid_t thread_id() const
Definition
RemoteContext.hpp:108
ers::RemoteContext::user_name
const char * user_name() const
Definition
RemoteContext.hpp:116
ers::RemoteContext::m_process
const RemoteProcessContext m_process
Definition
RemoteContext.hpp:121
ers::RemoteContext::~RemoteContext
virtual ~RemoteContext()
Definition
RemoteContext.hpp:84
ers::RemoteContext::m_function_name
const std::string m_function_name
Definition
RemoteContext.hpp:124
ers::RemoteContext::host_name
const char * host_name() const
Definition
RemoteContext.hpp:97
ers::RemoteContext::file_name
const char * file_name() const
Definition
RemoteContext.hpp:90
ers::RemoteContext::process_id
pid_t process_id() const
Definition
RemoteContext.hpp:106
ers::RemoteContext::m_file_name
const std::string m_file_name
Definition
RemoteContext.hpp:123
ers::RemoteContext::line_number
int line_number() const
Definition
RemoteContext.hpp:102
ers
Definition
Logger.hxx:231
ers::RemoteProcessContext
Definition
RemoteContext.hpp:33
ers::RemoteProcessContext::m_app_name
const std::string m_app_name
Definition
RemoteContext.hpp:58
ers::RemoteProcessContext::m_host_name
const std::string m_host_name
Definition
RemoteContext.hpp:52
ers::RemoteProcessContext::m_pid
const pid_t m_pid
Definition
RemoteContext.hpp:53
ers::RemoteProcessContext::m_uid
const int m_uid
Definition
RemoteContext.hpp:56
ers::RemoteProcessContext::m_cwd
const std::string m_cwd
Definition
RemoteContext.hpp:55
ers::RemoteProcessContext::RemoteProcessContext
RemoteProcessContext(const std::string &host_name, int pid, int tid, const std::string &cwd, int uid, const std::string &uname, const std::string &app_name)
Definition
RemoteContext.hpp:34
ers::RemoteProcessContext::m_uname
const std::string m_uname
Definition
RemoteContext.hpp:57
ers::RemoteProcessContext::m_tid
const pid_t m_tid
Definition
RemoteContext.hpp:54
tablepositions::filename
@ filename
Definition
ui_constants.hpp:13
Generated on
for DUNE-DAQ by
1.18.0