ATLAS Offline Software
Loading...
Searching...
No Matches
TrigSerTPTool.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef TRIGSERIALIZETP_TRIGSERTPTOOL_H
8#define TRIGSERIALIZETP_TRIGSERTPTOOL_H 1
9
10// System include(s):
11#include <string>
12#include <map>
13
14// Gaudi/Athena include(s):
15#include "GaudiKernel/ServiceHandle.h"
20#include "CxxUtils/ClassName.h"
21
27class TrigSerTPTool : public AthAlgTool {
28
29public:
31 static const InterfaceID& interfaceID( ) {
32 static const InterfaceID
33 IID_TrigSerTPTool("TrigSerTPTool", 1, 0);
34 return IID_TrigSerTPTool;
35 }
36
38 TrigSerTPTool( const std::string& type, const std::string& name,
39 const IInterface* parent );
40
42 virtual StatusCode initialize() override;
43
45 void* convertTP( const std::string& transName, void* trans,
46 std::string& persName ) const;
48 void* convertPT( const std::string& persName, void* pers,
49 std::string& transName ) const;
50
52 const std::string& persClassName( const std::string& transClassName ) const;
53
54private:
56 TClass* getClass( const std::string& clname ) const;
57 CxxUtils::ClassName::Rules m_clNameRules;
58
59 std::map< std::string, std::string > m_TPmap; //configure - lookup of
63 mutable std::mutex m_convertersCacheMutex;
64 mutable std::map<std::string, ITPCnvBase*> m_convertesCache ATLAS_THREAD_SAFE;
65
66 ITPCnvBase* getConverter( const std::string& persistent ) const;
67
68}; // class TrigSerTPTool
69
70#endif // !TRIGSERIALIZETP_TRIGSERTPTOOL_H
Recursively separate out template arguments in a C++ class name.
Define macros for attributes used to control the static checker.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const std::string & persClassName(const std::string &transClassName) const
Get the name of the persistent class belonging to a transient one.
bool m_useAthDictLoader
CxxUtils::ClassName::Rules m_clNameRules
static const InterfaceID & interfaceID()
Declare the interface provided by the tool.
ServiceHandle< ITPCnvSvc > m_tpcnvsvc
ServiceHandle< IDictLoaderSvc > m_dictSvc
std::mutex m_convertersCacheMutex
void * convertPT(const std::string &persName, void *pers, std::string &transName) const
Convert a persistent object to its transient self.
void * convertTP(const std::string &transName, void *trans, std::string &persName) const
Convert a transient object to its persistent self.
ITPCnvBase * getConverter(const std::string &persistent) const
std::map< std::string, ITPCnvBase * > m_convertesCache ATLAS_THREAD_SAFE
std::map< std::string, std::string > m_TPmap
TClass * getClass(const std::string &clname) const
Get the ROOT dictionary for a type.
TrigSerTPTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool constructor.
virtual StatusCode initialize() override
Function initialising the tool.