| The Gaudi Framework v32r1 (f65d50dc)

PythonConfig.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_PYTHONCONFIG_H
2 #define GAUDISVC_PYTHONCONFIG_H
3 #include "GaudiKernel/IJobOptionsSvc.h"
4 #include "GaudiKernel/IProperty.h"
5 #include "GaudiKernel/Property.h"
6 #include "GaudiKernel/SmartIF.h"
7 #include <string>
8
9 // Class to translate between Python and C++ worlds
10 // It will be exposed to Python via Boost (see .cpp file)
11 class PythonAdaptor {
12 public:
13 PythonAdaptor( IJobOptionsSvc* jos ) : m_IJobOptionsSvc( jos ) {}
14 void addPropertyToJobOptions( const std::string& client, const std::string& name, const std::string& value ) {
15 m_IJobOptionsSvc->addPropertyToCatalogue( client, Gaudi::Property<std::string>( name, value ) );
16 }
17
18 private:
19 SmartIF<IJobOptionsSvc> m_IJobOptionsSvc;
20 };
21
22 // Helper class to be invoked by JobOptionsSvc
23 class PythonConfig {
24 public:
25 PythonConfig( IJobOptionsSvc* jos ) : m_IJobOptionsSvc( jos ){};
26 StatusCode evaluateConfig( const std::string& filename, const std::string& preAction, const std::string& postAction );
27
28 private:
29 SmartIF<IJobOptionsSvc> m_IJobOptionsSvc;
30 };
31
32 #endif
SmartIF< IJobOptionsSvc >
PythonConfig::PythonConfig
PythonConfig(IJobOptionsSvc *jos)
Definition: PythonConfig.h:25
PythonAdaptor::PythonAdaptor
PythonAdaptor(IJobOptionsSvc *jos)
Definition: PythonConfig.h:13
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
graphanalysis.filename
string filename
Definition: graphanalysis.py:119
PythonConfig::evaluateConfig
StatusCode evaluateConfig(const std::string &filename, const std::string &preAction, const std::string &postAction)
Definition: PythonConfig.cpp:8
PythonAdaptor::addPropertyToJobOptions
void addPropertyToJobOptions(const std::string &client, const std::string &name, const std::string &value)
Definition: PythonConfig.h:14
std::string
STL class.
IJobOptionsSvc::addPropertyToCatalogue
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Gaudi::Details::PropertyBase &property)=0
Add a property into the JobOptions catalog.
PythonConfig
Definition: PythonConfig.h:23
IJobOptionsSvc
Main interface for the JobOptions service.
Definition: IJobOptionsSvc.h:20
PythonAdaptor
Definition: PythonConfig.h:11
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
SmartIF.h
PythonAdaptor::m_IJobOptionsSvc
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition: PythonConfig.h:19
PythonConfig::m_IJobOptionsSvc
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition: PythonConfig.h:29
IProperty.h
Property.h
IJobOptionsSvc.h