ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
util
eventloop_batch_worker.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <
EventLoop/Worker.h
>
6
#include <
xAODRootAccess/Init.h
>
7
#include <
AsgMessaging/MessageCheck.h
>
8
#include <sstream>
9
10
int
main
(
int
argc,
char
**argv)
11
{
12
using namespace
asg::msgUserCode;
13
ANA_CHECK_SET_TYPE
(
int
);
14
15
ANA_CHECK
(
xAOD::Init
());
16
17
if
(argc != 3)
18
{
19
ANA_MSG_ERROR
(
"invalid number of arguments"
);
20
return
-1;
21
}
22
23
unsigned
job_id = 0;
24
{
25
std::istringstream
str
(argv[1]);
26
if
(!(
str
>> job_id))
27
{
28
ANA_MSG_ERROR
(
"failed to parse job_id: "
<< argv[1]);
29
return
-1;
30
31
}
32
}
33
34
auto
confFile = argv[2];
35
36
EL::Worker
worker;
37
ANA_CHECK
(worker.
batchExecute
(job_id, confFile));
38
return
0;
39
}
MessageCheck.h
macros for messaging and checking status codes
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg,...)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:295
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:325
ANA_CHECK_SET_TYPE
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:315
Init.h
Worker.h
EL::Worker
Definition
Worker.h:22
EL::Worker::batchExecute
::StatusCode batchExecute(unsigned job_id, const char *confFile)
effects: do what is needed to execute the given job segment guarantee: basic failures: job specific
Definition
Worker.cxx:865
main
int main()
Definition
hello.cxx:18
str
Definition
BTagTrackIpAccessor.cxx:11
xAOD::Init
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition
Init.cxx:31
Generated on
for ATLAS Offline Software by
1.17.0