ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace 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
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
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
Classes
Class List
Class Index
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
z
Enumerations
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
Enumerator
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
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File 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
l
m
n
o
p
q
r
s
t
u
v
w
x
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
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
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
Macros
_
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
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
PhysicsAnalysis
D3PDTools
SampleHandler
Root
ToolsJoin.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//
6
// Distributed under the Boost Software License, Version 1.0.
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
// http://www.boost.org/LICENSE_1_0.txt)
9
10
// Please feel free to contact me (krumnack@iastate.edu) for bug
11
// reports, feature suggestions, praise and complaints.
12
13
14
//
15
// includes
16
//
17
18
#include <
SampleHandler/ToolsJoin.h
>
19
20
#include <memory>
21
#include <
RootCoreUtils/StringUtil.h
>
22
#include <
SampleHandler/SampleHandler.h
>
23
#include <
SampleHandler/SampleLocal.h
>
24
25
//
26
// method implementations
27
//
28
29
namespace
SH
30
{
31
void
mergeSamples
(
SampleHandler
&
sh
,
const
std::string&
sampleName
,
32
const
std::string&
pattern
)
33
{
34
SampleHandler
mysh;
35
std::unique_ptr<SampleLocal> mysample (
new
SampleLocal
(
sampleName
));
36
37
boost::regex
mypattern (
pattern
.c_str());
38
for
(
SampleHandler::iterator
sample
=
sh
.begin(),
39
end
=
sh
.end();
sample
!=
end
; ++
sample
)
40
{
41
if
(
RCU::match_expr
(mypattern, (*sample)->name()))
42
{
43
for
(
unsigned
file
= 0,
end
= (*sample)->numFiles();
44
file
!=
end
; ++
file
)
45
{
46
mysample->
add
((*sample)->fileName (
file
));
47
}
48
}
else
49
{
50
mysh.
add
(*
sample
);
51
}
52
}
53
mysh.
add
(mysample.release());
54
swap
(mysh,
sh
);
55
}
56
}
mergePhysValFiles.pattern
pattern
Definition:
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
SH::SampleHandler::iterator
std::vector< Sample * >::const_iterator iterator
the iterator to use
Definition:
SampleHandler.h:475
SH::SampleHandler::add
void add(Sample *sample)
add a sample to the handler
SampleHandler.h
StringUtil.h
SH::mergeSamples
void mergeSamples(SampleHandler &sh, const std::string &sampleName, const std::string &pattern)
effects: remove all samples matching the name pattern, and join them into a single sample named sampl...
Definition:
ToolsJoin.cxx:31
mergePhysValFiles.end
end
Definition:
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
PrepareReferenceFile.regex
regex
Definition:
PrepareReferenceFile.py:43
SampleLocal.h
FullCPAlgorithmsTest_eljob.sample
sample
Definition:
FullCPAlgorithmsTest_eljob.py:116
RCU::Shell
Definition:
ShellExec.cxx:28
RCU::match_expr
bool match_expr(const boost::regex &expr, const std::string &str)
returns: whether we can match the entire string with the regular expression guarantee: strong failure...
Definition:
StringUtil.cxx:40
file
TFile * file
Definition:
tile_monitor.h:29
WriteCalibToCool.swap
swap
Definition:
WriteCalibToCool.py:94
ToolsJoin.h
SH::SampleLocal
A Sample based on a simple file list.
Definition:
SampleLocal.h:38
SH::SampleHandler
A class that manages a list of Sample objects.
Definition:
SampleHandler.h:60
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition:
PrunDriver.h:15
SH::SampleLocal::add
void add(const std::string &file)
add a file to the list
getEFTrackSample.sampleName
sampleName
Definition:
getEFTrackSample.py:13
Generated on Fri Mar 28 2025 21:20:42 for ATLAS Offline Software by
1.8.18