Belle II Software
release-05-02-19
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
h
i
l
m
n
p
r
s
t
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
CommandLine.cc
1
//+
2
// File : CommandLine.cc
3
// Description : Run external shell
4
//
5
// Author : Ryosuke Itoh, IPNS, KEK
6
// Date : 25 - Mar - 2020
7
//-
8
9
#include "daq/slc/system/CommandLine.h"
10
11
using namespace
Belle2
;
12
using namespace
std;
13
14
int
CommandLine::run_shell(
const
string
& cmdline,
string
& response)
15
{
16
FILE* fp = ::popen(cmdline.c_str(),
"r"
);
17
if
(fp == NULL) {
18
fprintf(stderr,
"run_shell: Error to run command : %s\n"
, cmdline.c_str());
19
return
-1;
20
}
21
char
buf[4096];
22
fgets(buf, 4096, fp);
23
buf[strlen(buf) - 1] =
'\0'
;
24
response = std::string(buf);
25
fclose(fp);
26
return
0;
27
}
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
daq
slc
system
src
CommandLine.cc
Generated on Tue Jan 4 2022 02:54:39 for Belle II Software by
1.8.17