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>

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 33 of file DirectDriver.cxx.

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;
55 ANA_CHECK (Driver::doManagerStep (data));
56 switch (data.step)
57 {
58 case Detail::ManagerStep::updateOutputLocation:
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
72 case Detail::ManagerStep::submitJob:
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
84 case Detail::ManagerStep::directSaveOutput:
85 {
86 diskOutputSave (data);
87 }
88 break;
89
90 case Detail::ManagerStep::doRetrieve:
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
an implementation of DiskOutput for local disks
boost::transform_iterator< SamplePtrToRawSample, std::vector< std::shared_ptr< Sample > >::const_iterator > iterator
the iterator to use