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