ATLAS Offline Software
TrigMonVar.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_VAR_H
6 #define TRIGMON_VAR_H
7 
15 // Framework
16 #include "AthenaKernel/CLASS_DEF.h"
17 
18 // C/C++
19 #include <stdint.h>
20 #include <iostream>
21 
22 namespace Trig
23 {
24  // Dictionary of keys
26  kRoIEta = 0,
27  kRoIPhi = 1,
30  kEBWeight = 45,
34  kSMK = 66,
35  kL1PSK = 67,
36  kHLTPSK = 68,
38  kTimeExec = 101,
39  kTimeProc = 102,
40  kTimeRes = 103,
41  kTimeMon = 104,
42  // 200 - 299 reserved but not used in TrigNtVarsTool
43  kRoIET = 300, // Main transverse energy/pt var
44  kRoIIsTau = 301,
46  kRoIETLarge = 304,
53  kEventNumber = 9999
54  // 10,000 - 11,000 reserved for LB
55  };
56 }
57 
59 {
60  public:
61 
62  TrigMonVar();
63  TrigMonVar(unsigned int key, float value);
65 
66  uint16_t getId() const { return m_key; }
67  uint16_t getKey() const { return m_key; }
68  uint16_t key() const { return m_key; }
69 
70  float data() const { return m_data; }
71  float getData() const { return m_data; }
72 
73  void print(std::ostream &os) const;
74 
75  private:
76 
77  uint16_t m_key; // variable key
78  float m_data; // variable value
79 };
80 
81 //
82 // Inlined comparison operators
83 //
84 
85 inline bool operator==(const TrigMonVar &lhs, const TrigMonVar &rhs) {
86  return lhs.getKey() == rhs.getKey();
87 }
88 inline bool operator <(const TrigMonVar &lhs, const TrigMonVar &rhs) {
89  return lhs.getKey() < rhs.getKey();
90 }
91 
92 inline bool operator==(const TrigMonVar &var, unsigned int key) {
93  return var.getKey() == key;
94 }
95 inline bool operator==(unsigned int key, const TrigMonVar &var) {
96  return var.getKey() == key;
97 }
98 
99 inline bool operator<(const TrigMonVar &var, unsigned int key) {
100  return var.getKey() < key;
101 }
102 inline bool operator<(unsigned int key, const TrigMonVar &var) {
103  return key < var.getKey();
104 }
105 
106 CLASS_DEF( TrigMonVar , 126820305 , 1 )
107 
108 #endif
operator<
bool operator<(const TrigMonVar &lhs, const TrigMonVar &rhs)
Definition: TrigMonVar.h:88
Trig::kRoIIsTau
@ kRoIIsTau
Definition: TrigMonVar.h:44
Trig::kHLTPSK
@ kHLTPSK
Definition: TrigMonVar.h:36
Trig::kIsCostEvent
@ kIsCostEvent
Definition: TrigMonVar.h:32
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
Trig::kEventNumber
@ kEventNumber
Definition: TrigMonVar.h:53
Trig::kTimeProc
@ kTimeProc
Definition: TrigMonVar.h:39
TrigMonVar::~TrigMonVar
~TrigMonVar()
Definition: TrigMonVar.h:64
TrigMonVar::key
uint16_t key() const
Definition: TrigMonVar.h:68
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::kEBBunchGroup
@ kEBBunchGroup
Definition: TrigMonVar.h:31
TrigMonVar::m_data
float m_data
Definition: TrigMonVar.h:78
Trig::kRoIETLarge
@ kRoIETLarge
Definition: TrigMonVar.h:46
Trig::kRoIMuonCharge
@ kRoIMuonCharge
Definition: TrigMonVar.h:47
athena.value
value
Definition: athena.py:124
TrigMonVar::getId
uint16_t getId() const
Definition: TrigMonVar.h:66
TrigMonVar::m_key
uint16_t m_key
Definition: TrigMonVar.h:77
Trig::kRoIEnergyOverflowT
@ kRoIEnergyOverflowT
Definition: TrigMonVar.h:52
TrigMonVar::getData
float getData() const
Definition: TrigMonVar.h:71
Trig::kRoIEta
@ kRoIEta
Definition: TrigMonVar.h:26
Trig::kTimeExec
@ kTimeExec
Definition: TrigMonVar.h:38
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
Trig::kSMK
@ kSMK
Definition: TrigMonVar.h:34
Trig::kEBIsUnbiasedFlag
@ kEBIsUnbiasedFlag
Definition: TrigMonVar.h:33
TrigMonVar
Definition: TrigMonVar.h:59
Trig::kEventBufferSize
@ kEventBufferSize
Definition: TrigMonVar.h:28
TrigMonVar::getKey
uint16_t getKey() const
Definition: TrigMonVar.h:67
Trig::kTimeCostMonitoring
@ kTimeCostMonitoring
Definition: TrigMonVar.h:37
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
Trig::TrigCostMagicNumber_t
TrigCostMagicNumber_t
Definition: TrigMonVar.h:25
Trig::kRoIEnergyOverflowY
@ kRoIEnergyOverflowY
Definition: TrigMonVar.h:51
Trig::kRoIEnergyOverflowX
@ kRoIEnergyOverflowX
Definition: TrigMonVar.h:50
Trig::kEventLumiBlockLength
@ kEventLumiBlockLength
Definition: TrigMonVar.h:29
Trig::kRoIPhi
@ kRoIPhi
Definition: TrigMonVar.h:27
Trig::kRoIET
@ kRoIET
Definition: TrigMonVar.h:43
Trig::kL1PSK
@ kL1PSK
Definition: TrigMonVar.h:35
TrigMonVar::TrigMonVar
TrigMonVar()
Definition: TrigMonVar.cxx:9
Trig::kRoIEnergyVectorY
@ kRoIEnergyVectorY
Definition: TrigMonVar.h:49
Trig::kEBWeight
@ kEBWeight
Definition: TrigMonVar.h:30
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:64
Trig::kTimeRes
@ kTimeRes
Definition: TrigMonVar.h:40
TrigMonVar::print
void print(std::ostream &os) const
Definition: TrigMonVar.cxx:27
Trig::kRoIIsolationBits
@ kRoIIsolationBits
Definition: TrigMonVar.h:45
operator==
bool operator==(const TrigMonVar &lhs, const TrigMonVar &rhs)
Definition: TrigMonVar.h:85
CLASS_DEF.h
macros to associate a CLID to a type
TrigMonVar::data
float data() const
Definition: TrigMonVar.h:70
Trig::kRoIEnergyVectorX
@ kRoIEnergyVectorX
Definition: TrigMonVar.h:48
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Trig::kTimeMon
@ kTimeMon
Definition: TrigMonVar.h:41