Belle II Software
release-08-00-10
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
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
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
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
Typedefs
Macros
dqmmerge.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#include <string>
9
#include <stdio.h>
10
#include <stdlib.h>
11
#include <sys/stat.h>
12
13
#include <TFileMerger.h>
14
15
using namespace
std;
16
17
int
main
(
int
argc,
char
** argv)
18
{
19
if
(argc < 6) {
20
printf(
"Usage : dqmmerge topdir histofile nnodes startnode outfile\n"
);
21
exit(-1);
22
}
23
string
topdir = string(argv[1]);
24
string
file = string(argv[2]);
25
int
nnodes = atoi(argv[3]);
26
int
startnode = atoi(argv[4]);
27
string
outfile = string(argv[5]);
28
29
// Set up merger with output file
30
TFileMerger merger(
false
,
false
);
31
if
(!merger.OutputFile(outfile.c_str())) {
32
printf(
"RbTupleManager:: error to open output file %s\n"
, file.c_str());
33
return
-1;
34
}
35
36
// Make file list
37
for
(
int
i = 0; i < nnodes; i++) {
38
char
histofile[1024];
39
sprintf(histofile,
"%s/evp_hltwk%2.2d/%s"
,
40
topdir.c_str(), startnode + i,
41
file.c_str());
42
struct
stat statbuf;
43
if
(stat(histofile, &statbuf) == 0)
44
merger.AddFile(histofile);
45
}
46
47
// Do Merge
48
if
(!merger.Merge()) {
49
printf(
"RbTupleManager:: error to merge files\n"
);
50
return
-1;
51
}
52
}
53
54
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:91
daq
dqm
tools
dqmmerge.cc
Generated on Fri Aug 9 2024 00:49:25 for Belle II Software by
1.9.1