ATLAS Offline Software
AthDictLoaderSvc.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // AthDictLoaderSvc.h
8 // Header file for class AthDictLoaderSvc
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef ATHENASERVICES_ATHDICTLOADERSVC_H
12 #define ATHENASERVICES_ATHDICTLOADERSVC_H 1
13 
14 // STL includes
15 #include <string>
16 
17 // FrameWork includes
18 #include "GaudiKernel/IClassIDSvc.h"
19 #include "GaudiKernel/ClassID.h"
20 #include "GaudiKernel/ServiceHandle.h"
22 
23 // the Type type
24 #include "DataModelRoot/RootType.h"
25 
26 // AthenaKernel
28 #include "AthenaKernel/DsoDb.h"
29 
30 // Forward declaration
31 class ITPCnvSvc;
32 class ISvcLocator;
33 
34 class AthDictLoaderSvc : public extends<::AthService, ::IDictLoaderSvc>
35 {
37  // Public methods:
39  public:
40 
41  // Copy constructor:
42 
44  AthDictLoaderSvc( const std::string& name, ISvcLocator* pSvcLocator );
45 
47  virtual ~AthDictLoaderSvc();
48 
49  // Assignment operator:
50  //AthDictLoaderSvc &operator=(const AthDictLoaderSvc &alg);
51 
53 
54  virtual StatusCode initialize() override;
55  virtual StatusCode finalize() override;
57 
60  virtual
61  bool has_type (const std::string& type_name) override;
62 
65  virtual
66  bool has_type (const std::type_info& typeinfo) override;
67 
70  virtual
71  bool has_type (CLID clid) override;
72 
77  virtual
78  const RootType load_type (const std::string& type_name, bool recursive = false) override;
79 
86  virtual
87  const RootType load_type (const std::type_info& typeinfo, bool recursive = false) override;
88 
93  virtual
94  const RootType load_type (CLID clid, bool recursive = false) override;
95 
97  // Private data:
99  private:
100 
103 
104  // Containers
105 
109 
113 
115 
116  void load_recursive (const RootType& typ);
117  using Memo_t = std::unordered_set<std::string>;
118  void load_recursive1 (const std::string& tnam, Memo_t& memo);
119  void load_recursive1 (const RootType& typ, Memo_t& memo);
120 };
121 
122 #endif //> !ATHENASERVICES_ATHDICTLOADERSVC_H
Ath::DsoDb
helper class to query rootmap files and extract their content
Definition: DsoDb.h:31
AthDictLoaderSvc::m_tpCnvSvc
ServiceHandle< ITPCnvSvc > m_tpCnvSvc
Definition: AthDictLoaderSvc.h:114
AthDictLoaderSvc::Memo_t
std::unordered_set< std::string > Memo_t
Definition: AthDictLoaderSvc.h:117
AthDictLoaderSvc::~AthDictLoaderSvc
virtual ~AthDictLoaderSvc()
Destructor:
Definition: AthDictLoaderSvc.cxx:49
AthDictLoaderSvc::load_recursive
void load_recursive(const RootType &typ)
Definition: AthDictLoaderSvc.cxx:204
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthDictLoaderSvc::AthDictLoaderSvc
AthDictLoaderSvc()
Default constructor:
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
DsoDb.h
AthDictLoaderSvc::m_dsodb
const Ath::DsoDb * m_dsodb
dictionary of all known (reflex) types
Definition: AthDictLoaderSvc.h:108
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthDictLoaderSvc::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
handle to a IClassIDSvc to handle loading of types by CLID
Definition: AthDictLoaderSvc.h:112
AthDictLoaderSvc::finalize
virtual StatusCode finalize() override
Definition: AthDictLoaderSvc.cxx:70
AthDictLoaderSvc
Definition: AthDictLoaderSvc.h:35
IDictLoaderSvc.h
AthDictLoaderSvc::load_recursive1
void load_recursive1(const std::string &tnam, Memo_t &memo)
Definition: AthDictLoaderSvc.cxx:211
RootType.h
AthService.h
AthDictLoaderSvc::load_type
virtual const RootType load_type(const std::string &type_name, bool recursive=false) override
retrieve a Reflex::Type by name (auto)loading the dictionary by any necessary means.
Definition: AthDictLoaderSvc.cxx:130
ITPCnvSvc
Definition: ITPCnvSvc.h:29
generateReferenceFile.recursive
recursive
Definition: generateReferenceFile.py:12
AthDictLoaderSvc::has_type
virtual bool has_type(const std::string &type_name) override
check a Reflex dictionary exists for a given type
Definition: AthDictLoaderSvc.cxx:79
ServiceHandle< IClassIDSvc >
TScopeAdapter
Definition: RootType.h:119
AthDictLoaderSvc::initialize
virtual StatusCode initialize() override
Gaudi Service Implementation.
Definition: AthDictLoaderSvc.cxx:54