ATLAS Offline Software
AthenaRootStreamerSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
29 class AthenaRootStreamerSvc : public extends<AthService, IAthenaRootStreamerSvc>
30 {
31 public:
33  AthenaRootStreamerSvc(const std::string& name, ISvcLocator* pSvcLocator);
35  virtual ~AthenaRootStreamerSvc();
36 
37 public:
39  virtual StatusCode initialize();
41  virtual StatusCode finalize();
43  virtual const InterfaceID& type() const;
44 
45  // IAthenaRootStreamerSvc interface implemenation
46  virtual StatusCode AddStreamer(const std::string& converter_classname, bool adopt=true);
47 
48  virtual StatusCode AddStreamer(T_AthenaRootConverterBase *converter, bool adopt=true);
49 
50  virtual StatusCode AdoptStreamerForClass(const std::string& class_name);
51 
52  virtual StatusCode AdoptAllStreamers();
53 
54 
55 private:
56 
57  StringArrayProperty m_streamerClassNames;
58 
60  typedef std::map<std::string, AthenaRootStreamer*> StreamerMap;
62 
65  typedef std::pair<RootType, void*> ConverterPair_t;
66  typedef std::vector< ConverterPair_t > ConverterVector_t;
68 };
69 #endif
AthenaRootStreamerSvc
This class provides the manager for ROOT custom streamers.
Definition: AthenaRootStreamerSvc.h:30
T_AthenaRootConverterBase
Definition: T_AthenaRootConverter.h:17
AthenaRootStreamerSvc::m_streamerMap
StreamerMap m_streamerMap
Definition: AthenaRootStreamerSvc.h:61
AthenaRootStreamerSvc::type
virtual const InterfaceID & type() const
Service type.
Definition: AthenaRootStreamerSvc.cxx:91
AthenaRootStreamerSvc::StreamerMap
std::map< std::string, AthenaRootStreamer * > StreamerMap
map of streamers for given class names
Definition: AthenaRootStreamerSvc.h:60
AthenaRootStreamerSvc::AdoptStreamerForClass
virtual StatusCode AdoptStreamerForClass(const std::string &class_name)
Definition: AthenaRootStreamerSvc.cxx:161
AthenaRootStreamerSvc::m_createdConverters
ConverterVector_t m_createdConverters
Definition: AthenaRootStreamerSvc.h:67
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
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:65
AthenaRootStreamerSvc::ConverterVector_t
std::vector< ConverterPair_t > ConverterVector_t
Definition: AthenaRootStreamerSvc.h:66
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthenaRootStreamerSvc::AddStreamer
virtual StatusCode AddStreamer(const std::string &converter_classname, bool adopt=true)
Definition: AthenaRootStreamerSvc.cxx:97
AthenaRootStreamerSvc::AdoptAllStreamers
virtual StatusCode AdoptAllStreamers()
Definition: AthenaRootStreamerSvc.cxx:178
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:57