ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMonConfig.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGMON_CONFIG_H
6#define TRIGMON_CONFIG_H
7
15
16// Framework
19
20// C/C++
21#include <vector>
22
23// Local
27
29{
30 public:
31
34
35 static std::string getType() { return "TrigMonConfig"; }
36
37 template<class T> typename std::vector<T>::const_iterator begin() const;
38 template<class T> typename std::vector<T>::const_iterator end() const;
39
40 template<class T> bool add(const T &obj);
41
42 template<class T> std::vector<T>& getVec();
43
44 template<class T> const std::vector<T>& getVec() const;
45
46 template<class T> unsigned int size() const;
47
48 template<class T> const T& at(unsigned int i) const;
49
50 template<class T> typename std::vector<TrigConfChain>::const_iterator findChain(const T& key) const;
51 template<class T> typename std::vector<TrigConfSeq>::const_iterator findSeq(const T& key) const;
52
53 template<class T> typename std::vector<TrigConfChain>::iterator findChainIter(const T& key);
54 template<class T> typename std::vector<TrigConfSeq>::iterator findSeqIter(const T& key);
55
56 // Additional overloads callable from python.
57 const std::vector<TrigConfChain>& getChainVec() const { return m_chain; }
58 const std::vector<TrigConfSeq>& getSeqVec() const { return m_seq; }
59
60 void clear();
61 void clearStrings();
62 void processConfig ATLAS_NOT_THREAD_SAFE ();
63
64 void setEventID(uint32_t event, uint32_t lumi, uint32_t run,
65 uint32_t sec, uint32_t nsec);
66
67 void setTriggerKeys(uint32_t master_key, uint32_t lv1_ps_key, uint32_t hlt_ps_key);
68
69 void addValue(const std::string &key, const std::string &val);
70
71 std::vector<std::string>& getVarName() { return m_var_name; }
72 std::vector<uint32_t>& getVarId() { return m_var_id; }
73 std::vector<std::string>& getPairKey() { return m_pair_key; }
74 std::vector<std::string>& getPairVal() { return m_pair_val; }
75
76 uint32_t getEvent() const { return m_event; }
77 uint32_t getLumi() const { return m_lumi; }
78 uint32_t getRun() const { return m_run; }
79 uint32_t getSec() const { return m_sec; }
80 uint32_t getNanoSec() const { return m_nsec; }
81
82 uint32_t getMasterKey() const { return m_master_key; }
83 uint32_t getHLTPrescaleKey() const { return m_hlt_ps_key; }
84 uint32_t getLV1PrescaleKey() const { return m_lv1_ps_key; }
85
86 bool keyExists(const std::string &key) const;
87 bool readValue(const std::string &key, std::string &val) const;
88
89 uint32_t getId (const std::string &name, const std::string &key) const;
90 uint16_t getEncodedId(const std::string &name, const std::string &key) const;
91 const std::string getName (uint32_t id, const std::string &key) const;
92
93 const std::vector<TrigConfVar> getConfVar() const;
94
95 const std::vector<std::string>& getVarName() const { return m_var_name; }
96 const std::vector<uint32_t>& getVarId() const { return m_var_id; }
97
98 const std::vector<std::string>& getPairKey() const { return m_pair_key; }
99 const std::vector<std::string>& getPairVal() const { return m_pair_val; }
100
101 private:
102
103 // These variables are filled from EventID object
104 uint32_t m_event; // Event number
105 uint32_t m_lumi; // Lumi block
106 uint32_t m_run; // Run number
107 uint32_t m_sec; // Event second
108 uint32_t m_nsec; // Event ns
109
110 // Trigger configuration keys
111 uint32_t m_master_key; // Configuration key (SMK)
112 uint32_t m_hlt_ps_key; // HLT prescale key
113 uint32_t m_lv1_ps_key; // L1 prescale key
114
115 std::vector<TrigConfChain> m_chain; // Chain configuration
116 std::vector<TrigConfSeq> m_seq; // Sequence configuration
117
118 std::vector<std::string> m_var_name; // Variable configuration: (name, id) pairs
119 std::vector<uint32_t> m_var_id; // Variable configuration: (name, id) pairs
120
121 std::vector<std::string> m_pair_key; // Key for string pairs
122 std::vector<std::string> m_pair_val; // Value for string pairs
123};
124
125// Include template code: specialization of member templates
127
128CLASS_DEF( TrigMonConfig , 253562967 , 1 )
129
130#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
Define macros for attributes used to control the static checker.
This class holds encoded ids for monitoring objects and helps to map these objects to trigger configu...
uint32_t getSec() const
std::vector< std::string > m_pair_key
const std::vector< TrigConfChain > & getChainVec() const
uint32_t getRun() const
bool add(const T &obj)
std::vector< T >::const_iterator end() const
uint32_t m_hlt_ps_key
std::vector< TrigConfChain > m_chain
std::vector< TrigConfSeq > m_seq
unsigned int size() const
std::vector< TrigConfChain >::const_iterator findChain(const T &key) const
static std::string getType()
bool keyExists(const std::string &key) const
uint32_t m_lv1_ps_key
std::vector< uint32_t > & getVarId()
std::vector< T > & getVec()
std::vector< uint32_t > m_var_id
std::vector< std::string > & getPairKey()
const std::vector< std::string > & getPairVal() const
std::vector< std::string > m_var_name
bool readValue(const std::string &key, std::string &val) const
std::vector< std::string > & getPairVal()
uint32_t getHLTPrescaleKey() const
uint32_t getNanoSec() const
std::vector< std::string > & getVarName()
void processConfig ATLAS_NOT_THREAD_SAFE()
const std::vector< TrigConfSeq > & getSeqVec() const
const std::vector< uint32_t > & getVarId() const
std::vector< TrigConfSeq >::iterator findSeqIter(const T &key)
const std::vector< T > & getVec() const
uint32_t getMasterKey() const
void addValue(const std::string &key, const std::string &val)
uint32_t m_master_key
void setEventID(uint32_t event, uint32_t lumi, uint32_t run, uint32_t sec, uint32_t nsec)
std::vector< std::string > m_pair_val
uint32_t getLV1PrescaleKey() const
const std::string getName(uint32_t id, const std::string &key) const
uint32_t getLumi() const
std::vector< TrigConfSeq >::const_iterator findSeq(const T &key) const
std::vector< T >::const_iterator begin() const
void setTriggerKeys(uint32_t master_key, uint32_t lv1_ps_key, uint32_t hlt_ps_key)
const T & at(unsigned int i) const
uint32_t getId(const std::string &name, const std::string &key) const
const std::vector< TrigConfVar > getConfVar() const
std::vector< TrigConfChain >::iterator findChainIter(const T &key)
uint32_t getEvent() const
const std::vector< std::string > & getPairKey() const
uint16_t getEncodedId(const std::string &name, const std::string &key) const
const std::vector< std::string > & getVarName() const
Definition run.py:1