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