ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoopGrid
util
eventloop_run_grid_job.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 <TROOT.h>
7
#include <iostream>
8
#include <string>
9
#include <
xAODRootAccess/Init.h
>
10
#include <
AsgMessaging/MessageCheck.h
>
11
12
int
main
(
int
argc,
char
**argv)
13
{
14
using namespace
asg::msgUserCode;
15
ANA_CHECK_SET_TYPE
(
int
);
16
17
ANA_CHECK
(
xAOD::Init
());
18
19
if
(argc != 2 && argc != 4)
20
{
21
ANA_MSG_ERROR
(
"invalid number of arguments"
);
22
return
-1;
23
}
24
25
std::string sampleName = argv[1];
26
Long64_t SkipEvents = 0;
27
Long64_t nEventsPerJob = -1;
28
29
if
(argc == 4)
30
{
31
SkipEvents = std::stol(argv[2]);
32
nEventsPerJob = std::stol(argv[3]);
33
}
34
35
EL::Worker
worker;
36
ANA_CHECK
(worker.
gridExecute
(sampleName, SkipEvents, nEventsPerJob));
37
return
0;
38
}
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:294
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
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:314
Init.h
Worker.h
EL::Worker
Definition
Worker.h:26
EL::Worker::gridExecute
::StatusCode gridExecute(const std::string &sampleName, Long64_t SkipEvents, Long64_t nEventsPerJob)
Definition
Worker.cxx:937
main
int main()
Definition
hello.cxx:18
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