ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaPoolSharedIOCnvSvc.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 ATHENAPOOLCNVSVC_ATHENAPOOLSHAREDIOCNVSVC_H
6#define ATHENAPOOLCNVSVC_ATHENAPOOLSHAREDIOCNVSVC_H
7
12
13#include "AthenaPoolCnvSvc.h"
16
17// Forward declarations
18class Guid;
19
20template <class TYPE> class SvcFactory;
21
25class AthenaPoolSharedIOCnvSvc : public extends<AthenaPoolCnvSvc,
26 IDataShare> {
27 // Allow the factory class access to the constructor
29
30public:
31
33 virtual StatusCode initialize() override;
35 virtual StatusCode finalize() override;
36
40 virtual StatusCode connectOutput(const std::string& outputConnectionSpec,
41 const std::string& openMode) override;
42
46 virtual StatusCode connectOutput(const std::string& outputConnectionSpec) override;
47
50 virtual StatusCode commitOutput(const std::string& outputConnectionSpec, bool doCommit) override;
51
53 virtual StatusCode disconnectOutput(const std::string& outputConnectionSpec) override;
54
59 virtual Token* registerForWrite(Placement* placement, const void* obj, const RootType& classDesc) override;
60
63 virtual void setObjPtr(void*& obj, const Token* token) override;
64
71 StatusCode createAddress(long svcType,
72 const CLID& clid,
73 const std::string* par,
74 const unsigned long* ip,
75 IOpaqueAddress*& refpAddress) override;
76
82 virtual StatusCode createAddress(long svcType,
83 const CLID& clid,
84 const std::string& refAddress,
85 IOpaqueAddress*& refpAddress) override;
86
87
90 virtual StatusCode decodeOutputSpec(std::string& connectionSpec, int& outputTech) const override;
91
93 virtual StatusCode cleanUp(const std::string& connection) override;
94
96 virtual StatusCode makeServer(int num) override;
97
99 virtual StatusCode makeClient(int num) override;
100
102 virtual StatusCode readData() override;
103
105 virtual StatusCode commitCatalog() override;
106
109 StatusCode abortSharedWrClients(int client_n);
110
112 virtual void handle(const Incident& incident) override;
113
115 AthenaPoolSharedIOCnvSvc(const std::string& name, ISvcLocator* pSvcLocator);
117 virtual ~AthenaPoolSharedIOCnvSvc() = default;
118
119private: // data
120 ServiceHandle<IAthenaSerializeSvc> m_serializeSvc{this,"AthenaRootSerializeSvc","AthenaRootSerializeSvc"};
121 ToolHandle<IAthenaIPCTool> m_inputStreamingTool{this,"InputStreamingTool",{}};
122 ToolHandle<IAthenaIPCTool> m_outputStreamingTool{this,"OutputStreamingTool",{}};
125
126private: // properties
129 Gaudi::Property<std::string> m_metadataContainerProp{this,"OutputMetadataContainer","MetaData"};
130 Gaudi::Property<std::vector<std::string>> m_metadataContainersAug{this, "OutputMetadataContainers", {}, "Metadata containers used for augmentations"};
131
133 Gaudi::Property<int> m_makeStreamingToolClient{this,"MakeStreamingToolClient",0};
135 Gaudi::Property<int> m_streamingTechnology{this,"StreamingTechnology",-1};
137 Gaudi::Property<bool> m_parallelCompression{this,"ParallelCompression",true};
139 Gaudi::Property<std::string> m_streamPortString{this,"StreamPortString","?pmerge=localhost:0"};
141 std::map<std::string, int> m_fileCommitCounter;
142 Gaudi::Property<std::map<std::string, int>> m_fileFlushSetting{this,"FileFlushSetting",{}};
143};
144
145#endif
This file contains the class definition for the AthenaPoolCnvSvc class.
uint32_t CLID
The Class ID type.
TTypeAdapter RootType
Definition RootType.h:211
std::map< std::string, int > m_fileCommitCounter
Force SharedWriter to flush data to output file at given intervals, needed by parallel compression.
virtual StatusCode commitOutput(const std::string &outputConnectionSpec, bool doCommit) override
Implementation of IConversionSvc: Commit pending output.
Gaudi::Property< std::string > m_streamPortString
Extension to use ROOT TMemFile for event data, "?pmerge=<host>:<port>".
virtual StatusCode finalize() override
Required of all Gaudi Services.
AthenaPoolSharedIOCnvSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual StatusCode cleanUp(const std::string &connection) override
Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function.
virtual void setObjPtr(void *&obj, const Token *token) override
StatusCode createAddress(long svcType, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) override
Create a Generic address using explicit arguments to identify a single object.
StatusCode abortSharedWrClients(int client_n)
Send abort to SharedWriter clients if the server quits on error.
virtual StatusCode makeServer(int num) override
Make this a server.
virtual void handle(const Incident &incident) override
Implementation of IIncidentListener: Handle for EndEvent incidence.
Gaudi::Property< std::string > m_metadataContainerProp
For SharedWriter: To use MetadataSvc to merge data placed in a certain container.
virtual StatusCode disconnectOutput(const std::string &outputConnectionSpec) override
Disconnect to the output connection.
virtual StatusCode readData() override
Read the next data object.
virtual StatusCode commitCatalog() override
Commit Catalog.
virtual StatusCode connectOutput(const std::string &outputConnectionSpec, const std::string &openMode) override
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
Gaudi::Property< std::vector< std::string > > m_metadataContainersAug
virtual StatusCode decodeOutputSpec(std::string &connectionSpec, int &outputTech) const override
Extract/deduce the DB technology from the connection string/file specification.
Gaudi::Property< bool > m_parallelCompression
Use Athena Object sharing for metadata only, event data is collected and send via ROOT TMemFile.
ToolHandle< IAthenaIPCTool > m_outputStreamingTool
Gaudi::Property< std::map< std::string, int > > m_fileFlushSetting
Gaudi::Property< int > m_streamingTechnology
Use Streaming for selected technologies only.
virtual StatusCode initialize() override
Required of all Gaudi Services.
ToolHandle< IAthenaIPCTool > m_inputStreamingTool
virtual ~AthenaPoolSharedIOCnvSvc()=default
Destructor.
ServiceHandle< IAthenaSerializeSvc > m_serializeSvc
virtual Token * registerForWrite(Placement *placement, const void *obj, const RootType &classDesc) override
Gaudi::Property< int > m_makeStreamingToolClient
Make this instance a Streaming Client during first connect/write automatically.
virtual StatusCode makeClient(int num) override
Make this a client.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition Placement.h:19
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21