ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
Root
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
12
#include <
EventLoop/WorkerConfigModule.h
>
13
14
#include <
EventLoop/Job.h
>
15
#include <
EventLoop/ModuleData.h
>
16
#include <
EventLoop/WorkerConfig.h
>
17
#include <
EventLoop/Worker.h
>
18
#include <
PathResolver/PathResolver.h
>
19
#include <
SampleHandler/MetaObject.h
>
20
#include <TPython.h>
21
22
//
23
// method implementations
24
//
25
26
namespace
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());
38
WorkerConfig
config (&data);
39
TPython::Bind (&config,
"workerConfig"
);
40
TPython::Exec (
"fillWorkerConfig (workerConfig)"
);
41
TPython::Bind (
nullptr
,
"workerConfig"
);
42
}
43
44
return
StatusCode::SUCCESS;
45
}
46
}
47
}
Job.h
MetaObject.h
ModuleData.h
PathResolver.h
PathResolverFindDataFile
std::string PathResolverFindDataFile(const std::string &logical_file_name)
Definition
PathResolver.cxx:320
WorkerConfigModule.h
WorkerConfig.h
Worker.h
EL::Job::optWorkerConfigFile
static const std::string optWorkerConfigFile
a python configuration file that will be executed on the worker
Definition
Job.h:242
EL::WorkerConfig
Definition
WorkerConfig.h:27
EL::Detail
Definition
AsgComponentFactories.h:20
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
configFile
Definition
configFile.py:1
EL::Detail::ModuleData
the data the EventLoop core classes are sharing with the Module implementation
Definition
ModuleData.h:65
Generated on
for ATLAS Offline Software by
1.17.0