ATLAS Offline Software
Loading...
Searching...
No Matches
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>
11
12int main (int argc, char **argv)
13{
14 using namespace asg::msgUserCode;
16
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}
macros for messaging and checking status codes
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
::StatusCode gridExecute(const std::string &sampleName, Long64_t SkipEvents, Long64_t nEventsPerJob)
Definition Worker.cxx:908
int main()
Definition hello.cxx:18
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition Init.cxx:31