ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsInterop
ActsInterop
Tracking/Acts/ActsInterop/ActsInterop/Logger.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#pragma once
6
7
#include "Acts/Utilities/Logger.hpp"
8
#include "GaudiKernel/MsgStream.h"
9
#include "GaudiKernel/CommonMessaging.h"
10
#include "GaudiKernel/INamedInterface.h"
11
#include "
AthenaBaseComps/AthMessaging.h
"
12
#include "
AthenaKernel/getMessageSvc.h
"
13
#include <memory>
14
15
#include <optional>
16
17
class
ActsAthenaPrintPolicy
final :
public
Acts::Logging::OutputPrintPolicy
18
{
19
public
:
20
21
ActsAthenaPrintPolicy
(std::shared_ptr<MsgStream>
msg
,
const
std::string&
name
);
22
23
void
24
flush
(
const
Acts::Logging::Level& lvl,
const
std::string& input)
override
;
25
26
virtual
27
const
std::string&
28
name
()
const override
;
29
30
virtual
31
std::unique_ptr<Acts::Logging::OutputPrintPolicy>
32
clone
(
const
std::string&
name
)
const override
;
33
34
private
:
35
IMessageSvc*
m_svc
{};
36
std::shared_ptr<MsgStream>
m_msg
{};
37
std::string
m_name
{};
38
};
39
40
class
ActsAthenaFilterPolicy
final :
public
Acts::Logging::OutputFilterPolicy {
41
public
:
42
ActsAthenaFilterPolicy
(std::shared_ptr<MsgStream>
msg
) :
m_msg
(
std
::move(
msg
)) {}
43
44
bool
doPrint
(
const
Acts::Logging::Level& lvl)
const override
;
45
46
virtual
47
Acts::Logging::Level
48
level
()
const override
;
49
50
virtual
51
std::unique_ptr<Acts::Logging::OutputFilterPolicy>
52
clone
(Acts::Logging::Level
level
)
const override
;
53
54
private
:
55
std::shared_ptr<MsgStream>
m_msg
;
56
};
57
58
59
std::unique_ptr<const Acts::Logger>
60
makeActsAthenaLogger
(IMessageSvc *svc,
const
std::string& name,
61
int
level, std::optional<std::string> parent_name);
62
63
std::unique_ptr<const Acts::Logger>
64
makeActsAthenaLogger
(
const
CommonMessagingBase* parent,
const
std::string& name);
65
66
std::unique_ptr<const Acts::Logger>
67
makeActsAthenaLogger
(
const
AthMessaging
* parent,
const
std::string& name);
68
69
std::unique_ptr<const Acts::Logger>
70
makeActsAthenaLogger
(
const
CommonMessagingBase* parent,
const
std::string& name,
71
std::optional<std::string> parent_name);
72
73
// problem: string literal does not play well with std::optional
74
std::unique_ptr<const Acts::Logger>
75
makeActsAthenaLogger
(
const
CommonMessagingBase* parent,
const
std::string& name,
76
const
std::string& parent_name);
77
78
79
AthMessaging.h
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition
Logger.cxx:64
ActsAthenaFilterPolicy::m_msg
std::shared_ptr< MsgStream > m_msg
Definition
Tracking/Acts/ActsInterop/ActsInterop/Logger.h:55
ActsAthenaFilterPolicy::level
virtual Acts::Logging::Level level() const override
Definition
Logger.cxx:50
ActsAthenaFilterPolicy::ActsAthenaFilterPolicy
ActsAthenaFilterPolicy(std::shared_ptr< MsgStream > msg)
Definition
Tracking/Acts/ActsInterop/ActsInterop/Logger.h:42
ActsAthenaFilterPolicy::clone
virtual std::unique_ptr< Acts::Logging::OutputFilterPolicy > clone(Acts::Logging::Level level) const override
Definition
Logger.cxx:56
ActsAthenaFilterPolicy::doPrint
bool doPrint(const Acts::Logging::Level &lvl) const override
Definition
Logger.cxx:43
ActsAthenaPrintPolicy::name
virtual const std::string & name() const override
Definition
Logger.cxx:33
ActsAthenaPrintPolicy::m_svc
IMessageSvc * m_svc
Definition
Tracking/Acts/ActsInterop/ActsInterop/Logger.h:35
ActsAthenaPrintPolicy::m_name
std::string m_name
Definition
Tracking/Acts/ActsInterop/ActsInterop/Logger.h:37
ActsAthenaPrintPolicy::clone
virtual std::unique_ptr< Acts::Logging::OutputPrintPolicy > clone(const std::string &name) const override
Definition
Logger.cxx:39
ActsAthenaPrintPolicy::flush
void flush(const Acts::Logging::Level &lvl, const std::string &input) override
Definition
Logger.cxx:26
ActsAthenaPrintPolicy::ActsAthenaPrintPolicy
ActsAthenaPrintPolicy(std::shared_ptr< MsgStream > msg, const std::string &name)
Definition
Logger.cxx:21
ActsAthenaPrintPolicy::m_msg
std::shared_ptr< MsgStream > m_msg
Definition
Tracking/Acts/ActsInterop/ActsInterop/Logger.h:36
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition
AthMessaging.h:55
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
std
STL namespace.
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0