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
{
33
struct
RemoteProcessContext
34
{
35
RemoteProcessContext
(
const
std::string & host_name,
36
int
pid,
37
int
tid,
38
const
std::string & cwd,
39
int
uid,
40
const
std::string & uname,
41
const
std::string & app_name )
42
:
m_host_name
( host_name ),
43
m_pid
( pid ),
44
m_tid
( tid ),
45
m_cwd
( cwd ),
46
m_uid
( uid ),
47
m_uname
( uname ),
48
m_app_name
( app_name )
49
{ ; }
50
51
const
std::string
m_host_name
;
52
const
pid_t
m_pid
;
53
const
pid_t
m_tid
;
54
const
std::string
m_cwd
;
55
const
int
m_uid
;
56
const
std::string
m_uname
;
57
const
std::string
m_app_name
;
58
};
59
60
class
RemoteContext
:
public
Context
61
{
62
public
:
63
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
virtual
~RemoteContext
()
83
{ ; }
84
85
virtual
Context
*
clone
() const
86
{
return
new
RemoteContext
( *
this
); }
87
88
const
char
*
cwd
() const
89
{
return
m_process
.m_cwd.c_str(); }
90
91
const
char
*
file_name
() const
92
{
return
m_file_name
.c_str(); }
93
94
const
char
*
function_name
() const
95
{
return
m_function_name
.c_str(); }
96
97
const
char
*
host_name
() const
98
{
return
m_process
.m_host_name.c_str(); }
99
100
int
line_number
() const
101
{
return
m_line_number
; }
102
103
const
char
*
package_name
() const
104
{
return
m_package_name
.c_str(); }
105
106
pid_t
process_id
() const
107
{
return
m_process
.m_pid; }
108
109
pid_t
thread_id
() const
110
{
return
m_process
.m_tid; }
111
112
void
*
const
*
stack_symbols
() const
113
{
return
0; }
114
115
int
stack_size
() const
116
{
return
0; }
117
118
int
user_id
() const
119
{
return
m_process
.m_uid; }
120
121
const
char
*
user_name
() const
122
{
return
m_process
.m_uname.c_str(); }
123
124
const
char
*
application_name
() const
125
{
return
m_process
.m_app_name.c_str(); }
126
127
private
:
128
const
RemoteProcessContext
m_process
;
129
const
std::string
m_package_name
;
130
const
std::string
m_file_name
;
131
const
std::string
m_function_name
;
132
const
int
m_line_number
;
133
};
134
}
135
136
#endif
137
Context.hpp
ers::Context
An abstract interface to access an Issue context.
Definition
Context.hpp:41
ers::RemoteContext::application_name
const char * application_name() const
Definition
RemoteContext.hpp:124
ers::RemoteContext::package_name
const char * package_name() const
Definition
RemoteContext.hpp:103
ers::RemoteContext::stack_size
int stack_size() const
Definition
RemoteContext.hpp:115
ers::RemoteContext::clone
virtual Context * clone() const
Definition
RemoteContext.hpp:85
ers::RemoteContext::function_name
const char * function_name() const
Definition
RemoteContext.hpp:94
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:112
ers::RemoteContext::m_line_number
const int m_line_number
Definition
RemoteContext.hpp:132
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:129
ers::RemoteContext::user_id
int user_id() const
Definition
RemoteContext.hpp:118
ers::RemoteContext::thread_id
pid_t thread_id() const
Definition
RemoteContext.hpp:109
ers::RemoteContext::user_name
const char * user_name() const
Definition
RemoteContext.hpp:121
ers::RemoteContext::m_process
const RemoteProcessContext m_process
Definition
RemoteContext.hpp:128
ers::RemoteContext::~RemoteContext
virtual ~RemoteContext()
Definition
RemoteContext.hpp:82
ers::RemoteContext::m_function_name
const std::string m_function_name
Definition
RemoteContext.hpp:131
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:91
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:130
ers::RemoteContext::line_number
int line_number() const
Definition
RemoteContext.hpp:100
ers
Definition
Logger.hxx:202
ers::RemoteProcessContext
Definition
RemoteContext.hpp:34
ers::RemoteProcessContext::m_app_name
const std::string m_app_name
Definition
RemoteContext.hpp:57
ers::RemoteProcessContext::m_host_name
const std::string m_host_name
Definition
RemoteContext.hpp:51
ers::RemoteProcessContext::m_pid
const pid_t m_pid
Definition
RemoteContext.hpp:52
ers::RemoteProcessContext::m_uid
const int m_uid
Definition
RemoteContext.hpp:55
ers::RemoteProcessContext::m_cwd
const std::string m_cwd
Definition
RemoteContext.hpp:54
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:35
ers::RemoteProcessContext::m_uname
const std::string m_uname
Definition
RemoteContext.hpp:56
ers::RemoteProcessContext::m_tid
const pid_t m_tid
Definition
RemoteContext.hpp:53
tablepositions::filename
@ filename
Definition
ui_constants.hpp:11
Generated on
for DUNE-DAQ by
1.17.0