ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigMonitoringEvent
src
TrigConfAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
TrigMonitoringEvent/TrigConfAlg.h
"
5
#include "
AthenaKernel/errorcheck.h
"
6
// C/C++
7
#include <algorithm>
8
#include <sstream>
9
#include <iostream>
10
11
12
//--------------------------------------------------------------------------------------
13
TrigConfAlg::TrigConfAlg
(
const
uint32_t
index
,
14
const
uint32_t position,
15
const
std::string& name,
16
const
std::string&
type
,
17
const
uint32_t name_id,
18
const
uint32_t type_id)
19
:
m_index
(
index
),
20
m_position
(position),
21
m_name_id
(name_id),
22
m_type_id
(type_id),
23
m_name
(name),
24
m_type
(
type
)
25
{
26
if
(position >= 128) {
27
REPORT_MESSAGE_WITH_CONTEXT
(MSG::ERROR,
"TrigConfAlg"
) <<
"Position is too large"
;
28
}
29
if
(
index
>= 65535) {
30
REPORT_MESSAGE_WITH_CONTEXT
(MSG::ERROR,
"TrigConfAlg"
) <<
"Index is too large"
;
31
}
32
}
33
34
//--------------------------------------------------------------------------------------
35
void
TrigConfAlg::clearStrings
()
36
{
37
//
38
// Clear all string variables
39
//
40
m_name
.clear();
41
m_type
.clear();
42
}
43
44
//--------------------------------------------------------------------------------------
45
void
TrigConfAlg::print
(std::ostream &os)
const
46
{
47
os <<
str
(*
this
) << std::endl;
48
}
49
50
void
TrigConfAlg::print
()
const
51
{
52
std::cout <<
str
(*
this
) << std::endl;
53
}
54
55
56
//--------------------------------------------------------------------------------------
57
std::string
str
(
const
TrigConfAlg
&o)
58
{
59
std::stringstream s;
60
s <<
"TrigConfAlg: "
<< o.
getPosition
() <<
" "
61
<< o.
getName
() <<
"/"
<< o.
getType
() <<
" = "
62
<< o.
getNameId
() <<
"/"
<< o.
getTypeId
();
63
64
return
s.str();
65
}
errorcheck.h
Helpers for checking error return status codes and reporting errors.
REPORT_MESSAGE_WITH_CONTEXT
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:345
TrigConfAlg.h
TrigConfAlg
Definition
TrigConfAlg.h:25
TrigConfAlg::m_position
uint8_t m_position
Definition
TrigConfAlg.h:53
TrigConfAlg::getType
const std::string & getType() const
Definition
TrigConfAlg.h:40
TrigConfAlg::m_index
uint16_t m_index
Definition
TrigConfAlg.h:52
TrigConfAlg::m_type
std::string m_type
Definition
TrigConfAlg.h:58
TrigConfAlg::TrigConfAlg
TrigConfAlg()=default
TrigConfAlg::m_name
std::string m_name
Definition
TrigConfAlg.h:57
TrigConfAlg::getPosition
uint8_t getPosition() const
Definition
TrigConfAlg.h:43
TrigConfAlg::m_type_id
uint32_t m_type_id
Definition
TrigConfAlg.h:55
TrigConfAlg::print
void print() const
Definition
TrigConfAlg.cxx:50
TrigConfAlg::m_name_id
uint32_t m_name_id
Definition
TrigConfAlg.h:54
TrigConfAlg::getNameId
uint32_t getNameId() const
Definition
TrigConfAlg.h:44
TrigConfAlg::clearStrings
void clearStrings()
Definition
TrigConfAlg.cxx:35
TrigConfAlg::getName
const std::string & getName() const
Definition
TrigConfAlg.h:39
TrigConfAlg::getTypeId
uint32_t getTypeId() const
Definition
TrigConfAlg.h:45
index
Definition
index.py:1
str
Definition
BTagTrackIpAccessor.cxx:11
type
Generated on
for ATLAS Offline Software by
1.17.0