ATLAS Offline Software
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
}
Execution.SkipEvents
SkipEvents
Definition:
Execution.py:91
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
main
int main(int argc, char **argv)
Definition:
eventloop_run_grid_job.cxx:12
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
skel.nEventsPerJob
nEventsPerJob
Definition:
skel.ABtoEVGEN.py:540
EL::Worker
Definition:
Worker.h:25
LArCellNtuple.argv
argv
Definition:
LArCellNtuple.py:152
MessageCheck.h
macros for messaging and checking status codes
Init.h
DQHistogramMergeRegExp.argc
argc
Definition:
DQHistogramMergeRegExp.py:20
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
Worker.h
EL::Worker::gridExecute
::StatusCode gridExecute(const std::string &sampleName, Long64_t SkipEvents, Long64_t nEventsPerJob)
Definition:
Worker.cxx:862
xAOD::Init
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition:
Init.cxx:31
Generated on Sun Dec 22 2024 21:10:18 for ATLAS Offline Software by
1.8.18