ATLAS Offline Software
Loading...
Searching...
No Matches
TrigSerTPTool.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
8#ifndef TRIGSERIALIZETP_TRIGSERTPTOOL_H
9#define TRIGSERIALIZETP_TRIGSERTPTOOL_H 1
10
11// System include(s):
12#include <string>
13#include <vector>
14#include <map>
15#include <memory>
16
17// Gaudi/Athena include(s):
18#include "GaudiKernel/ServiceHandle.h"
19#include "GaudiKernel/MsgStream.h"
20#include "GaudiKernel/IMessageSvc.h"
25#include "CxxUtils/ClassName.h"
26
32class TrigSerTPTool : public AthAlgTool {
33
34public:
36 static const InterfaceID& interfaceID( ) {
37 static const InterfaceID
38 IID_TrigSerTPTool("TrigSerTPTool", 1, 0);
39 return IID_TrigSerTPTool;
40 }
41
43 TrigSerTPTool( const std::string& type, const std::string& name,
44 const IInterface* parent );
45
47 virtual StatusCode initialize() override;
48
50 void* convertTP( const std::string& transName, void* trans,
51 std::string& persName ) const;
53 void* convertPT( const std::string& persName, void* pers,
54 std::string& transName ) const;
55
57 const std::string& persClassName( const std::string& transClassName ) const;
58
59private:
61 TClass* getClass( const std::string& clname ) const;
63
64 std::unique_ptr< MsgStream > m_logTP;
65 std::map< std::string, std::string > m_TPmap; //configure - lookup of
66 std::vector< std::string > m_activeClasses;
72 mutable std::mutex m_convertersCacheMutex;
73 mutable std::map<std::string, ITPCnvBase*> m_convertesCache ATLAS_THREAD_SAFE;
74
75 ITPCnvBase* getConverter( const std::string& persistent ) const;
76
77}; // class TrigSerTPTool
78
79#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:
A set of transformation rules to use with ClassName.
std::vector< std::string > m_activeClasses
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< IMessageSvc > m_msgsvcTP
ServiceHandle< IDictLoaderSvc > m_dictSvc
std::mutex m_convertersCacheMutex
std::unique_ptr< MsgStream > m_logTP
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.