ATLAS Offline Software
Loading...
Searching...
No Matches
DirectDriver.cxx File Reference
#include <EventLoop/DirectDriver.h>
#include <iostream>
#include <memory>
#include <TSystem.h>
#include <EventLoop/Job.h>
#include <EventLoop/ManagerData.h>
#include <EventLoop/ManagerStep.h>
#include <EventLoop/MessageCheck.h>
#include <EventLoop/Worker.h>
#include <EventLoop/OutputStream.h>
#include <RootCoreUtils/Assert.h>
#include <SampleHandler/DiskOutputLocal.h>
#include <SampleHandler/Sample.h>
#include <SampleHandler/SampleHandler.h>
#include <SampleHandler/SampleLocal.h>
#include <SampleHandler/SamplePtr.h>

Go to the source code of this file.

Functions

 ClassImp (EL::DirectDriver) namespace EL

Function Documentation

◆ ClassImp()

ClassImp ( EL::DirectDriver )
Author
Nils Krumnack

Definition at line 34 of file DirectDriver.cxx.

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;
58 ANA_CHECK (Driver::doManagerStep (data));
59 switch (data.step)
60 {
61 case Detail::ManagerStep::updateOutputLocation:
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
75 case Detail::ManagerStep::submitJob:
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
87 case Detail::ManagerStep::directSaveOutput:
88 {
89 diskOutputSave (data);
90 }
91 break;
92
93 case Detail::ManagerStep::doRetrieve:
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
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
an implementation of DiskOutput for local disks
std::vector< Sample * >::const_iterator iterator
the iterator to use