ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfData
src
HLTMenu.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/HLTMenu.h
"
6
7
using
TV
= boost::property_tree::ptree::value_type;
// tree-value type
8
using namespace
std
;
9
10
TrigConf::HLTMenu::HLTMenu
()
11
{}
12
13
TrigConf::HLTMenu::HLTMenu
(
const
boost::property_tree::ptree &
data
)
14
:
DataStructure
(
data
)
15
{
16
load
();
17
}
18
19
void
20
TrigConf::HLTMenu::load
()
21
{
22
if
(!
isInitialized
() ||
empty
() ) {
23
return
;
24
}
25
m_name
=
getAttribute
(
"name"
);
26
}
27
28
void
29
TrigConf::HLTMenu::clear
()
30
{
31
m_smk
= 0;
32
}
33
34
std::size_t
35
TrigConf::HLTMenu::size
()
const
36
{
37
return
data
().get_child(
"chains"
).size();
38
}
39
40
unsigned
int
41
TrigConf::HLTMenu::smk
()
const
{
42
return
m_smk
;
43
}
44
45
void
46
TrigConf::HLTMenu::setSMK
(
unsigned
int
smk
) {
47
m_smk
=
smk
;
48
}
49
50
TrigConf::HLTMenu::const_iterator
51
TrigConf::HLTMenu::begin
()
const
52
{
53
return
{
data
().get_child(
"chains"
), 0, [](
auto
&
x
){
auto
chain =
Chain
(
x
.first,
x
.second);
return
chain; }};
54
}
55
56
TrigConf::HLTMenu::const_iterator
57
TrigConf::HLTMenu::end
()
const
58
{
59
auto
& pt =
data
().get_child(
"chains"
);
60
return
{ pt, pt.size(), [](
auto
&
x
){
return
Chain
(
x
.second);} };
61
}
62
63
64
std::vector<TrigConf::DataStructure>
65
TrigConf::HLTMenu::streams
()
const
66
{
67
std::vector<DataStructure> strlist;
68
auto
streams
=
data
().get_child_optional(
"streams"
);
69
if
(
streams
) {
70
strlist.reserve(
streams
->size());
71
for
(
auto
& strData : *
streams
) {
72
strlist.emplace_back( strData.second );
73
}
74
}
75
return
strlist;
76
}
77
78
79
std::map<std::string, std::vector<std::string>>
80
TrigConf::HLTMenu::sequencers
()
const
81
{
82
std::map<std::string, std::vector<std::string>> result;
83
const
auto
&
sequencers
=
getObject
(
"sequencers"
);
84
85
for
(
auto
& sequence :
sequencers
.getKeys() ) {
86
for
(
auto
& alg :
sequencers
.getList(sequence) ) {
87
result[sequence].emplace_back(alg.getValue<std::string>());
88
}
89
}
90
91
return
result;
92
}
93
94
95
void
96
TrigConf::HLTMenu::printMenu
(
bool
full)
const
97
{
98
cout <<
"HLT menu '"
<<
name
() <<
"'"
<< endl;
99
cout <<
"Streams: "
<<
streams
().size() << endl;
100
cout <<
"Chains: "
<<
size
() << endl;
101
if
(full) {
102
int
c(0);
103
for
(
auto
& chain : *
this
) {
104
cout <<
" "
<< c++ <<
": "
<< chain.name() << endl;
105
}
106
}
107
}
TV
boost::property_tree::ptree::value_type TV
Definition
HLTMenu.cxx:7
HLTMenu.h
size
size_t size() const
Number of registered mappings.
x
#define x
empty
static const Attributes_t empty
Definition
XmlStreamer.cxx:16
TrigConf::Chain
HLT chain configuration.
Definition
TrigConfData/TrigConfData/HLTChain.h:18
TrigConf::DataStructure::name
virtual const std::string & name() const final
Definition
DataStructure.cxx:108
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
TrigConf::DataStructure::getObject
DataStructure getObject(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to configuration object.
Definition
DataStructure.cxx:206
TrigConf::HLTMenu::streams
std::vector< DataStructure > streams() const
Accessor to the connected output streams.
Definition
HLTMenu.cxx:65
TrigConf::HLTMenu::end
const_iterator end() const
End of the HLT chains list.
Definition
HLTMenu.cxx:57
TrigConf::HLTMenu::begin
const_iterator begin() const
Begin of the HLT chains list.
Definition
HLTMenu.cxx:51
TrigConf::HLTMenu::const_iterator
ConstIter< ptree, Chain > const_iterator
Iterator over the HLT chains.
Definition
HLTMenu.h:50
TrigConf::HLTMenu::sequencers
std::map< std::string, std::vector< std::string > > sequencers() const
Accessor to the sequencers.
Definition
HLTMenu.cxx:80
TrigConf::HLTMenu::setSMK
void setSMK(unsigned int psk)
Definition
HLTMenu.cxx:46
TrigConf::HLTMenu::size
std::size_t size() const
Accessor to the number of HLT chains.
Definition
HLTMenu.cxx:35
TrigConf::HLTMenu::printMenu
void printMenu(bool full=false) const
print overview of L1 Menu
Definition
HLTMenu.cxx:96
TrigConf::HLTMenu::load
void load()
Definition
HLTMenu.cxx:20
TrigConf::HLTMenu::HLTMenu
HLTMenu()
Constructor.
Definition
HLTMenu.cxx:10
TrigConf::HLTMenu::clear
virtual void clear() override
Clearing the configuration data.
Definition
HLTMenu.cxx:29
TrigConf::HLTMenu::m_smk
unsigned int m_smk
the supermasterkey
Definition
HLTMenu.h:83
TrigConf::HLTMenu::smk
unsigned int smk() const
setter and getter for the supermasterkey
Definition
HLTMenu.cxx:41
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0