ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
9
10TrigConf::Chain::Chain(const boost::property_tree::ptree & data)
12{
13 load();
14}
15
16TrigConf::Chain::Chain(const std::string & name, const boost::property_tree::ptree & data)
18{
19 load();
20}
21
22void
27
28void
30{
31 if(! isInitialized() || empty() ) {
32 return;
33 }
34 m_name = getAttribute("name", true, m_name);
35}
36
37std::string
39 return "Chain";
40}
41
42
43unsigned int
45{
46 return getAttribute<unsigned int>("counter");
47}
48
49unsigned int
51{
52 return getAttribute<unsigned int>("nameHash");
53}
54
55const std::string &
57{
58 return getAttribute("l1item");
59}
60
61std::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
73std::vector<std::string>
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
89std::vector<std::string>
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
105std::vector<std::string>
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
125std::vector<std::string>
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
static const Attributes_t empty
std::vector< std::string > l1thresholds() const
Accessor to the l1 thresholds.
std::vector< std::string > sequencers() const
Accessor to the sequencers this chain belongs to.
std::vector< std::string > groups() const
Accessor to the groups this chain belongs to.
const std::string & l1item() const
Accessor to the seeding L1 item.
std::vector< size_t > legMultiplicities() const
Accessor to the chains multiplicitiy requirements for each of its legs.
void update() override
Update the internal data after modification of the data object.
unsigned int counter() const
Accessor to the chain counter.
virtual std::string className() const override
A string that is the name of the class.
std::vector< std::string > streams() const
Accessor to the connected output streams.
unsigned int namehash() const
Accessor to the chain name hash.
virtual const std::string & name() const final
std::vector< DataStructure > getList(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to array structure.
const ptree & data() const
Access to the underlying data, if needed.
DataStructure()
Default constructor, leading to an uninitialized configuration object.
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.