ATLAS Offline Software
AthenaRootSharedWriterSvc.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 ATHENAROOTSHAREDWRITERSVC_H
6 #define ATHENAROOTSHAREDWRITERSVC_H
7 
16 
17 #include "THashTable.h"
18 
19 class TServerSocket;
20 class TMonitor;
21 
25 class AthenaRootSharedWriterSvc : public extends<AthService, IAthenaSharedWriterSvc> {
26  // Allow the factory class access to the constructor
28 
29 public: // Constructor and Destructor
31  AthenaRootSharedWriterSvc(const std::string& name, ISvcLocator* pSvcLocator);
33  virtual ~AthenaRootSharedWriterSvc() = default;
34 
35 public:
37  virtual StatusCode initialize() override;
38  virtual StatusCode stop() override;
39  virtual StatusCode finalize() override;
40 
41  virtual StatusCode share(int numClients = 0, bool motherClient = false) override;
42 
43 private:
44  ServiceHandle<IAthenaPoolCnvSvc> m_cnvSvc{this,"AthenaPoolCnvSvc","AthenaPoolCnvSvc"};
45 
46  TServerSocket* m_rootServerSocket;
47  TMonitor* m_rootMonitor;
48  THashTable m_rootMergers;
52 };
53 
54 #endif
AthenaRootSharedWriterSvc::m_rootClientCount
int m_rootClientCount
Definition: AthenaRootSharedWriterSvc.h:50
IAthenaPoolCnvSvc.h
This file contains the class definition for the IAthenaPoolCnvSvc interface class.
SvcFactory
Definition: AthCnvSvc.h:28
AthenaRootSharedWriterSvc::AthenaRootSharedWriterSvc
AthenaRootSharedWriterSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: AthenaRootSharedWriterSvc.cxx:158
AthenaRootSharedWriterSvc::~AthenaRootSharedWriterSvc
virtual ~AthenaRootSharedWriterSvc()=default
Destructor.
IAthenaSharedWriterSvc.h
AthenaRootSharedWriterSvc
This class provides an example for writing event data objects to Pool.
Definition: AthenaRootSharedWriterSvc.h:25
AthenaRootSharedWriterSvc::m_rootClientIndex
int m_rootClientIndex
Definition: AthenaRootSharedWriterSvc.h:49
AthenaRootSharedWriterSvc::share
virtual StatusCode share(int numClients=0, bool motherClient=false) override
Definition: AthenaRootSharedWriterSvc.cxx:222
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthenaRootSharedWriterSvc::finalize
virtual StatusCode finalize() override
Definition: AthenaRootSharedWriterSvc.cxx:325
AthenaRootSharedWriterSvc::m_rootServerSocket
TServerSocket * m_rootServerSocket
Definition: AthenaRootSharedWriterSvc.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthenaRootSharedWriterSvc::stop
virtual StatusCode stop() override
Definition: AthenaRootSharedWriterSvc.cxx:320
AthenaRootSharedWriterSvc::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition: AthenaRootSharedWriterSvc.cxx:163
AthenaRootSharedWriterSvc::m_rootMergers
THashTable m_rootMergers
Definition: AthenaRootSharedWriterSvc.h:48
AthenaRootSharedWriterSvc::m_rootMonitor
TMonitor * m_rootMonitor
Definition: AthenaRootSharedWriterSvc.h:47
AthService.h
AthenaRootSharedWriterSvc::m_numberOfStreams
int m_numberOfStreams
Definition: AthenaRootSharedWriterSvc.h:51
AthenaRootSharedWriterSvc::m_cnvSvc
ServiceHandle< IAthenaPoolCnvSvc > m_cnvSvc
Definition: AthenaRootSharedWriterSvc.h:44
ServiceHandle< IAthenaPoolCnvSvc >