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>
29
30//
31// method implementations
32//
33
35
36namespace EL
37{
38 void DirectDriver ::
39 testInvariant () const
40 {
41 RCU_INVARIANT (this != 0);
42 }
43
44
45
46 DirectDriver ::
47 DirectDriver ()
48 {
49 RCU_NEW_INVARIANT (this);
50 }
51
52
53
54 ::StatusCode DirectDriver ::
55 doManagerStep (Detail::ManagerData& data) const
56 {
57 using namespace msgEventLoop;
59 switch (data.step)
60 {
62 {
63 for (Job::outputMIter out = data.job->outputBegin(),
64 end = data.job->outputEnd(); out != end; ++ out)
65 {
66 if (out->output() == 0)
67 {
68 out->output (new SH::DiskOutputLocal
69 (data.submitDir + "/data-" + out->label() + "/"));
70 }
71 }
72 }
73 break;
74
76 {
77 for (SH::SampleHandler::iterator sample = data.job->sampleHandler().begin(),
78 end = data.job->sampleHandler().end(); sample != end; ++ sample)
79 {
80 Worker worker;
81 ANA_CHECK (worker.directExecute (*sample, *data.job, data.submitDir, data.options));
82 }
83 data.submitted = true;
84 }
85 break;
86
88 {
89 diskOutputSave (data);
90 }
91 break;
92
94 {
95 data.retrieved = true;
96 data.completed = true;
97 }
98 break;
99
100 default:
101 (void) true; // safe to do nothing
102 }
103 return ::StatusCode::SUCCESS;
104 }
105}
#define RCU_INVARIANT(x)
Definition Assert.h:201
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:233
#define ANA_CHECK(EXP)
check whether the given expression was successful
ClassImp(EL::DirectDriver) namespace EL
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
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:142
an implementation of DiskOutput for local disks
std::vector< 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.