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 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;
58 switch (data.step)
59 {
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
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
87 {
88 diskOutputSave (data);
89 }
90 break;
91
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}
#define RCU_INVARIANT(x)
Definition Assert.h:196
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:228
#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.