ATLAS Offline Software
Loading...
Searching...
No Matches
SharedWriterTool.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 ATHENAMPTOOLS_SHAREDWRITERTOOL_H
6#define ATHENAMPTOOLS_SHAREDWRITERTOOL_H
7
8#include "AthenaMPToolBase.h"
9
10class IConversionSvc;
11
13{
14 public:
15 SharedWriterTool(const std::string& type
16 , const std::string& name
17 , const IInterface* parent);
18
19 virtual ~SharedWriterTool() override;
20
21 virtual StatusCode initialize() override;
22 virtual StatusCode finalize() override;
23
24 // _________IAthenaMPTool_________
25 virtual int makePool ATLAS_NOT_THREAD_SAFE (int maxevt, int nprocs, const std::string& topdir) override;
26 virtual StatusCode exec ATLAS_NOT_THREAD_SAFE () override;
27
28 virtual void subProcessLogs(std::vector<std::string>&) override;
30
31 // _____ Actual working horses ________
32 virtual std::unique_ptr<AthenaInterprocess::ScheduledWork> bootstrap_func() override;
33 virtual std::unique_ptr<AthenaInterprocess::ScheduledWork> exec_func() override;
34 virtual std::unique_ptr<AthenaInterprocess::ScheduledWork> fin_func() override;
35
36 private:
40
41 // Properties
42 Gaudi::Property<bool> m_nMotherProcess{
43 this, "MotherProcess", false,
44 "Expect mother process to write event data. The default is false."};
45 Gaudi::Property<bool> m_debug{
46 this, "Debug", false,
47 "Are we running in debug mode? The default is false"};
48
49 int m_rankId; // Each worker has its own unique RankID from the range (0,...,m_nprocs-1)
50
52 SmartIF<IConversionSvc> m_cnvSvc;
53
54};
55
56#endif
AthenaMPToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< bool > m_nMotherProcess
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > exec_func() override
SmartIF< IConversionSvc > m_cnvSvc
Gaudi::Property< bool > m_debug
SharedWriterTool & operator=(const SharedWriterTool &)
SharedWriterTool(const SharedWriterTool &)
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > fin_func() override
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > bootstrap_func() override
virtual AthenaMP::AllWorkerOutputs_ptr generateOutputReport() override
virtual StatusCode exec ATLAS_NOT_THREAD_SAFE() override
virtual int makePool ATLAS_NOT_THREAD_SAFE(int maxevt, int nprocs, const std::string &topdir) override
AthenaInterprocess::SharedQueue * m_sharedRankQueue
virtual void subProcessLogs(std::vector< std::string > &) override
virtual ~SharedWriterTool() override
virtual StatusCode finalize() override
SharedWriterTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize() override
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr