ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaMPTools
src
EvtRangeScatterer.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAMPTOOLS_EVTRANGESCATTERER_H
6
#define ATHENAMPTOOLS_EVTRANGESCATTERER_H
7
8
#include "
AthenaMPToolBase.h
"
9
#include "yampl/Exceptions.h"
10
#include <map>
11
12
typedef
std::map<pid_t,std::string>
Pid2RangeID
;
13
14
namespace
yampl
{
15
class
ISocket;
16
}
17
18
class
EvtRangeScatterer
final :
public
AthenaMPToolBase
19
{
20
public
:
21
EvtRangeScatterer
(
const
std::string&
type
22
,
const
std::string& name
23
,
const
IInterface* parent);
24
25
virtual
~EvtRangeScatterer
()
override
;
26
27
virtual
StatusCode
initialize
()
override
;
28
virtual
StatusCode
finalize
()
override
;
29
30
// _________IAthenaMPTool_________
31
virtual
int
makePool
ATLAS_NOT_THREAD_SAFE
(
int
maxevt,
int
nprocs,
const
std::string& topdir)
override
;
32
virtual
StatusCode exec
ATLAS_NOT_THREAD_SAFE
()
override
;
33
34
virtual
void
subProcessLogs
(std::vector<std::string>&)
override
;
35
virtual
AthenaMP::AllWorkerOutputs_ptr
generateOutputReport
()
override
;
36
37
// _____ Actual working horses ________
38
virtual
std::unique_ptr<AthenaInterprocess::ScheduledWork>
bootstrap_func
()
override
;
39
virtual
std::unique_ptr<AthenaInterprocess::ScheduledWork>
exec_func
()
override
;
40
virtual
std::unique_ptr<AthenaInterprocess::ScheduledWork>
fin_func
()
override
;
41
42
private
:
43
EvtRangeScatterer
();
44
EvtRangeScatterer
(
const
EvtRangeScatterer
&);
45
EvtRangeScatterer
&
operator=
(
const
EvtRangeScatterer
&);
46
47
// Get rid of
48
// 1. Leading and trailing spaces
49
// 2. Leading "u\'" and trailing "\'"
50
void
trimRangeStrings
(std::string&);
51
52
// Helper functuion for receiving new messages from the socket2Processor channel
53
// If this is an output file report, then it is forwarded to the pilot and an empty string is returned to the caller
54
std::string
getNewRangeRequest
(yampl::ISocket* socket2Processor
55
, yampl::ISocket* socket2Pilot
56
,
int
& procReportPending);
57
58
// Poll the failed PID queue to see if any of the Processors has failed
59
pid_t
pollFailedPidQueue
(
AthenaInterprocess::SharedQueue
* sharedFailedPidQueue
60
, yampl::ISocket* socket2Pilot
61
,
int
& procReportPending);
62
63
Gaudi::Property<std::string>
m_processorChannel
{
this
,
"ProcessorChannel"
,
""
};
64
Gaudi::Property<std::string>
m_eventRangeChannel
{
this
,
"EventRangeChannel"
,
""
};
65
Gaudi::Property<bool>
m_doCaching
{
this
,
"DoCaching"
,
false
};
66
67
Pid2RangeID
m_pid2RangeID
;
// Current RangeID-s by PIDs
68
};
69
70
#endif
AthenaMPToolBase.h
Pid2RangeID
std::map< pid_t, std::string > Pid2RangeID
Definition
EvtRangeScatterer.h:12
pid_t
int32_t pid_t
Definition
FPGATrackSimTypes.h:19
AthenaInterprocess::SharedQueue
Definition
SharedQueue.h:21
AthenaMPToolBase::AthenaMPToolBase
AthenaMPToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
AthenaMPToolBase.cxx:33
EvtRangeScatterer::trimRangeStrings
void trimRangeStrings(std::string &)
Definition
EvtRangeScatterer.cxx:438
EvtRangeScatterer::EvtRangeScatterer
EvtRangeScatterer(const EvtRangeScatterer &)
EvtRangeScatterer::generateOutputReport
virtual AthenaMP::AllWorkerOutputs_ptr generateOutputReport() override
Definition
EvtRangeScatterer.cxx:103
EvtRangeScatterer::bootstrap_func
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > bootstrap_func() override
Definition
EvtRangeScatterer.cxx:109
EvtRangeScatterer::pollFailedPidQueue
pid_t pollFailedPidQueue(AthenaInterprocess::SharedQueue *sharedFailedPidQueue, yampl::ISocket *socket2Pilot, int &procReportPending)
Definition
EvtRangeScatterer.cxx:525
EvtRangeScatterer::ATLAS_NOT_THREAD_SAFE
virtual StatusCode exec ATLAS_NOT_THREAD_SAFE() override
EvtRangeScatterer::initialize
virtual StatusCode initialize() override
Definition
EvtRangeScatterer.cxx:39
EvtRangeScatterer::m_pid2RangeID
Pid2RangeID m_pid2RangeID
Definition
EvtRangeScatterer.h:67
EvtRangeScatterer::subProcessLogs
virtual void subProcessLogs(std::vector< std::string > &) override
Definition
EvtRangeScatterer.cxx:95
EvtRangeScatterer::EvtRangeScatterer
EvtRangeScatterer()
EvtRangeScatterer::m_eventRangeChannel
Gaudi::Property< std::string > m_eventRangeChannel
Definition
EvtRangeScatterer.h:64
EvtRangeScatterer::EvtRangeScatterer
EvtRangeScatterer(const std::string &type, const std::string &name, const IInterface *parent)
Definition
EvtRangeScatterer.cxx:27
EvtRangeScatterer::getNewRangeRequest
std::string getNewRangeRequest(yampl::ISocket *socket2Processor, yampl::ISocket *socket2Pilot, int &procReportPending)
Definition
EvtRangeScatterer.cxx:471
EvtRangeScatterer::fin_func
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > fin_func() override
Definition
EvtRangeScatterer.cxx:428
EvtRangeScatterer::~EvtRangeScatterer
virtual ~EvtRangeScatterer() override
Definition
EvtRangeScatterer.cxx:35
EvtRangeScatterer::operator=
EvtRangeScatterer & operator=(const EvtRangeScatterer &)
EvtRangeScatterer::finalize
virtual StatusCode finalize() override
Definition
EvtRangeScatterer.cxx:49
EvtRangeScatterer::ATLAS_NOT_THREAD_SAFE
virtual int makePool ATLAS_NOT_THREAD_SAFE(int maxevt, int nprocs, const std::string &topdir) override
EvtRangeScatterer::m_doCaching
Gaudi::Property< bool > m_doCaching
Definition
EvtRangeScatterer.h:65
EvtRangeScatterer::m_processorChannel
Gaudi::Property< std::string > m_processorChannel
Definition
EvtRangeScatterer.h:63
EvtRangeScatterer::exec_func
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > exec_func() override
Definition
EvtRangeScatterer.cxx:185
AthenaMP::AllWorkerOutputs_ptr
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr
Definition
IAthenaMPTool.h:32
yampl
Definition
EvtRangeProcessor.h:20
type
Generated on
for ATLAS Offline Software by
1.17.0