|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/IService.h"
22 #include "TInterpreter.h"
29 : base_class(
name, pSvcLocator),
54 return StatusCode::FAILURE;
67 status = StatusCode::FAILURE;
80 p.first.Destruct (
p.second);
93 return IAthenaRootStreamerSvc::interfaceID();
99 RootType streamer_class( converter_classname );
100 if( !streamer_class ) {
103 static std::once_flag libLoadFlag;
104 std::call_once( libLoadFlag, []( TInterpreter& interpreter ) {
108 interpreter.LoadLibraryMap();
109 interpreter.SetClassAutoloading(
true );
114 gInterpreter->AutoLoad( converter_classname.c_str() );
117 streamer_class =
RootType( converter_classname );
118 if( ! streamer_class ) {
120 <<
"> in the dictionary, and autoloading failed" );
121 return(StatusCode::FAILURE);
123 log <<
MSG::DEBUG <<
"Loaded dictionary for class " << converter_classname
136 const std::string &classname = converter->
ClassName();
142 auto convH = std::make_unique<AthenaRootConverterHandle>(converter);
143 if( streamer->
AddConverter(std::move(convH)).isFailure() ) {
145 <<
" already has a converter for checksum = "
147 return(StatusCode::FAILURE);
150 <<
" added converter for checksum = "
156 return(StatusCode::SUCCESS);
165 <<
" with has no converters defined" );
166 return(StatusCode::FAILURE);
170 return(StatusCode::SUCCESS);
173 return(StatusCode::FAILURE);
182 if(
p.second->Adopt().isFailure() ) {
183 ATH_MSG_INFO (
"Failed to adopt streamer for class " <<
p.first );
184 sc = StatusCode::FAILURE;
DbStatus close()
Close the session.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
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)
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)
virtual StatusCode AdoptAllStreamers()
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