ATLAS Offline Software
AthTPCnvSvc.h
Go to the documentation of this file.
1 
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"
25 
26 // Forward declaration
27 class ICLIDSvc;
28 
29 
31  : public extends1<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,
64 
68  virtual
69  ITPCnvBase*
70  t2p_cnv(const CLID& transClid,
72 
76  virtual
77  ITPCnvBase*
78  p2t_cnv(const std::string& persClassName,
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:
103 
107 
108  typedef std::vector<std::unique_ptr<ITPCnvBase> > TpCnvs_t;
112 
113  // Protect access to m_cnvs.
115 };
116 
117 
118 #endif //> !ATHENASERVICES_ATHTPCNVSVC_H
Athena::TPCnvType::Value
Value
Definition: TPCnvFactory.h:122
ITPCnvSvc.h
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
CaloClusterListBadChannel.cls
cls
Definition: CaloClusterListBadChannel.py:8
AthTPCnvSvc::AthTPCnvSvc
AthTPCnvSvc()
Default constructor:
ITPCnvBase.h
AthTPCnvSvc
Definition: AthTPCnvSvc.h:32
Athena::TPCnvType::Athena
@ Athena
Definition: TPCnvFactory.h:123
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:154
AthTPCnvSvc::TpCnvs_t
std::vector< std::unique_ptr< ITPCnvBase > > TpCnvs_t
Definition: AthTPCnvSvc.h:108
AthTPCnvSvc::m_mutex
std::mutex m_mutex
Definition: AthTPCnvSvc.h:114
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:74
AthTPCnvSvc::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
handle to a IClassIDSvc to handle loading of types by CLID
Definition: AthTPCnvSvc.h:106
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AthTPCnvSvc::~AthTPCnvSvc
virtual ~AthTPCnvSvc() override
Destructor:
Definition: AthTPCnvSvc.cxx:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ITPCnvBase
Definition: ITPCnvBase.h:24
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:56
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthService.h
AthTPCnvSvc::m_cnvs
TpCnvs_t m_cnvs
a registry of ITPCnvBase* instances
Definition: AthTPCnvSvc.h:111
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:132
ServiceHandle< IClassIDSvc >