ATLAS Offline Software
Loading...
Searching...
No Matches
HLTTriggerElement.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrigConf_HLTTriggerElement
6#define TrigConf_HLTTriggerElement
7
9
10#include <iosfwd>
11#include <fstream>
12#include <string>
13#include <map>
14
15namespace TrigConf {
16
18 std::ostream & operator<<(std::ostream &, const HLTTriggerElement &);
19
27
28 public:
29
32
39 HLTTriggerElement( const std::string& name );
40
47 HLTTriggerElement( unsigned int i, const std::string& name );
48
53 HLTTriggerElement( const std::pair<unsigned int, std::string>& p);
54
56 virtual ~HLTTriggerElement() override = default;
57
58 // getters
59 unsigned int hashId() const { return m_hashId; }
60 unsigned int id() const { return m_hashId; }
61
62
63 // setters
64 void setHashId(unsigned int hashid) { m_hashId = hashid; }
65
66
68 virtual void print(const std::string& indent="", unsigned int detail=1) const override;
69 virtual void writeXML(std::ofstream & xmlfile);
70
71 void setL2(bool on=true) { set(); if(on) m_level |= 0x1; else m_level &= 0x2; }
72 void setEF(bool on=true) { set(); if(on) m_level |= 0x2; else m_level &= 0x1; }
73 void reset() { m_level = 0x4; }
74 bool inL2() const { return (m_level&0x1) != 0; }
75 bool inEF() const { return (m_level&0x2) != 0; }
76 bool isSet() const { return (m_level&0x4) == 0; }
77
78 private:
79
80 unsigned int m_hashId;
81
82 unsigned int m_level;
84 void set() { m_level &= 0x3; }
85
86 friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTTriggerElement &);
87
88 public:
94 static bool getLabel(unsigned int id, std::string & label);
95 };
96
97}
98
99#endif
HLT trigger element configuration information.
unsigned int hashId() const
void setHashId(unsigned int hashid)
static bool getLabel(unsigned int id, std::string &label)
find name from ID in the map m_IdToLabel
virtual void writeXML(std::ofstream &xmlfile)
virtual ~HLTTriggerElement() override=default
destructor
friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTTriggerElement &)
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
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)