ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfData
src
TrigConfData/src/HLTChain.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigConfData/HLTChain.h
"
6
7
TrigConf::Chain::Chain
()
8
{}
9
10
TrigConf::Chain::Chain
(
const
boost::property_tree::ptree &
data
)
11
:
DataStructure
(
data
)
12
{
13
load
();
14
}
15
16
TrigConf::Chain::Chain
(
const
std::string &
name
,
const
boost::property_tree::ptree &
data
)
17
:
DataStructure
(
name
,
data
)
18
{
19
load
();
20
}
21
22
void
23
TrigConf::Chain::update
()
24
{
25
load
();
26
}
27
28
void
29
TrigConf::Chain::load
()
30
{
31
if
(!
isInitialized
() ||
empty
() ) {
32
return
;
33
}
34
m_name
=
getAttribute
(
"name"
,
true
,
m_name
);
35
}
36
37
std::string
38
TrigConf::Chain::className
()
const
{
39
return
"Chain"
;
40
}
41
42
43
unsigned
int
44
TrigConf::Chain::counter
()
const
45
{
46
return
getAttribute<unsigned int>
(
"counter"
);
47
}
48
49
unsigned
int
50
TrigConf::Chain::namehash
()
const
51
{
52
return
getAttribute<unsigned int>
(
"nameHash"
);
53
}
54
55
const
std::string &
56
TrigConf::Chain::l1item
()
const
57
{
58
return
getAttribute
(
"l1item"
);
59
}
60
61
std::vector<size_t>
TrigConf::Chain::legMultiplicities
()
const
{
62
std::vector<size_t> returnMultiplicities;
63
const
auto
& theMultiplicities =
getList
(
"legMultiplicities"
);
64
if
( !theMultiplicities.empty() ) {
65
returnMultiplicities.reserve(theMultiplicities.size());
66
for
(
auto
& m : theMultiplicities ) {
67
returnMultiplicities.push_back( m.getValue<
size_t
>() );
68
}
69
}
70
return
returnMultiplicities;
71
}
72
73
std::vector<std::string>
74
TrigConf::Chain::l1thresholds
()
const
75
{
76
77
std::vector<std::string> thrV;
78
const
auto
& thrs =
getList
(
"l1thresholds"
);
79
if
( !thrs.empty() ) {
80
thrV.reserve(thrs.size());
81
for
(
auto
& thr : thrs ) {
82
thrV.emplace_back( thr.getValue<std::string>() );
83
}
84
}
85
return
thrV;
86
}
87
88
89
std::vector<std::string>
90
TrigConf::Chain::streams
()
const
91
{
92
93
std::vector<std::string> strlist;
94
const
auto
&
streams
=
getList
(
"streams"
);
95
if
( !
streams
.empty() ) {
96
strlist.reserve(
streams
.size());
97
for
(
auto
& stream :
streams
) {
98
strlist.emplace_back( stream.getValue<std::string>() );
99
}
100
}
101
return
strlist;
102
}
103
104
105
std::vector<std::string>
106
TrigConf::Chain::groups
()
const
107
{
108
109
std::vector<std::string> grouplist;
110
const
auto
&
groups
=
getList
(
"groups"
,
/*ignoreIfMissing=*/
true
);
111
if
( !
groups
.empty() ) {
112
grouplist.reserve(
groups
.size());
113
for
(
auto
& group :
groups
) {
114
if
(group.hasAttribute(
"name"
)) {
115
grouplist.emplace_back( group[
"name"
] );
116
}
else
if
(group.isValue()) {
117
grouplist.emplace_back( group.getValue<std::string>() );
118
}
119
}
120
}
121
122
return
grouplist;
123
}
124
125
std::vector<std::string>
126
TrigConf::Chain::sequencers
()
const
127
{
128
129
std::vector<std::string> seqlist;
130
const
auto
& seqs =
getList
(
"sequencers"
);
131
if
( !seqs.empty() ) {
132
seqlist.reserve(seqs.size());
133
for
(
auto
& seq : seqs ) {
134
seqlist.emplace_back( seq.getValue<std::string>() );
135
}
136
}
137
return
seqlist;
138
}
139
HLTChain.h
empty
static const Attributes_t empty
Definition
XmlStreamer.cxx:16
TrigConf::Chain::l1thresholds
std::vector< std::string > l1thresholds() const
Accessor to the l1 thresholds.
Definition
TrigConfData/src/HLTChain.cxx:74
TrigConf::Chain::sequencers
std::vector< std::string > sequencers() const
Accessor to the sequencers this chain belongs to.
Definition
TrigConfData/src/HLTChain.cxx:126
TrigConf::Chain::groups
std::vector< std::string > groups() const
Accessor to the groups this chain belongs to.
Definition
TrigConfData/src/HLTChain.cxx:106
TrigConf::Chain::l1item
const std::string & l1item() const
Accessor to the seeding L1 item.
Definition
TrigConfData/src/HLTChain.cxx:56
TrigConf::Chain::legMultiplicities
std::vector< size_t > legMultiplicities() const
Accessor to the chains multiplicitiy requirements for each of its legs.
Definition
TrigConfData/src/HLTChain.cxx:61
TrigConf::Chain::update
void update() override
Update the internal data after modification of the data object.
Definition
TrigConfData/src/HLTChain.cxx:23
TrigConf::Chain::counter
unsigned int counter() const
Accessor to the chain counter.
Definition
TrigConfData/src/HLTChain.cxx:44
TrigConf::Chain::load
void load()
Definition
TrigConfData/src/HLTChain.cxx:29
TrigConf::Chain::Chain
Chain()
Constructor.
Definition
TrigConfData/src/HLTChain.cxx:7
TrigConf::Chain::className
virtual std::string className() const override
A string that is the name of the class.
Definition
TrigConfData/src/HLTChain.cxx:38
TrigConf::Chain::streams
std::vector< std::string > streams() const
Accessor to the connected output streams.
Definition
TrigConfData/src/HLTChain.cxx:90
TrigConf::Chain::namehash
unsigned int namehash() const
Accessor to the chain name hash.
Definition
TrigConfData/src/HLTChain.cxx:50
TrigConf::DataStructure::name
virtual const std::string & name() const final
Definition
DataStructure.cxx:108
TrigConf::DataStructure::getList
std::vector< DataStructure > getList(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to array structure.
Definition
DataStructure.cxx:157
TrigConf::DataStructure::isInitialized
bool isInitialized() const
Definition
DataStructure.h:216
TrigConf::DataStructure::data
const ptree & data() const
Access to the underlying data, if needed.
Definition
DataStructure.h:83
TrigConf::DataStructure::DataStructure
DataStructure()
Default constructor, leading to an uninitialized configuration object.
Definition
DataStructure.cxx:11
TrigConf::DataStructure::m_name
std::string m_name
Definition
DataStructure.h:259
TrigConf::DataStructure::getAttribute
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.
Definition
DataStructure.h:152
Generated on
for ATLAS Offline Software by
1.17.0