ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConfSeq.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGCONF_SEQ_H
6#define TRIGCONF_SEQ_H
7
8/*
9 @author Rustem Ospanov
10 @date July 2009
11
12 @brief This class provides map between monitoring
13 object TrigMonSeq and sequence configuration.
14*/
15
16// Local
18// Framework
20
21// C/C++
22#include <iosfwd>
23#include <stdint.h>
24#include <string>
25#include <vector>
26
27
28
30{
31 public:
32
33 TrigConfSeq() = default;
34 TrigConfSeq(unsigned int id, unsigned int index, const std::string &name);
35
36 void clearStrings();
37
38 void addAlg (const TrigConfAlg &alg) { m_alg.push_back(alg); }
39 void addInputTE(uint32_t te_id) { m_input_te.push_back(te_id); }
40 void setTopoTE (uint32_t te_id) { m_topo_te = te_id; }
41
42 uint16_t getIndex() const { return m_output_te_index; }
43 uint32_t getId() const { return m_output_te_id; }
44 const std::string& getName() const { return m_output_te_name; }
45 uint32_t getTopoTE() const { return m_topo_te; }
46
47 const std::vector<uint32_t>& getInputTEs() const { return m_input_te; }
48
49 const TrigConfAlg & getAlg(unsigned int pos) const;
50 const std::vector<TrigConfAlg>& getAlg() const { return m_alg; }
51
52 unsigned int getNAlg() const { return m_alg.size(); }
53
54 std::vector<TrigConfAlg>::const_iterator algBeg() const { return m_alg.begin(); }
55 std::vector<TrigConfAlg>::const_iterator algEnd() const { return m_alg.end(); }
56
57 std::vector<TrigConfAlg>::const_iterator findName(const std::string &aname) const;
58 std::vector<TrigConfAlg>::const_iterator findType(const std::string &atype) const;
59
60 bool matchAlgName(const std::string &aname) const;
61 bool matchAlgType(const std::string &atype) const;
62
63 void print(std::ostream &os) const;
64 void print() const;
65
66 private:
67
68 std::string m_output_te_name; // Name of output TE
69 uint16_t m_output_te_index{}; // Index of output TE (in current configuration)
70 uint32_t m_output_te_id{}; // Id of output TE
71 uint32_t m_topo_te{}; // Id of topo start TE
72 std::vector<TrigConfAlg> m_alg; // List of children algorithms
73 std::vector<uint32_t> m_input_te; // Id list of input TEs
74};
75
76std::string str(const TrigConfSeq &);
77
78//
79// Inline global operators
80//
81inline bool operator==(const TrigConfSeq &lhs, const TrigConfSeq &rhs) {
82 return lhs.getName() == rhs.getName();
83}
84inline bool operator!=(const TrigConfSeq &lhs, const TrigConfSeq &rhs) {
85 return !(lhs == rhs);
86}
87inline bool operator <(const TrigConfSeq &lhs, const TrigConfSeq &rhs) {
88 return lhs.getName() < rhs.getName();
89}
90
91//
92// Compare TrigConfSeq to other types
93//
94inline bool operator==(const TrigConfSeq &s, const std::string &n) { return s.getName() == n; }
95inline bool operator==(const std::string &n, const TrigConfSeq &s) { return n == s.getName(); }
96
97inline bool operator <(const TrigConfSeq &s, const std::string &n) { return s.getName() < n; }
98inline bool operator <(const std::string &n, const TrigConfSeq &s) { return n < s.getName(); }
99
100inline bool operator==(const TrigConfSeq &s, unsigned int i) { return s.getId() == i; }
101inline bool operator==(unsigned int i, const TrigConfSeq &s) { return i == s.getId(); }
102
103inline bool operator <(const TrigConfSeq &s, unsigned int i) { return s.getId() < i; }
104inline bool operator <(unsigned int i, const TrigConfSeq &s) { return i < s.getId(); }
105
106CLASS_DEF( TrigConfSeq , 46893630 , 1 )
107
108#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
bool operator<(const TrigConfSeq &lhs, const TrigConfSeq &rhs)
Definition TrigConfSeq.h:87
bool operator==(const TrigConfSeq &lhs, const TrigConfSeq &rhs)
Definition TrigConfSeq.h:81
bool operator!=(const TrigConfSeq &lhs, const TrigConfSeq &rhs)
Definition TrigConfSeq.h:84
void print() const
std::vector< TrigConfAlg >::const_iterator findType(const std::string &atype) const
std::vector< TrigConfAlg > m_alg
Definition TrigConfSeq.h:72
unsigned int getNAlg() const
Definition TrigConfSeq.h:52
std::vector< uint32_t > m_input_te
Definition TrigConfSeq.h:73
std::vector< TrigConfAlg >::const_iterator algBeg() const
Definition TrigConfSeq.h:54
uint32_t getTopoTE() const
Definition TrigConfSeq.h:45
void clearStrings()
void addInputTE(uint32_t te_id)
Definition TrigConfSeq.h:39
bool matchAlgType(const std::string &atype) const
bool matchAlgName(const std::string &aname) const
const std::vector< uint32_t > & getInputTEs() const
Definition TrigConfSeq.h:47
uint16_t getIndex() const
Definition TrigConfSeq.h:42
TrigConfSeq()=default
uint32_t m_output_te_id
Definition TrigConfSeq.h:70
std::vector< TrigConfAlg >::const_iterator findName(const std::string &aname) const
const std::string & getName() const
Definition TrigConfSeq.h:44
uint32_t m_topo_te
Definition TrigConfSeq.h:71
uint16_t m_output_te_index
Definition TrigConfSeq.h:69
void setTopoTE(uint32_t te_id)
Definition TrigConfSeq.h:40
uint32_t getId() const
Definition TrigConfSeq.h:43
void addAlg(const TrigConfAlg &alg)
Definition TrigConfSeq.h:38
std::string m_output_te_name
Definition TrigConfSeq.h:68
const std::vector< TrigConfAlg > & getAlg() const
Definition TrigConfSeq.h:50
std::vector< TrigConfAlg >::const_iterator algEnd() const
Definition TrigConfSeq.h:55
Definition index.py:1