ATLAS Offline Software
TriggerItem.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TrigConf_TriggerItem
8 #define TrigConf_TriggerItem
9 
12 
13 #include <string>
14 #include <stdexcept>
15 #include <iostream>
16 
17 namespace TrigConf {
18 
19  class DiffStruct;
20  class TriggerItem;
21 
22  std::ostream & operator<<(std::ostream &, const TrigConf::TriggerItem &);
23 
24  // class TriggerItem : public L1DataBaseclass {
25  class TriggerItem : public TrigConfData {
26  public:
27  TriggerItem();
28  virtual ~TriggerItem() override;
29 
30  // getters
31  unsigned int complex_deadtime() const { return m_ComplexDeadtime; }
32  const std::string& definition() const { return m_Definition; }
33  unsigned int triggerType() const { return m_TriggerType; }
34  int ctpId() const { return m_CtpId; }
35  unsigned int partition() const { return m_Partition; }
36  const TriggerItemNode* topNode() const { return m_TopNode; }
37  unsigned short monitor() const { return m_Monitor; }
38  uint16_t bunchgroupMask() const;
39 
40  // setters
41  void setComplexDeadtime( unsigned int cmpldt ) { m_ComplexDeadtime = cmpldt; }
42  void setPartition( unsigned int partition ) { m_Partition = partition; }
43  void setTopNode(TriggerItemNode* ptrnode ) { m_TopNode = ptrnode; }
44  void setTriggerType(unsigned int tt) { m_TriggerType = (tt & 0xff); }
45  void setCtpId (int id) { m_CtpId = id; }
46  void setDefinition(const std::string& def) { m_Definition = def; }
47 
48  bool isTriggerTypeBitOn(int ibit) const { return ( (m_TriggerType & (1<<ibit) )!=0); }
49 
50  virtual void print(const std::string& indent="", unsigned int detail=1) const override;
51 
52  void writeXML(std::ostream & xmlfile, int indentLevel=0, int indentWidth=2) const;
53  void buildLogic(std::string & logic, std::vector<std::string> & conditionList) const;
54  void setCondition(const std::string& logic,
55  const std::vector<std::string>& conditions,
56  const std::vector<TrigConf::TriggerThreshold*>& thrs);
57 
58  void setMonitor(unsigned short monitor) { m_Monitor = monitor; }
59 
60  inline bool operator<(const TriggerItem& e) const {
61  return ctpId() < e.ctpId();
62  }
63 
64  DiffStruct* compareTo(const TriggerItem* o) const;
65 
66  std::string __str__() const override;
67 
68  private:
69  unsigned int m_ComplexDeadtime;
70  std::string m_Definition;
72  int m_CtpId;
73  unsigned int m_TriggerType; // 8 bit word (4 bit for secondary partitions
74  unsigned int m_Partition; // 8 bit word
75  unsigned short m_Monitor; // 0x1 TBP_LF, 0x2 TAP_LF, 0x4 TAV_LF, 0x8 TBP_LF, 0x10 TAP_LF, 0x20 TAV_LF,
76  friend std::ostream & operator<<(std::ostream &, const TrigConf::TriggerItem &);
77  };
78 
79 }
80 #endif
81 
TrigConf::TriggerItem::m_ComplexDeadtime
unsigned int m_ComplexDeadtime
Definition: TriggerItem.h:69
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrigConf::TriggerItem::setDefinition
void setDefinition(const std::string &def)
Definition: TriggerItem.h:46
TrigConf::TriggerItem::ctpId
int ctpId() const
Definition: TriggerItem.h:34
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
TrigConf::TriggerItem::triggerType
unsigned int triggerType() const
Definition: TriggerItem.h:33
TrigConf::TriggerItem::setMonitor
void setMonitor(unsigned short monitor)
Definition: TriggerItem.h:58
TrigConf::TriggerItem::operator<<
friend std::ostream & operator<<(std::ostream &, const TrigConf::TriggerItem &)
TrigConf::TriggerItem::buildLogic
void buildLogic(std::string &logic, std::vector< std::string > &conditionList) const
Definition: TriggerItem.cxx:109
TrigConf::TriggerItem::topNode
const TriggerItemNode * topNode() const
Definition: TriggerItem.h:36
TrigConf::TriggerItem::complex_deadtime
unsigned int complex_deadtime() const
Definition: TriggerItem.h:31
TrigConf::DiffStruct
Definition: DiffStruct.h:14
TrigConf::TriggerItem::isTriggerTypeBitOn
bool isTriggerTypeBitOn(int ibit) const
Definition: TriggerItem.h:48
detail
Definition: extract_histogram_tag.cxx:14
TrigConf::TriggerItemNode
Definition: TriggerItemNode.h:22
TrigConf::TriggerItem::partition
unsigned int partition() const
Definition: TriggerItem.h:35
TrigConf::TriggerItem::operator<
bool operator<(const TriggerItem &e) const
Definition: TriggerItem.h:60
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigConf::TriggerItem::setComplexDeadtime
void setComplexDeadtime(unsigned int cmpldt)
Definition: TriggerItem.h:41
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
TrigConf::TriggerItem::m_Monitor
unsigned short m_Monitor
Definition: TriggerItem.h:75
TrigConf::TriggerItem::TriggerItem
TriggerItem()
Definition: TriggerItem.cxx:18
TrigConf::TriggerItem::m_TopNode
TriggerItemNode * m_TopNode
Definition: TriggerItem.h:71
TrigConf::TriggerItem::m_TriggerType
unsigned int m_TriggerType
Definition: TriggerItem.h:73
TrigConf::TrigConfData
Definition: TrigConfData.h:13
TrigConf::TriggerItem::setTriggerType
void setTriggerType(unsigned int tt)
Definition: TriggerItem.h:44
TrigConf::TriggerItem::setPartition
void setPartition(unsigned int partition)
Definition: TriggerItem.h:42
TrigConf::TriggerItem::writeXML
void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition: TriggerItem.cxx:60
TrigConf::TriggerItem::setCondition
void setCondition(const std::string &logic, const std::vector< std::string > &conditions, const std::vector< TrigConf::TriggerThreshold * > &thrs)
Definition: TriggerItem.cxx:116
TrigConf::TriggerItem::m_Definition
std::string m_Definition
Definition: TriggerItem.h:70
TrigConf::TriggerItem::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: TriggerItem.cxx:136
TrigConf::TrigConfData::id
unsigned int id() const
Definition: TrigConfData.h:21
TrigConf::TriggerItem::bunchgroupMask
uint16_t bunchgroupMask() const
Definition: TriggerItem.cxx:34
TrigConf::TriggerItem::monitor
unsigned short monitor() const
Definition: TriggerItem.h:37
TrigConf::TriggerItem::~TriggerItem
virtual ~TriggerItem() override
Definition: TriggerItem.cxx:28
TrigConf::TriggerItem::setCtpId
void setCtpId(int id)
Definition: TriggerItem.h:45
TrigConf::TriggerItem::m_Partition
unsigned int m_Partition
Definition: TriggerItem.h:74
TrigConf::TriggerItem::definition
const std::string & definition() const
Definition: TriggerItem.h:32
TrigConf::TriggerItem::m_CtpId
int m_CtpId
Definition: TriggerItem.h:72
TrigConf::TriggerItem::setTopNode
void setTopNode(TriggerItemNode *ptrnode)
Definition: TriggerItem.h:43
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::TriggerItem::__str__
std::string __str__() const override
Definition: TriggerItem.cxx:172
L1DataBaseclass.h
TrigConf::TriggerItem::compareTo
DiffStruct * compareTo(const TriggerItem *o) const
Definition: TriggerItem.cxx:44
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
TrigConf::TriggerItem
Definition: TriggerItem.h:25
TriggerItemNode.h