ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
Root
ManagerData.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
EventLoop/ManagerData.h
>
14
15
#include <
EventLoop/BatchJob.h
>
16
#include <
EventLoop/Manager.h
>
17
#include <
EventLoop/MessageCheck.h
>
18
#include <
RootCoreUtils/Assert.h
>
19
20
using namespace
EL::msgEventLoop;
21
22
//
23
// method implementations
24
//
25
26
namespace
EL
27
{
28
namespace
Detail
29
{
30
ManagerData ::
31
ManagerData () noexcept
32
{}
33
34
35
36
ManagerData ::
37
~ManagerData () noexcept
38
{}
39
40
41
42
void
ManagerData ::
43
addManager (std::unique_ptr<Manager> manager)
44
{
45
if
(
managers
.find (manager->getManagerOrder()) !=
managers
.end())
46
throw
std::logic_error (
"duplicate manager order "
+ std::to_string (
unsigned
(manager->getManagerOrder().first)) +
" "
+ manager->getManagerOrder().second);
47
managers
.insert (std::make_pair (manager->getManagerOrder(), std::move (manager)));
48
}
49
50
51
52
::StatusCode
ManagerData ::
53
run ()
54
{
55
if
(
step
!=
Detail::ManagerStep::initial
)
56
throw
std::logic_error (
"ManagerData::run() called twice"
);
57
58
do
59
{
60
step
=
nextStep
;
61
nextStep
=
Detail::ManagerStep
(
unsigned
(
step
) + 1);
62
ANA_MSG_DEBUG
(
"running step "
<<
unsigned
(
step
) <<
" / "
<<
unsigned
(
Detail::ManagerStep::final
));
63
for
(
const
auto
& manager :
managers
)
64
{
65
if
(manager.second->doManagerStep (*this).isFailure())
66
{
67
ANA_MSG_ERROR
(
"while performing manager step "
<<
unsigned
(
step
));
68
ANA_MSG_ERROR
(
"on submission directory "
<<
submitDir
);
69
return ::StatusCode::FAILURE;
70
}
71
}
72
}
while
(
step
!=
Detail::ManagerStep::final
);
73
return ::StatusCode::SUCCESS;
74
}
75
}
76
}
Assert.h
BatchJob.h
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
ANA_MSG_DEBUG
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:288
ManagerData.h
Manager.h
MessageCheck.h
EL::Detail
Definition
AsgComponentFactories.h:20
EL::Detail::ManagerStep
ManagerStep
the individual steps of preparing a job for submission
Definition
ManagerStep.h:42
EL::Detail::ManagerStep::final
@ final
Definition
ManagerStep.h:136
EL::Detail::ManagerStep::initial
@ initial
this is just the initial step we do, nothing really happens here
Definition
ManagerStep.h:45
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL::Detail::ManagerData::submitDir
std::string submitDir
the path to the submission directory
Definition
ManagerData.h:66
EL::Detail::ManagerData::step
ManagerStep step
the current ManagerStep
Definition
ManagerData.h:165
EL::Detail::ManagerData::managers
std::map< std::pair< ManagerOrder, std::string >, std::unique_ptr< Manager > > managers
the list of managers to run
Definition
ManagerData.h:175
EL::Detail::ManagerData::nextStep
ManagerStep nextStep
the next ManagerStep
Definition
ManagerData.h:171
Generated on
for ATLAS Offline Software by
1.17.0