ATLAS Offline Software
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>
8 
9 int main (int argc, char **argv)
10 {
11  using namespace asg::msgUserCode;
12  ANA_CHECK_SET_TYPE (int);
13 
14  ANA_CHECK (xAOD::Init ());
15 
16  if (argc != 3)
17  {
18  ANA_MSG_ERROR ("invalid number of arguments");
19  return -1;
20  }
21 
22  unsigned job_id = 0;
23  {
24  std::istringstream str (argv[1]);
25  if (!(str >> job_id))
26  {
27  ANA_MSG_ERROR ("failed to parse job_id: " << job_id);
28  return -1;
29 
30  }
31  }
32 
33  auto confFile = argv[2];
34 
35  EL::Worker worker;
36  ANA_CHECK (worker.batchExecute (job_id, confFile));
37  return 0;
38 }
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
LArCellConditions.argv
argv
Definition: LArCellConditions.py:112
EL::Worker
Definition: Worker.h:25
MessageCheck.h
macros for messaging and checking status codes
Init.h
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
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:777
main
int main(int argc, char **argv)
Definition: eventloop_batch_worker.cxx:9
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
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
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