ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigDecisionTool
Root
TDTUtilities.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigConfHLTData/HLTTriggerElement.h
"
6
7
#include "
TrigDecisionTool/TDTUtilities.h
"
8
#include "
TrigNavStructure/TriggerElement.h
"
9
10
#include <string>
11
#include <vector>
12
#include <algorithm>
13
14
15
16
17
18
namespace
TDTUtilities_impl
{
19
20
// splitting a string at the ','
21
std::vector<std::string>
22
split
(
const
std::string& line) {
23
std::vector<std::string>
res
;
24
std::string::size_type old_pos = 0, pos = line.find(
','
,0);
25
while
( pos != std::string::npos ) {
26
res
.push_back(line.substr(old_pos,pos-old_pos));
27
old_pos = pos + 1;
28
pos = line.find(
','
, old_pos);
29
}
30
// last entry
31
if
(old_pos < line.size())
32
res
.push_back(line.substr(old_pos,line.size()-old_pos));
33
return
res
;
34
}
35
}
36
37
38
std::vector< std::string >
39
Trig::convertStringToVector
(std::string_view triggerNames) {
40
std::string
temp
(triggerNames);
41
std::string::size_type pos;
42
// new erase all spaces
43
while
((pos =
temp
.find_first_of(
' '
)) != std::string::npos)
44
temp
.erase(pos,1);
45
return
TDTUtilities_impl::split
(
temp
);
46
}
47
48
49
std::vector< std::string >
50
Trig::keyWrap
(
const
std::vector< std::string >& triggerNames) {
51
std::vector< std::string > v;
52
v.assign(triggerNames.begin(),triggerNames.end());
53
std::sort
(v.begin(),v.end());
54
v.erase(
std::unique
(v.begin(),v.end()),v.end());
55
return
v;
56
}
57
58
59
std::string
Trig::getTEName
(
const
HLT::TriggerElement
& te)
60
{
61
std::string s;
62
//coverity[copy_constructor_call]
63
return
(
TrigConf::HLTTriggerElement::getLabel
(te.
getId
(), s) ? s :
""
);
64
}
HLTTriggerElement.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
TDTUtilities.h
TriggerElement.h
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition
TrigNavStructure/TrigNavStructure/TriggerElement.h:27
HLT::TriggerElement::getId
te_id_type getId() const
reset internals.
Definition
TrigNavStructure/TrigNavStructure/TriggerElement.h:43
TrigConf::HLTTriggerElement::getLabel
static bool getLabel(unsigned int id, std::string &label)
find name from ID in the map m_IdToLabel
Definition
HLTTriggerElement.cxx:63
TDTUtilities_impl
Definition
TDTUtilities.cxx:18
TDTUtilities_impl::split
std::vector< std::string > split(const std::string &line)
Definition
TDTUtilities.cxx:22
Trig::convertStringToVector
std::vector< std::string > convertStringToVector(std::string_view triggerNames)
makes a split of list of chains into the vector of chains
Definition
TDTUtilities.cxx:39
Trig::getTEName
std::string getTEName(const HLT::TriggerElement &te)
converts TEid to TE name (this may not always work, it depends on the availability of config)
Definition
TDTUtilities.cxx:59
Trig::keyWrap
std::vector< std::string > keyWrap(const std::vector< std::string > &triggerNames)
normalizes the list of triggers (patterns) by sorting and uniquing them
Definition
TDTUtilities.cxx:50
std::unique
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
Definition
DVL_algorithms.h:135
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition
DVL_algorithms.h:554
temp
Definition
JetEventDict.h:21
Generated on
for ATLAS Offline Software by
1.17.0