ATLAS Offline Software
Loading...
Searching...
No Matches
WorkerConfigModule.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8//
9// includes
10//
11
13
14#include <EventLoop/Job.h>
17#include <EventLoop/Worker.h>
20#include <TPython.h>
21
22//
23// method implementations
24//
25
26namespace EL
27{
28 namespace Detail
29 {
30 StatusCode WorkerConfigModule ::
31 onInitialize (ModuleData& data)
32 {
33 std::string configFile = data.m_worker->metaData()->castString (Job::optWorkerConfigFile, "");
34 if (!configFile.empty())
35 {
36 configFile = PathResolverFindDataFile (configFile);
37 TPython::LoadMacro (configFile.c_str());
39 TPython::Bind (&config, "workerConfig");
40 TPython::Exec ("fillWorkerConfig (workerConfig)");
41 TPython::Bind (nullptr, "workerConfig");
42 }
43
44 return StatusCode::SUCCESS;
45 }
46 }
47}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
std::string PathResolverFindDataFile(const std::string &logical_file_name)
static const std::string optWorkerConfigFile
a python configuration file that will be executed on the worker
Definition Job.h:246
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
the data the EventLoop core classes are sharing with the Module implementation
Definition ModuleData.h:64