ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaServices
src
AthTPCnvSvc.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// AthTPCnvSvc.h
8
// Header file for class AthTPCnvSvc
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef ATHENASERVICES_ATHTPCNVSVC_H
12
#define ATHENASERVICES_ATHTPCNVSVC_H 1
13
14
// STL includes
15
#include <string>
16
#include <vector>
17
#include <mutex>
18
19
// FrameWork includes
20
#include "GaudiKernel/ServiceHandle.h"
21
#include "GaudiKernel/IClassIDSvc.h"
22
#include "
AthenaKernel/ITPCnvSvc.h
"
23
#include "
AthenaKernel/ITPCnvBase.h
"
24
#include "
AthenaBaseComps/AthService.h
"
25
26
// Forward declaration
27
class
ICLIDSvc;
28
29
30
class
AthTPCnvSvc
31
:
public
extends<AthService, ITPCnvSvc>
32
{
33
public
:
34
35
// Copy constructor:
36
38
AthTPCnvSvc
(
const
std::string& name, ISvcLocator* pSvcLocator );
39
41
virtual
~AthTPCnvSvc
()
override
;
42
44
46
// Const methods:
48
53
virtual
54
ITPCnvBase
*
55
load_tpcnv
(
const
std::string& cls)
override
;
56
60
virtual
61
ITPCnvBase
*
62
t2p_cnv
(
const
std::string& transClassName,
63
Athena::TPCnvType::Value
type
=
Athena::TPCnvType::Athena
)
override
;
64
68
virtual
69
ITPCnvBase
*
70
t2p_cnv
(
const
CLID
& transClid,
71
Athena::TPCnvType::Value
type
=
Athena::TPCnvType::Athena
)
override
;
72
76
virtual
77
ITPCnvBase
*
78
p2t_cnv
(
const
std::string& persClassName,
79
Athena::TPCnvType::Value
type
=
Athena::TPCnvType::Athena
)
override
;
80
84
virtual
85
std::unique_ptr<ITPCnvBase>
86
t2p_cnv_unique
(
const
std::string& transClassName)
const override
;
87
92
virtual
93
std::unique_ptr<ITPCnvBase>
94
t2p_cnv_unique
(
const
CLID
transClid)
const override
;
95
96
98
// Private data:
100
private
:
102
AthTPCnvSvc
();
103
106
ServiceHandle<IClassIDSvc>
m_clidSvc
;
107
108
typedef
std::vector<std::unique_ptr<ITPCnvBase> >
TpCnvs_t
;
111
TpCnvs_t
m_cnvs
;
112
113
// Protect access to m_cnvs.
114
mutable
std::mutex
m_mutex
;
115
};
116
117
118
#endif
//> !ATHENASERVICES_ATHTPCNVSVC_H
AthService.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ITPCnvBase.h
ITPCnvSvc.h
AthTPCnvSvc::AthTPCnvSvc
AthTPCnvSvc()
Default constructor:
AthTPCnvSvc::~AthTPCnvSvc
virtual ~AthTPCnvSvc() override
Destructor:
Definition
AthTPCnvSvc.cxx:44
AthTPCnvSvc::load_tpcnv
virtual ITPCnvBase * load_tpcnv(const std::string &cls) override
load the T/P converter class named cls return NULL on failure.
Definition
AthTPCnvSvc.cxx:54
AthTPCnvSvc::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
handle to a IClassIDSvc to handle loading of types by CLID
Definition
AthTPCnvSvc.h:106
AthTPCnvSvc::p2t_cnv
virtual ITPCnvBase * p2t_cnv(const std::string &persClassName, Athena::TPCnvType::Value type=Athena::TPCnvType::Athena) override
return the T/P converter for a persistent class (NULL if failure) ITPCnvSvc owns the ITPCnvBase point...
Definition
AthTPCnvSvc.cxx:130
AthTPCnvSvc::t2p_cnv
virtual ITPCnvBase * t2p_cnv(const std::string &transClassName, Athena::TPCnvType::Value type=Athena::TPCnvType::Athena) override
return the T/P converter for a transient class (NULL if failure) ITPCnvSvc owns the ITPCnvBase pointe...
Definition
AthTPCnvSvc.cxx:72
AthTPCnvSvc::m_mutex
std::mutex m_mutex
Definition
AthTPCnvSvc.h:114
AthTPCnvSvc::m_cnvs
TpCnvs_t m_cnvs
a registry of ITPCnvBase* instances
Definition
AthTPCnvSvc.h:111
AthTPCnvSvc::t2p_cnv_unique
virtual std::unique_ptr< ITPCnvBase > t2p_cnv_unique(const std::string &transClassName) const override
return the T/P converter for a transient class (NULL if failure) Ownership is returned to the caller.
Definition
AthTPCnvSvc.cxx:152
AthTPCnvSvc::AthTPCnvSvc
AthTPCnvSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
AthTPCnvSvc.cxx:35
AthTPCnvSvc::TpCnvs_t
std::vector< std::unique_ptr< ITPCnvBase > > TpCnvs_t
Definition
AthTPCnvSvc.h:108
ITPCnvBase
Definition
ITPCnvBase.h:24
ServiceHandle
Definition
ClusterMakerTool.h:36
Athena::TPCnvType::Value
Value
Definition
TPCnvFactory.h:108
Athena::TPCnvType::Athena
@ Athena
Definition
TPCnvFactory.h:109
type
Generated on
for ATLAS Offline Software by
1.17.0