ATLAS Offline Software
AthenaRootStreamerSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAPOOLSERVICES_ATHENAROOTSTREAMERSVC_H
6 #define ATHENAPOOLSERVICES_ATHENAROOTSTREAMERSVC_H
7 
15 
17 #include "DataModelRoot/RootType.h"
18 
19 #include <map>
20 
21 
27 class AthenaRootStreamer;
28 
30  public AthService
31 {
32 public:
34  AthenaRootStreamerSvc(const std::string& name, ISvcLocator* pSvcLocator);
36  virtual ~AthenaRootStreamerSvc();
37 
38 public:
40  virtual StatusCode initialize();
42  virtual StatusCode finalize();
44  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
46  virtual const InterfaceID& type() const;
47 
48  // IAthenaRootStreamerSvc interface implemenation
49  virtual StatusCode AddStreamer(const std::string& converter_classname, bool adopt=true);
50 
51  virtual StatusCode AddStreamer(T_AthenaRootConverterBase *converter, bool adopt=true);
52 
53  virtual StatusCode AdoptStreamerForClass(const std::string& class_name);
54 
55  virtual StatusCode AdoptAllStreamers();
56 
57 
58 private:
59 
60  StringArrayProperty m_streamerClassNames;
61 
63  typedef std::map<std::string, AthenaRootStreamer*> StreamerMap;
65 
68  typedef std::pair<RootType, void*> ConverterPair_t;
69  typedef std::vector< ConverterPair_t > ConverterVector_t;
71 };
72 #endif
AthenaRootStreamerSvc
This class provides the manager for ROOT custom streamers.
Definition: AthenaRootStreamerSvc.h:31
T_AthenaRootConverterBase
Definition: T_AthenaRootConverter.h:17
IAthenaRootStreamerSvc
Gaudi style interface to Athena ROOT streamer service.
Definition: IAthenaRootStreamerSvc.h:40
AthenaRootStreamerSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Required of all Gaudi services: see Gaudi documentation for details.
Definition: AthenaRootStreamerSvc.cxx:91
AthenaRootStreamerSvc::m_streamerMap
StreamerMap m_streamerMap
Definition: AthenaRootStreamerSvc.h:64
AthenaRootStreamerSvc::type
virtual const InterfaceID & type() const
Service type.
Definition: AthenaRootStreamerSvc.cxx:104
AthenaRootStreamerSvc::StreamerMap
std::map< std::string, AthenaRootStreamer * > StreamerMap
map of streamers for given class names
Definition: AthenaRootStreamerSvc.h:63
AthenaRootStreamerSvc::AdoptStreamerForClass
virtual StatusCode AdoptStreamerForClass(const std::string &class_name)
Adopt ROOT custom streamer for a given class.
Definition: AthenaRootStreamerSvc.cxx:174
AthenaRootStreamerSvc::m_createdConverters
ConverterVector_t m_createdConverters
Definition: AthenaRootStreamerSvc.h:70
AthenaRootStreamerSvc::finalize
virtual StatusCode finalize()
Required of all Gaudi services:
Definition: AthenaRootStreamerSvc.cxx:75
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
AthenaRootStreamer
This class enhances ROOT custom streamer base TClassStreamer and can choose a converter function base...
Definition: AthenaRootStreamer.h:33
IAthenaRootStreamerSvc.h
Interface to the ROOT Streamer Service.
AthenaRootStreamerSvc::ConverterPair_t
std::pair< RootType, void * > ConverterPair_t
vector of converters created by the service, (as Reflex Objects) kept so they can be deleted at the e...
Definition: AthenaRootStreamerSvc.h:68
AthenaRootStreamerSvc::ConverterVector_t
std::vector< ConverterPair_t > ConverterVector_t
Definition: AthenaRootStreamerSvc.h:69
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthenaRootStreamerSvc::AddStreamer
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...
Definition: AthenaRootStreamerSvc.cxx:110
AthenaRootStreamerSvc::AdoptAllStreamers
virtual StatusCode AdoptAllStreamers()
Adopt all ROOT streamers known to the service.
Definition: AthenaRootStreamerSvc.cxx:191
AthenaRootStreamerSvc::~AthenaRootStreamerSvc
virtual ~AthenaRootStreamerSvc()
Destructor.
Definition: AthenaRootStreamerSvc.cxx:36
RootType.h
AthService.h
python.DetectStreamerInfoChanges.class_name
class_name
Definition: DetectStreamerInfoChanges.py:57
AthenaRootStreamerSvc::AthenaRootStreamerSvc
AthenaRootStreamerSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: AthenaRootStreamerSvc.cxx:28
AthenaRootStreamerSvc::initialize
virtual StatusCode initialize()
Required of all Gaudi services:
Definition: AthenaRootStreamerSvc.cxx:41
AthenaRootStreamerSvc::m_streamerClassNames
StringArrayProperty m_streamerClassNames
Definition: AthenaRootStreamerSvc.h:60