ATLAS Offline Software
Functions
LLDriver.cxx File Reference
#include <EventLoop/LLDriver.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 LLDriver.cxx:

Go to the source code of this file.

Functions

std::string convertInt (int number)
 
 ClassImp (EL::LLDriver) namespace EL
 

Function Documentation

◆ ClassImp()

ClassImp ( EL::LLDriver  )

Definition at line 34 of file LLDriver.cxx.

38 {
39  void LLDriver ::
40  testInvariant () const
41  {
42  RCU_INVARIANT (this != 0);
43  }
44 
45 
46 
47  LLDriver ::
48  LLDriver ()
49  {
50  RCU_NEW_INVARIANT (this);
51  }
52 
53 
54 
55  ::StatusCode LLDriver ::
56  doManagerStep (Detail::ManagerData& data) const
57  {
58  RCU_READ_INVARIANT (this);
59  using namespace msgEventLoop;
60  ANA_CHECK (BatchDriver::doManagerStep (data));
61  switch (data.step)
62  {
63  case Detail::ManagerStep::batchScriptVar:
64  {
65  data.batchName = "run{JOBID}.cmd";
66  data.batchInit =
67  "#\n"
68  "# @ job_name = EventLoopAnalysis{JOBID}\n"
69  "# @ job_type = serial\n"
70  "# @ error = $(Cluster).err\n"
71  "# @ output = $(Cluster).out\n"
72  "# @ class = " + queue + "\n"
73  "# @ resources = ConsumableCpus(1) ConsumableMemory(4gb)\n"
74  "# @ wall_clock_limit = 00:20:00\n"
75  "# @ queue\n";
76  }
77  break;
78 
79  case Detail::ManagerStep::submitJob:
80  case Detail::ManagerStep::doResubmit:
81  {
82  // safely ignoring: resubmit
83 
84  // Submit n jobs with loadleveler
85  for (std::size_t iter : data.batchJobIndices)
86  {
87  // Submit!
88 
89  std::ostringstream cmd;
90  cmd << "cd " << data.submitDir << "/submit && llsubmit "
91  << data.options.castString (Job::optSubmitFlags)
92  << " run"<<iter<<".cmd";
93 
94  if (gSystem->Exec (cmd.str().c_str()) != 0)
95  RCU_THROW_MSG (("failed to execute: " + cmd.str()).c_str());
96  }
97  data.submitted = true;
98  }
99  break;
100 
101  default:
102  break;
103  }
104  return ::StatusCode::SUCCESS;
105  }
106 }

◆ convertInt()

std::string convertInt ( int  number)
Author
Morten Dam Joergensen 2012.
Nils Krumnack

Definition at line 27 of file LLDriver.cxx.

28 {
29  std::stringstream ss;//create a stringstream
30  ss << number;//add number to the stream
31  return ss.str();//return a string with the contents of the stream
32 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
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
beamspotman.queue
string queue
Definition: beamspotman.py:347
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition: Assert.h:201
python.selection.number
number
Definition: selection.py:20
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