| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 {
13 public:
14 PythonAdaptor( IJobOptionsSvc* jos ) : m_IJobOptionsSvc( jos ) {}
15 void addPropertyToJobOptions( const std::string& client, const std::string& name, const std::string& value )
16 {
17 m_IJobOptionsSvc->addPropertyToCatalogue( client, Gaudi::Property<std::string>( name, value ) );
18 }
19
20 private:
21 SmartIF<IJobOptionsSvc> m_IJobOptionsSvc;
22 };
23
24 // Helper class to be invoked by JobOptionsSvc
25 class PythonConfig
26 {
27 public:
28 PythonConfig( IJobOptionsSvc* jos ) : m_IJobOptionsSvc( jos ){};
29 StatusCode evaluateConfig( const std::string& filename, const std::string& preAction, const std::string& postAction );
30
31 private:
32 SmartIF<IJobOptionsSvc> m_IJobOptionsSvc;
33 };
34
35 #endif
SmartIF< IJobOptionsSvc >
PythonConfig::PythonConfig
PythonConfig(IJobOptionsSvc *jos)
Definition: PythonConfig.h:28
PythonAdaptor::PythonAdaptor
PythonAdaptor(IJobOptionsSvc *jos)
Definition: PythonConfig.h:14
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
graphanalysis.filename
string filename
Definition: graphanalysis.py:117
PythonAdaptor::addPropertyToJobOptions
void addPropertyToJobOptions(const std::string &client, const std::string &name, const std::string &value)
Definition: PythonConfig.h:15
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:25
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:28
SmartIF.h
PythonAdaptor::m_IJobOptionsSvc
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition: PythonConfig.h:21
PythonConfig::m_IJobOptionsSvc
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition: PythonConfig.h:32
IProperty.h
Property.h
IJobOptionsSvc.h