ATLAS Offline Software
Loading...
Searching...
No Matches
AthDictLoaderSvc.h
Go to the documentation of this file.
1
2
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
25
26// AthenaKernel
28#include "AthenaKernel/DsoDb.h"
29
30// Forward declaration
31class ITPCnvSvc;
32class ISvcLocator;
33
34class 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
uint32_t CLID
The Class ID type.
TTypeAdapter RootType
Definition RootType.h:211
const Ath::DsoDb * m_dsodb
dictionary of all known (reflex) types
virtual bool has_type(const std::string &type_name) override
check a Reflex dictionary exists for a given type
void load_recursive1(const std::string &tnam, Memo_t &memo)
virtual ~AthDictLoaderSvc()
Destructor:
virtual StatusCode finalize() override
ServiceHandle< ITPCnvSvc > m_tpCnvSvc
std::unordered_set< std::string > Memo_t
virtual StatusCode initialize() override
Gaudi Service Implementation.
void load_recursive(const RootType &typ)
AthDictLoaderSvc()
Default constructor:
ServiceHandle< IClassIDSvc > m_clidSvc
handle to a IClassIDSvc to handle loading of types by CLID
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.
AthDictLoaderSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
helper class to query rootmap files and extract their content
Definition DsoDb.h:31