ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigMonitoringEvent
TrigMonitoringEvent
TrigConfVar.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_VAR_H
6
#define TRIGCONF_VAR_H
7
8
/*
9
@author Rustem Ospanov
10
@date July 2009
11
12
@brief This class provides map between id of TrigMonVar
13
and string. It stores list of id, string pairs which
14
can be saved in TrigMonConfig at end of a job.
15
*/
16
17
// Framework
18
#include "
AthenaKernel/CLASS_DEF.h
"
19
#include "
CxxUtils/checker_macros.h
"
20
21
// C/C++
22
#include <iostream>
23
#include <string>
24
#include <vector>
25
26
// Local
27
#include "
TrigMonitoringEvent/TrigMonVar.h
"
28
29
class
TrigConfVar
{
30
public
:
31
32
TrigConfVar
();
33
TrigConfVar
(
const
std::string &
name
, uint32_t
id
);
34
~TrigConfVar
() {}
35
36
const
std::string&
name
()
const
{
return
m_name
; }
37
const
std::string&
getName
()
const
{
return
m_name
; }
38
39
uint32_t
id
()
const
{
return
m_id
; }
40
uint32_t
getId
()
const
{
return
m_id
; }
41
42
void
print
(std::ostream &os)
const
;
43
44
private
:
45
46
uint32_t
m_id
;
// Variable id
47
std::string
m_name
;
// Variable name
48
};
49
50
std::string
str
(
const
TrigConfVar
&);
51
52
//
53
// Helper functions: these use static TrigConfVar vector
54
//
55
namespace
Trig
56
{
57
uint16_t ReserveVarId
ATLAS_NOT_THREAD_SAFE
(
const
std::string &name);
58
uint16_t ReserveVarId
ATLAS_NOT_THREAD_SAFE
(
const
std::string &name, uint16_t
id
);
59
60
bool
FindVarId
ATLAS_NOT_THREAD_SAFE
(
const
std::string &name, uint16_t &
id
);
61
bool
FindVarName
ATLAS_NOT_THREAD_SAFE
(
const
uint16_t
id
, std::string &name);
62
63
std::vector<TrigConfVar> GetCurrentTrigConfVarVector
ATLAS_NOT_THREAD_SAFE
();
64
}
65
66
//
67
// Inlined comparison operators
68
//
69
inline
bool
operator==
(
const
TrigConfVar
&lhs,
const
TrigConfVar
&rhs) {
70
return
lhs.
getId
() == rhs.
getId
() || lhs.
getName
() == rhs.
getName
();
71
}
72
inline
bool
operator==
(
const
TrigConfVar
&key,
const
std::string &
str
) {
73
return
key.getName() ==
str
;
74
}
75
inline
bool
operator==
(
const
std::string &
str
,
const
TrigConfVar
&key) {
76
return
str
== key.getName();
77
}
78
inline
bool
operator==
(
const
TrigConfVar
&key,
const
unsigned
int
id
) {
79
return
key.getId() == id;
80
}
81
inline
bool
operator==
(
const
unsigned
int
id
,
const
TrigConfVar
&key) {
82
return
id
== key.getId();
83
}
84
85
inline
bool
operator==
(
const
TrigConfVar
&key,
const
TrigMonVar
&var) {
86
return
key.getId() == var.getId();
87
}
88
inline
bool
operator==
(
const
TrigMonVar
&var,
const
TrigConfVar
&key) {
89
return
key.getId() == var.getId();
90
}
91
92
CLASS_DEF
(
TrigConfVar
, 168672416 , 1 )
93
94
#endif
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
operator==
bool operator==(const TrigConfVar &lhs, const TrigConfVar &rhs)
Definition
TrigConfVar.h:69
TrigMonVar.h
checker_macros.h
Define macros for attributes used to control the static checker.
TrigConfVar
Definition
TrigConfVar.h:29
TrigConfVar::TrigConfVar
TrigConfVar()
Definition
TrigConfVar.cxx:18
TrigConfVar::getId
uint32_t getId() const
Definition
TrigConfVar.h:40
TrigConfVar::getName
const std::string & getName() const
Definition
TrigConfVar.h:37
TrigConfVar::m_id
uint32_t m_id
Definition
TrigConfVar.h:46
TrigConfVar::~TrigConfVar
~TrigConfVar()
Definition
TrigConfVar.h:34
TrigConfVar::print
void print(std::ostream &os) const
Definition
TrigConfVar.cxx:32
TrigConfVar::id
uint32_t id() const
Definition
TrigConfVar.h:39
TrigConfVar::m_name
std::string m_name
Definition
TrigConfVar.h:47
TrigConfVar::name
const std::string & name() const
Definition
TrigConfVar.h:36
TrigMonVar
Definition
TrigMonVar.h:59
Trig
The common trigger namespace for trigger analysis tools.
Definition
LArCellMonAlg.h:33
Trig::ATLAS_NOT_THREAD_SAFE
std::vector< TrigConfVar > GetCurrentTrigConfVarVector ATLAS_NOT_THREAD_SAFE()
str
Definition
BTagTrackIpAccessor.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0