![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/IService.h"
22 #include "TInterpreter.h"
54 return StatusCode::FAILURE;
67 status = StatusCode::FAILURE;
80 p.first.Destruct (
p.second);
97 return(AthService::queryInterface(riid, ppvInterface));
100 return(StatusCode::SUCCESS);
112 RootType streamer_class( converter_classname );
113 if( !streamer_class ) {
116 static std::once_flag libLoadFlag;
117 std::call_once( libLoadFlag, []( TInterpreter& interpreter ) {
121 interpreter.LoadLibraryMap();
122 interpreter.SetClassAutoloading(
true );
127 gInterpreter->AutoLoad( converter_classname.c_str() );
130 streamer_class =
RootType( converter_classname );
131 if( ! streamer_class ) {
133 <<
"> in the dictionary, and autoloading failed" );
134 return(StatusCode::FAILURE);
136 log <<
MSG::DEBUG <<
"Loaded dictionary for class " << converter_classname
149 const std::string &classname = converter->
ClassName();
155 auto convH = std::make_unique<AthenaRootConverterHandle>(converter);
156 if( streamer->
AddConverter(std::move(convH)).isFailure() ) {
158 <<
" already has a converter for checksum = "
160 return(StatusCode::FAILURE);
163 <<
" added converter for checksum = "
169 return(StatusCode::SUCCESS);
178 <<
" with has no converters defined" );
179 return(StatusCode::FAILURE);
183 return(StatusCode::SUCCESS);
186 return(StatusCode::FAILURE);
195 if(
p.second->Adopt().isFailure() ) {
196 ATH_MSG_INFO (
"Failed to adopt streamer for class " <<
p.first );
197 sc = StatusCode::FAILURE;
This class provides the manager for ROOT custom streamers.
DbStatus close()
Close the session.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
static const InterfaceID & interfaceID()
Retrieve interface ID.
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Required of all Gaudi services: see Gaudi documentation for details.
this file contains the class definition for the AthenaRootStreamer class.
StreamerMap m_streamerMap
Db objects: class DbSession.
const std::string & ClassName()
virtual const InterfaceID & type() const
Service type.
StatusCode AddConverter(std::unique_ptr< AthenaRootConverterHandle > converter)
Add a converter to this streamer.
virtual StatusCode AdoptStreamerForClass(const std::string &class_name)
Adopt ROOT custom streamer for a given class.
unsigned StreamerChecksum()
ConverterVector_t m_createdConverters
virtual StatusCode finalize()
Required of all Gaudi services:
his file contains the class definition for AthenaRootConverter class.
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
DbStatus open()
Open the session in a given mode.
This class enhances ROOT custom streamer base TClassStreamer and can choose a converter function base...
virtual StatusCode AddStreamer(const std::string &converter_classname, bool adopt=true)
Create (or exetend) ROOT streamer Class name for which the streamer is added is extracted from the co...
virtual StatusCode AdoptAllStreamers()
Adopt all ROOT streamers known to the service.
virtual ~AthenaRootStreamerSvc()
Destructor.
IOODatabase * db(const DbType &typ)
Allow access to the Database implementation.
Athena ROOT Streaming Service class.
Athena ROOT Streaming Converter - template class to be extended by a user prividing a conversion func...
AthenaRootStreamerSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual StatusCode initialize()
Required of all Gaudi services:
StringArrayProperty m_streamerClassNames