ATLAS Offline Software
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 
15 namespace TrigConf {
16 
17  class HLTTriggerElement;
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;
83  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
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TrigConf::HLTTriggerElement::isSet
bool isSet() const
Definition: HLTTriggerElement.h:76
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
TrigConf::HLTTriggerElement::reset
void reset()
Definition: HLTTriggerElement.h:73
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
detail
Definition: extract_histogram_tag.cxx:14
TrigConf::HLTTriggerElement::hashId
unsigned int hashId() const
Definition: HLTTriggerElement.h:59
TrigConf::HLTTriggerElement::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
print method
Definition: HLTTriggerElement.cxx:51
TrigConf::HLTTriggerElement::~HLTTriggerElement
virtual ~HLTTriggerElement() override=default
destructor
TrigConf::HLTTriggerElement::inEF
bool inEF() const
Definition: HLTTriggerElement.h:75
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigConf::HLTTriggerElement::operator<<
friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTTriggerElement &)
TrigConf::HLTTriggerElement::inL2
bool inL2() const
Definition: HLTTriggerElement.h:74
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigConfData.h
TrigConf::TrigConfData
Definition: TrigConfData.h:13
TrigConf::HLTTriggerElement::setHashId
void setHashId(unsigned int hashid)
Definition: HLTTriggerElement.h:64
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::HLTTriggerElement::m_hashId
unsigned int m_hashId
trigger element id
Definition: HLTTriggerElement.h:80
TrigConf::HLTTriggerElement::id
unsigned int id() const
Definition: HLTTriggerElement.h:60
TrigConf::HLTTriggerElement
HLT trigger element configuration information.
Definition: HLTTriggerElement.h:26
TrigConf::HLTTriggerElement::writeXML
virtual void writeXML(std::ofstream &xmlfile)
Definition: HLTTriggerElement.cxx:44
TrigConf::HLTTriggerElement::set
void set()
Definition: HLTTriggerElement.h:84
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::HLTTriggerElement::setEF
void setEF(bool on=true)
Definition: HLTTriggerElement.h:72
TrigConf::HLTTriggerElement::setL2
void setL2(bool on=true)
Definition: HLTTriggerElement.h:71
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