ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfHLTData
Root
HLTTriggerElement.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigConfHLTData/HLTTriggerElement.h
"
6
#include "
TrigConfHLTUtils/HLTUtils.h
"
7
8
#include <iostream>
9
#include <fstream>
10
#include <stdexcept>
11
12
using namespace
std
;
13
using namespace
TrigConf
;
14
15
HLTTriggerElement::HLTTriggerElement
() :
16
TrigConfData
(
""
),
17
m_hashId
(0),
18
m_level
(0)
19
{}
20
21
HLTTriggerElement::HLTTriggerElement
(
const
string
&
name
) :
22
TrigConfData
(
name
),
23
m_hashId
(
HLTUtils
::string2hash(
name
)),
// don't allow for external setting of trigger element id's
24
m_level
(0)
25
{
26
}
27
28
HLTTriggerElement::HLTTriggerElement
(
unsigned
int
,
const
string
&
name
) :
29
TrigConfData
(
name
),
30
m_hashId
(
HLTUtils
::string2hash(
name
) ),
// don't allow for external setting of trigger element id's
31
m_level
(0)
32
{
33
}
34
35
HLTTriggerElement::HLTTriggerElement
(
const
std::pair<unsigned int,string>& p ) :
36
TrigConfData
(p.second),
37
m_hashId
(
HLTUtils
::string2hash(p.second) ),
// don't yet allow for external setting of trigger element id's
38
m_level
(0)
39
{
40
}
41
42
43
void
44
HLTTriggerElement::writeXML
(std::ofstream &
xmlfile
) {
45
xmlfile
<<
" <TRIGGERELEMENT te_name=\""
46
<<
name
() <<
"\"/>"
<< endl;
47
return
;
48
}
49
50
void
51
HLTTriggerElement::print
(
const
std::string&
indent
,
unsigned
int
/*detail*/
)
const
{
52
std::cout <<
indent
<< *
this
;
53
}
54
55
std::ostream &
56
TrigConf::operator<<
(std::ostream & o,
const
HLTTriggerElement
& te) {
57
o <<
"(\""
<< te.
name
() <<
"\", "
<< te.
m_hashId
<<
")"
;
58
return
o;
59
}
60
61
62
bool
63
HLTTriggerElement::getLabel
(
unsigned
int
id
,
string
&
label
) {
64
label
=
HLTUtils::hash2string
(
id
);
65
if
(
label
==
"UNKNOWN HASH ID"
) {
66
label
=
""
;
67
return
false
;
68
}
69
return
true
;
70
}
HLTTriggerElement.h
HLTUtils.h
TrigConf::HLTTriggerElement
HLT trigger element configuration information.
Definition
HLTTriggerElement.h:26
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
TrigConf::HLTTriggerElement::writeXML
virtual void writeXML(std::ofstream &xmlfile)
Definition
HLTTriggerElement.cxx:44
TrigConf::HLTTriggerElement::HLTTriggerElement
HLTTriggerElement()
default constructor
Definition
HLTTriggerElement.cxx:15
TrigConf::HLTTriggerElement::m_level
unsigned int m_level
level where TE is produced for a given configuration (to be determined in light of the menu,...
Definition
HLTTriggerElement.h:82
TrigConf::HLTTriggerElement::m_hashId
unsigned int m_hashId
trigger element id
Definition
HLTTriggerElement.h:80
TrigConf::HLTTriggerElement::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
print method
Definition
HLTTriggerElement.cxx:51
TrigConf::HLTUtils::hash2string
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition
TrigConfData.cxx:23
TrigConf::TrigConfData::name
const std::string & name() const
Definition
TrigConfData.h:22
TrigConf::TrigConfData::TrigConfData
TrigConfData(const std::string &name="")
Definition
TrigConfData.cxx:14
xmlfile
static std::vector< std::string > xmlfile
Definition
iLumiCalc.h:29
label
std::string label(const std::string &format, int i)
Definition
label.h:19
HLTUtils
Definition
HLTUtils.py:1
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition
Config.h:22
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition
L1ThresholdBase.cxx:339
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0