ATLAS Offline Software
Loading...
Searching...
No Matches
ExecDriver.cxx File Reference
Include dependency graph for ExecDriver.cxx:

Go to the source code of this file.

Functions

 ClassImp (EL::ExecDriver) namespace EL

Function Documentation

◆ ClassImp()

ClassImp ( EL::ExecDriver )
Author
Nils Krumnack

Definition at line 22 of file ExecDriver.cxx.

25{
26 void ExecDriver ::
27 testInvariant () const
28 {
29 RCU_INVARIANT (this != 0);
30 }
31
32
33
34 ExecDriver ::
35 ExecDriver ()
36 {
37 RCU_NEW_INVARIANT (this);
38 }
39
40
41
42 ::StatusCode ExecDriver ::
43 doManagerStep (Detail::ManagerData& data) const
44 {
45 RCU_READ_INVARIANT (this);
46 using namespace msgEventLoop;
47 ANA_CHECK (BatchDriver::doManagerStep (data));
48 switch (data.step)
49 {
50 case Detail::ManagerStep::batchScriptVar:
51 {
52 data.batchSkipReleaseSetup = true;
53 }
54 break;
55
56 case Detail::ManagerStep::submitJob:
57 case Detail::ManagerStep::doResubmit:
58 {
59 // safely ignoring: resubmit
60
61 std::string maxIndex = std::to_string (data.batchJobIndices.size());
62 const char *argv[] = { "eventloop_exec_worker", data.submitDir.c_str(), maxIndex.c_str(), nullptr };
63
64 // this will replace the current program with a new one. that means
65 // that for better (or worse) we will not continue afterwards. this is
66 // fully intentional, as it releases all the memory we used for
67 // configuring the job. that is the whole point of this driver,
68 // releasing the >1GB of memory we use for configuration (in large parts
69 // ROOT-python dictionaries).
70 execvp(argv[0], const_cast<char**>(argv));
71 auto myerrno = errno;
72 RCU_THROW_MSG ("failed to execute eventloop_exec_worker: " + std::string (strerror (myerrno)));
73 }
74 break;
75
76 default:
77 break;
78 }
79 return ::StatusCode::SUCCESS;
80 }
81}
#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