ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConfSeq.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 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// Framework
18
19// C/C++
20#include <iostream>
21#include <stdint.h>
22#include <string>
23#include <vector>
24
25// Local
27
29{
30 public:
31
33 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 = std::cout) const;
64
65 private:
66
67 std::string m_output_te_name; // Name of output TE
68 uint16_t m_output_te_index; // Index of output TE (in current configuration)
69 uint32_t m_output_te_id; // Id of output TE
70 uint32_t m_topo_te; // Id of topo start TE
71 std::vector<TrigConfAlg> m_alg; // List of children algorithms
72 std::vector<uint32_t> m_input_te; // Id list of input TEs
73};
74
75std::string str(const TrigConfSeq &);
76
77//
78// Inline global operators
79//
80inline bool operator==(const TrigConfSeq &lhs, const TrigConfSeq &rhs) {
81 return lhs.getName() == rhs.getName();
82}
83inline bool operator!=(const TrigConfSeq &lhs, const TrigConfSeq &rhs) {
84 return !(lhs == rhs);
85}
86inline bool operator <(const TrigConfSeq &lhs, const TrigConfSeq &rhs) {
87 return lhs.getName() < rhs.getName();
88}
89
90//
91// Compare TrigConfSeq to other types
92//
93inline bool operator==(const TrigConfSeq &s, const std::string &n) { return s.getName() == n; }
94inline bool operator==(const std::string &n, const TrigConfSeq &s) { return n == s.getName(); }
95
96inline bool operator <(const TrigConfSeq &s, const std::string &n) { return s.getName() < n; }
97inline bool operator <(const std::string &n, const TrigConfSeq &s) { return n < s.getName(); }
98
99inline bool operator==(const TrigConfSeq &s, unsigned int i) { return s.getId() == i; }
100inline bool operator==(unsigned int i, const TrigConfSeq &s) { return i == s.getId(); }
101
102inline bool operator <(const TrigConfSeq &s, unsigned int i) { return s.getId() < i; }
103inline bool operator <(unsigned int i, const TrigConfSeq &s) { return i < s.getId(); }
104
105CLASS_DEF( TrigConfSeq , 46893630 , 1 )
106
107#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:86
bool operator==(const TrigConfSeq &lhs, const TrigConfSeq &rhs)
Definition TrigConfSeq.h:80
bool operator!=(const TrigConfSeq &lhs, const TrigConfSeq &rhs)
Definition TrigConfSeq.h:83
std::vector< TrigConfAlg >::const_iterator findType(const std::string &atype) const
std::vector< TrigConfAlg > m_alg
Definition TrigConfSeq.h:71
unsigned int getNAlg() const
Definition TrigConfSeq.h:52
std::vector< uint32_t > m_input_te
Definition TrigConfSeq.h:72
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
uint32_t m_output_te_id
Definition TrigConfSeq.h:69
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:70
void print(std::ostream &os=std::cout) const
uint16_t m_output_te_index
Definition TrigConfSeq.h:68
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:67
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