ATLAS Offline Software
Loading...
Searching...
No Matches
GEDriver.cxx File Reference
#include <EventLoop/GEDriver.h>
#include <AsgMessaging/StatusCode.h>
#include <EventLoop/Job.h>
#include <EventLoop/ManagerData.h>
#include <EventLoop/MessageCheck.h>
#include <TSystem.h>
#include <sstream>
Include dependency graph for GEDriver.cxx:

Go to the source code of this file.

Functions

 ClassImp (EL::GEDriver) namespace EL

Function Documentation

◆ ClassImp()

ClassImp ( EL::GEDriver )
Author
Nils Krumnack

Definition at line 25 of file GEDriver.cxx.

28{
29 void GEDriver ::
30 testInvariant () const
31 {
32 RCU_INVARIANT (this != 0);
33 }
34
35
36
37 GEDriver ::
38 GEDriver ()
39 {
40 RCU_NEW_INVARIANT (this);
41 }
42
43
44
45 ::StatusCode GEDriver ::
46 doManagerStep (Detail::ManagerData& data) const
47 {
48 RCU_READ_INVARIANT (this);
49 using namespace msgEventLoop;
50 ANA_CHECK (BatchDriver::doManagerStep (data));
51 switch (data.step)
52 {
53 case Detail::ManagerStep::submitJob:
54 case Detail::ManagerStep::doResubmit:
55 {
56 // safely ignoring: resubmit
57
58 std::ostringstream cmd;
59 cmd << "cd " << data.submitDir << "/submit";
60 for (std::size_t iter : data.batchJobIndices)
61 {
62 cmd << " && qsub " << data.options.castString (Job::optSubmitFlags)
63 << " -o " << data.submitDir << "/submit/log-" << iter << ".out"
64 << " -e " << data.submitDir << "/submit/log-" << iter << ".err"
65 << " run " << iter;
66 }
67 if (gSystem->Exec (cmd.str().c_str()) != 0)
68 {
69 ANA_MSG_ERROR ("failed to execute: " << cmd.str());
70 return ::StatusCode::FAILURE;
71 }
72 data.submitted = true;
73 }
74 break;
75
76 default:
77 break;
78 }
79 return ::StatusCode::SUCCESS;
80 }
81}
#define RCU_INVARIANT(x)
Definition Assert.h:189
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:221
#define RCU_READ_INVARIANT(x)
Definition Assert.h:217
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful