ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigMonitoringEvent
TrigMonitoringEvent
TrigMonChain.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 TRIGMON_CHAIN_H
6
#define TRIGMON_CHAIN_H
7
14
15
// Framework
16
#include "
AthenaKernel/CLASS_DEF.h
"
17
18
// C/C++
19
#include <stdint.h>
20
21
// Local
22
#include "
TrigMonitoringEvent/TrigConfChain.h
"
23
#include "
TrigMonitoringEvent/TrigMonVar.h
"
24
25
class
TrigMonChain
26
{
27
public
:
28
29
enum
Decision
{
30
kReset
= 0x0,
31
kPassed
= 0x010000,
32
kPassedRaw
= 0x020000,
33
kPassedThrough
= 0x040000,
34
kResurrected
= 0x080000,
35
kPrescaled
= 0x100000,
36
kL1AfterVeto
= 0x200000,
37
kL1BeforePrescale
= 0x400000,
38
kL1AfterPrescale
= 0x800000,
39
kExpressStream
= 0x1000000
40
};
41
42
TrigMonChain
(
unsigned
int
encoded = 0);
43
TrigMonChain
(
unsigned
int
level,
unsigned
int
counter);
44
TrigMonChain
(
const
std::string &level,
unsigned
int
counter);
45
~TrigMonChain
() {}
46
47
void
addDecision
(
Decision
value);
48
void
addTimer
(
float
timer);
49
void
addVar
(
const
TrigMonVar
&var);
50
51
uint16_t
getCounter
()
const
;
52
uint16_t
getLevel
()
const
;
53
uint16_t
getEncodedId
()
const
;
54
uint32_t
getEncoded
()
const
{
return
m_encoded
; }
55
56
float
getTimer
()
const
;
57
58
bool
isPassed
(
Decision
value =
kPassed
)
const
;
59
60
const
std::vector<TrigMonVar>
getVar
()
const
;
61
const
std::vector<uint16_t>&
getVarKey
()
const
{
return
m_var_key
; }
62
const
std::vector<float>&
getVarVal
()
const
{
return
m_var_val
; }
63
64
void
print
(std::ostream &os = std::cout)
const
;
65
66
private
:
67
68
uint32_t
m_encoded
;
// Encoded chain word (see below)
69
std::vector<uint16_t>
m_var_key
;
// Variable key
70
std::vector<float>
m_var_val
;
// Variable value
71
};
72
73
std::string
str
(
const
TrigMonChain
&);
74
75
//
76
// m_encoded stores encoded trigger id and decisions
77
//
78
// m_encoded 16 low bits:
79
// chain level [l] 2 bits (0:3) = 1 (L1), 2 (L2), 3 (EF)
80
// chain counter [c] 14 bits (0:16384)
81
//
82
// m_encoded 16 top bits:
83
// chain decision [d] 9 bits packed with Decision enums
84
// [f] 7 bits are free
85
//
86
87
//
88
// Inlined member and global functions
89
//
90
inline
bool
operator==
(
const
TrigMonChain
&lhs,
const
TrigMonChain
&rhs) {
91
return
lhs.
getEncodedId
() == rhs.
getEncodedId
();
92
}
93
inline
bool
operator <
(
const
TrigMonChain
&lhs,
const
TrigMonChain
&rhs) {
94
return
lhs.
getEncodedId
() < rhs.
getEncodedId
();
95
}
96
97
inline
bool
operator==
(
const
TrigMonChain
&d,
const
TrigConfChain
&c) {
98
return
d.getEncodedId() == c.getEncodedId();
99
}
100
inline
bool
operator==
(
const
TrigConfChain
&c,
const
TrigMonChain
&d) {
101
return
d.getEncodedId() == c.getEncodedId();
102
}
103
104
inline
bool
operator==
(
const
TrigMonChain
&d,
unsigned
int
i) {
105
return
d.getEncodedId() == i;
106
}
107
inline
bool
operator==
(
unsigned
int
i,
const
TrigMonChain
&d) {
108
return
i == d.getEncodedId();
109
}
110
111
CLASS_DEF
(
TrigMonChain
, 261329711 , 1 )
112
113
#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
Decision
xAOD::TrigComposite Decision
Definition
TrigComposite.h:20
TrigConfChain.h
operator==
bool operator==(const TrigMonChain &lhs, const TrigMonChain &rhs)
Definition
TrigMonChain.h:90
operator<
bool operator<(const TrigMonChain &lhs, const TrigMonChain &rhs)
Definition
TrigMonChain.h:93
TrigMonVar.h
TrigConfChain
Definition
TrigConfChain.h:33
TrigMonChain
Summary of chain decisions.
Definition
TrigMonChain.h:26
TrigMonChain::getVar
const std::vector< TrigMonVar > getVar() const
Definition
TrigMonChain.cxx:121
TrigMonChain::addVar
void addVar(const TrigMonVar &var)
Definition
TrigMonChain.cxx:62
TrigMonChain::getVarVal
const std::vector< float > & getVarVal() const
Definition
TrigMonChain.h:62
TrigMonChain::~TrigMonChain
~TrigMonChain()
Definition
TrigMonChain.h:45
TrigMonChain::Decision
Decision
Definition
TrigMonChain.h:29
TrigMonChain::kL1AfterVeto
@ kL1AfterVeto
Definition
TrigMonChain.h:36
TrigMonChain::kPassedThrough
@ kPassedThrough
Definition
TrigMonChain.h:33
TrigMonChain::kReset
@ kReset
Definition
TrigMonChain.h:30
TrigMonChain::kPrescaled
@ kPrescaled
Definition
TrigMonChain.h:35
TrigMonChain::kL1AfterPrescale
@ kL1AfterPrescale
Definition
TrigMonChain.h:38
TrigMonChain::kExpressStream
@ kExpressStream
Definition
TrigMonChain.h:39
TrigMonChain::kL1BeforePrescale
@ kL1BeforePrescale
Definition
TrigMonChain.h:37
TrigMonChain::kResurrected
@ kResurrected
Definition
TrigMonChain.h:34
TrigMonChain::kPassedRaw
@ kPassedRaw
Definition
TrigMonChain.h:32
TrigMonChain::kPassed
@ kPassed
Definition
TrigMonChain.h:31
TrigMonChain::getEncoded
uint32_t getEncoded() const
Definition
TrigMonChain.h:54
TrigMonChain::m_encoded
uint32_t m_encoded
Definition
TrigMonChain.h:68
TrigMonChain::isPassed
bool isPassed(Decision value=kPassed) const
Definition
TrigMonChain.cxx:112
TrigMonChain::m_var_val
std::vector< float > m_var_val
Definition
TrigMonChain.h:70
TrigMonChain::getTimer
float getTimer() const
Definition
TrigMonChain.cxx:93
TrigMonChain::TrigMonChain
TrigMonChain(unsigned int encoded=0)
Definition
TrigMonChain.cxx:18
TrigMonChain::getLevel
uint16_t getLevel() const
Definition
TrigMonChain.cxx:42
TrigMonChain::getCounter
uint16_t getCounter() const
Definition
TrigMonChain.cxx:36
TrigMonChain::print
void print(std::ostream &os=std::cout) const
Definition
TrigMonChain.cxx:143
TrigMonChain::addDecision
void addDecision(Decision value)
Definition
TrigMonChain.cxx:48
TrigMonChain::getVarKey
const std::vector< uint16_t > & getVarKey() const
Definition
TrigMonChain.h:61
TrigMonChain::addTimer
void addTimer(float timer)
Definition
TrigMonChain.cxx:83
TrigMonChain::getEncodedId
uint16_t getEncodedId() const
Definition
TrigMonChain.cxx:74
TrigMonChain::m_var_key
std::vector< uint16_t > m_var_key
Definition
TrigMonChain.h:69
TrigMonVar
Definition
TrigMonVar.h:59
str
Definition
BTagTrackIpAccessor.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0