ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
Root
DirectDriver.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
// includes
10
//
11
12
#include <
EventLoop/DirectDriver.h
>
13
14
#include <iostream>
15
#include <memory>
16
#include <TSystem.h>
17
#include <
EventLoop/Job.h
>
18
#include <
EventLoop/ManagerData.h
>
19
#include <
EventLoop/ManagerStep.h
>
20
#include <
EventLoop/MessageCheck.h
>
21
#include <
EventLoop/Worker.h
>
22
#include <
EventLoop/OutputStream.h
>
23
#include <
RootCoreUtils/Assert.h
>
24
#include <
SampleHandler/DiskOutputLocal.h
>
25
#include <
SampleHandler/Sample.h
>
26
#include <
SampleHandler/SampleHandler.h
>
27
#include <
SampleHandler/SampleLocal.h
>
28
29
//
30
// method implementations
31
//
32
33
ClassImp
(
EL::DirectDriver
)
34
35
namespace
EL
36
{
37
void
DirectDriver ::
38
testInvariant ()
const
39
{
40
RCU_INVARIANT
(
this
!= 0);
41
}
42
43
44
45
DirectDriver ::
46
DirectDriver ()
47
{
48
RCU_NEW_INVARIANT
(
this
);
49
}
50
51
52
53
::StatusCode
DirectDriver ::
54
doManagerStep (Detail::ManagerData& data)
const
55
{
56
using namespace
msgEventLoop;
57
ANA_CHECK
(
Driver::doManagerStep
(data));
58
switch
(data.step)
59
{
60
case
Detail::ManagerStep::updateOutputLocation
:
61
{
62
for
(
Job::outputMIter
out = data.job->outputBegin(),
63
end = data.job->outputEnd(); out != end; ++ out)
64
{
65
if
(out->output() == 0)
66
{
67
out->output (
new
SH::DiskOutputLocal
68
(data.submitDir +
"/data-"
+ out->label() +
"/"
));
69
}
70
}
71
}
72
break
;
73
74
case
Detail::ManagerStep::submitJob
:
75
{
76
for
(
SH::SampleHandler::iterator
sample = data.job->sampleHandler().begin(),
77
end = data.job->sampleHandler().end(); sample != end; ++ sample)
78
{
79
Worker worker;
80
ANA_CHECK
(worker.directExecute (**sample, *data.job, data.submitDir, data.options));
81
}
82
data.submitted =
true
;
83
}
84
break
;
85
86
case
Detail::ManagerStep::directSaveOutput
:
87
{
88
diskOutputSave (data);
89
}
90
break
;
91
92
case
Detail::ManagerStep::doRetrieve
:
93
{
94
data.retrieved =
true
;
95
data.completed =
true
;
96
}
97
break
;
98
99
default
:
100
(void)
true
;
// safe to do nothing
101
}
102
return ::StatusCode::SUCCESS;
103
}
104
}
Assert.h
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition
Assert.h:189
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition
Assert.h:221
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
ClassImp
ClassImp(EL::DirectDriver) namespace EL
Definition
DirectDriver.cxx:33
DirectDriver.h
DiskOutputLocal.h
Job.h
ManagerData.h
ManagerStep.h
OutputStream.h
MessageCheck.h
SampleHandler.h
SampleLocal.h
Sample.h
Worker.h
EL::DirectDriver
a Driver that runs directly inside the submission job itself
Definition
DirectDriver.h:25
EL::Driver::doManagerStep
virtual::StatusCode doManagerStep(Detail::ManagerData &data) const
EL::Job::outputMIter
OutputStream * outputMIter
description: the list of output datasets used guarantee: no-fail / strong failures(3): out of memory ...
Definition
Job.h:138
SH::DiskOutputLocal
an implementation of DiskOutput for local disks
Definition
DiskOutputLocal.h:23
SH::SampleHandler::iterator
boost::transform_iterator< SamplePtrToRawSample, std::vector< std::shared_ptr< Sample > >::const_iterator > iterator
the iterator to use
Definition
SampleHandler.h:457
EL::Detail::ManagerStep::doRetrieve
@ doRetrieve
call the actual doRetrieve method
Definition
ManagerStep.h:131
EL::Detail::ManagerStep::submitJob
@ submitJob
do the actual job submission
Definition
ManagerStep.h:92
EL::Detail::ManagerStep::directSaveOutput
@ directSaveOutput
save the output in the direct driver
Definition
ManagerStep.h:95
EL::Detail::ManagerStep::updateOutputLocation
@ updateOutputLocation
in this step we update the output location of streams that don't yet have one defined
Definition
ManagerStep.h:67
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
Generated on
for ATLAS Offline Software by
1.17.0