ATLAS Offline Software
Loading...
Searching...
No Matches
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}
#define RCU_INVARIANT(x)
Definition Assert.h:201
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:233
#define RCU_READ_INVARIANT(x)
Definition Assert.h:229
#define ANA_CHECK(EXP)
check whether the given expression was successful
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
#define RCU_THROW_MSG(message)
Definition PrintMsg.h:58

◆ 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}
static Double_t ss
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186