The Gaudi Framework
master (01b473db)
PythonConfig.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
#include <
Gaudi/Interfaces/IOptionsSvc.h
>
13
#include <
GaudiKernel/StatusCode.h
>
14
#include <string>
15
16
// Class to translate between Python and C++ worlds
17
// It will be exposed to Python via Boost (see .cpp file)
18
class
PythonAdaptor
{
19
public
:
20
PythonAdaptor
(
Gaudi::Interfaces::IOptionsSvc
* optsSvc ) :
m_optsSvc
( optsSvc ) {}
21
void
addPropertyToJobOptions
(
const
std::string& client,
const
std::string&
name
,
const
std::string& value ) {
22
m_optsSvc
->
set
( client +
'.'
+
name
, value );
23
}
24
25
private
:
26
Gaudi::Interfaces::IOptionsSvc
*
m_optsSvc
;
27
};
28
29
// Helper class to be invoked by JobOptionsSvc
30
class
PythonConfig
{
31
public
:
32
PythonConfig
(
Gaudi::Interfaces::IOptionsSvc
* optsSvc ) :
m_optsSvc
( optsSvc ) {}
33
StatusCode
evaluateConfig
(
const
std::string&
filename
,
const
std::string& preAction,
const
std::string& postAction );
34
35
private
:
36
Gaudi::Interfaces::IOptionsSvc
*
m_optsSvc
;
37
};
PythonAdaptor::addPropertyToJobOptions
void addPropertyToJobOptions(const std::string &client, const std::string &name, const std::string &value)
Definition:
PythonConfig.h:21
PythonAdaptor::PythonAdaptor
PythonAdaptor(Gaudi::Interfaces::IOptionsSvc *optsSvc)
Definition:
PythonConfig.h:20
PythonConfig::evaluateConfig
StatusCode evaluateConfig(const std::string &filename, const std::string &preAction, const std::string &postAction)
Definition:
PythonConfig.cpp:17
StatusCode.h
StatusCode
Definition:
StatusCode.h:64
Gaudi::Interfaces::IOptionsSvc::set
virtual void set(const std::string &key, const std::string &value)=0
Set the value of an option, overriding the old value, if any.
PythonConfig::m_optsSvc
Gaudi::Interfaces::IOptionsSvc * m_optsSvc
Definition:
PythonConfig.h:36
PythonAdaptor
Definition:
PythonConfig.h:18
PythonConfig::PythonConfig
PythonConfig(Gaudi::Interfaces::IOptionsSvc *optsSvc)
Definition:
PythonConfig.h:32
ConditionsStallTest.name
name
Definition:
ConditionsStallTest.py:77
PythonAdaptor::m_optsSvc
Gaudi::Interfaces::IOptionsSvc * m_optsSvc
Definition:
PythonConfig.h:26
graphanalysis.filename
filename
Definition:
graphanalysis.py:130
Gaudi::Interfaces::IOptionsSvc
Interface for a component that manages application configuration options.
Definition:
IOptionsSvc.h:46
IOptionsSvc.h
PythonConfig
Definition:
PythonConfig.h:30
GaudiCoreSvc
src
JobOptionsSvc
PythonConfig.h
Generated on Thu Sep 18 2025 16:37:13 for The Gaudi Framework by
1.8.18