ATLAS Offline Software
Loading...
Searching...
No Matches
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
7
8#include <iostream>
9#include <fstream>
10#include <stdexcept>
11
12using namespace std;
13using namespace TrigConf;
14
20
23 m_hashId(HLTUtils::string2hash(name)), // don't allow for external setting of trigger element id's
24 m_level(0)
25{
26}
27
28HLTTriggerElement::HLTTriggerElement( unsigned int, const string& 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
35HLTTriggerElement::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
43void
45 xmlfile << " <TRIGGERELEMENT te_name=\""
46 << name() << "\"/>" << endl;
47 return;
48}
49
50void
51HLTTriggerElement::print(const std::string& indent, unsigned int /*detail*/) const {
52 std::cout << indent << *this;
53}
54
55std::ostream &
56TrigConf::operator<<(std::ostream & o, const HLTTriggerElement & te) {
57 o << "(\"" << te.name() << "\", " << te.m_hashId << ")";
58 return o;
59}
60
61
62bool
63HLTTriggerElement::getLabel(unsigned int id, string & label) {
65 if (label=="UNKNOWN HASH ID") {
66 label = "";
67 return false;
68 }
69 return true;
70}
HLT trigger element configuration information.
static bool getLabel(unsigned int id, std::string &label)
find name from ID in the map m_IdToLabel
virtual void writeXML(std::ofstream &xmlfile)
HLTTriggerElement()
default constructor
unsigned int m_level
level where TE is produced for a given configuration (to be determined in light of the menu,...
unsigned int m_hashId
trigger element id
virtual void print(const std::string &indent="", unsigned int detail=1) const override
print method
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
std::ostream & indent(std::ostream &o, int lvl, int size) const
const std::string & name() const
TrigConfData(const std::string &name="")
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29
std::string label(const std::string &format, int i)
Definition label.h:19
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
STL namespace.