ATLAS Offline Software
Functions
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 <RootCoreUtils/ThrowMsg.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 26 of file GEDriver.cxx.

29 {
30  void GEDriver ::
31  testInvariant () const
32  {
33  RCU_INVARIANT (this != 0);
34  }
35 
36 
37 
38  GEDriver ::
39  GEDriver ()
40  {
41  RCU_NEW_INVARIANT (this);
42  }
43 
44 
45 
46  ::StatusCode GEDriver ::
47  doManagerStep (Detail::ManagerData& data) const
48  {
49  RCU_READ_INVARIANT (this);
50  using namespace msgEventLoop;
51  ANA_CHECK (BatchDriver::doManagerStep (data));
52  switch (data.step)
53  {
54  case Detail::ManagerStep::submitJob:
55  case Detail::ManagerStep::doResubmit:
56  {
57  // safely ignoring: resubmit
58 
59  std::ostringstream cmd;
60  cmd << "cd " << data.submitDir << "/submit";
61  for (std::size_t iter : data.batchJobIndices)
62  {
63  cmd << " && qsub " << data.options.castString (Job::optSubmitFlags)
64  << " -o " << data.submitDir << "/submit/log-" << iter << ".out"
65  << " -e " << data.submitDir << "/submit/log-" << iter << ".err"
66  << " run " << iter;
67  }
68  if (gSystem->Exec (cmd.str().c_str()) != 0)
69  RCU_THROW_MSG (("failed to execute: " + cmd.str()).c_str());
70  data.submitted = true;
71  }
72  break;
73 
74  default:
75  break;
76  }
77  return ::StatusCode::SUCCESS;
78  }
79 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
rerun_display.cmd
string cmd
Definition: rerun_display.py:67
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition: Assert.h:201
RCU_THROW_MSG
#define RCU_THROW_MSG(message)
Definition: PrintMsg.h:58
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition: Assert.h:229
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition: Assert.h:233